TheySaySomethingInterrestingApparently: Python Pickler saving live assembly instruction... Pickler can save anything even Virus if you intended to do so...


Iterpipes, Between Bash and Hash-bash

A library for running shell pipelines using shell-like syntax

Enables piping infinite streams through shell pipelines in Python

xhtml-css Bivalidator

Check your markup and style validity


Just type or paste an URL in the form above, and click on "check it" to see the magic. If you want to fine tune your validation, click on the "advanced" link. That's it!

Yet Another Comprehensive Content

Like, Young's modulus is a vibrating variation inside a solid... The times it take to respanw to an excess of energy is what molding apparence may look to not-so solid thing's... Like this Blog when adding content, the effor is like slapping it and the time it goes back, centered... we consider being more stable than usual...

mercredi 23 octobre 2013

Python Pickler saving live assembly instruction... Pickler can save anything even Virus if you intended to do so...

This following artifact, from Numpy module called np_inline can generate static inline code and it's well known module... Such utility can ( demonstrated thru PDF example to multiply Matrix with a couple of line of Ansi C )...

Despite finding a way to Proove we can use big number Library to insert into a development from my github, fibonacci_offset start to work in a correct way, but crafting the original class FibonacciOffset-> ComputeLevel can compute really big number and can also generated such number it easy overflow after converting a number into C-type from module ctypes...

But after reading the module-pdf from np_inline, it show the function working after compilation ( can not be seen with idle, you need to open a terminal and calling python2.7 ) version I actually work with...

So are doing in this way:
from np_inline import inline_debug as inline

code=r'printf("Program #%i: Hello world.\n",i)
inline('hello_word_example', args=(1,),py_types=((int,'i'),),code=code )

### Showing on terminal, the compilation and finally:
Program #1: Hello world.

### This is not bad... but calling it back:
>>>import hello_word_example
### As the name you mention inside inline(...)
### and this time just using Number 2 

>>>hello_word_example.function( 2 )

Program #2: Hello world.

### -- Still Correct...
### And saving them... after all it's an object and can possibly stored... Why-not !!!

>>>import cPickle
>>>from cPickle import Pickler, Unpickler
>>>import tempfile

### I am using tempfile because it will always have space for temporary file
### being a standard in Computer-administration, almost all application 
### requires free-space

>>>aPickler=cPickle.Pickler( atemp, -1 )
>>>aPickler.dump( hello_word_example.function )
>>>AFH=open( '/home/maxiste/obj_mem.pkl', 'w+')
>>>AFH.write( ) 
>>>del hello_word_example

### The delete operation is really important to remove the module to 
### reload it from Unpickler...

>>> hello_word_example.function( 2 )

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'hello_word_example' is not defined

### Recovering Object with Unpickler
>>>BFH=open( '/home/maxiste/obj_mem.pkl', 'r' )
>>> Dpickler=cPickle.Unpickler( BFH )
### Now Module is in memory and we can load back
>>>from hello_word_example import *
### Now using Number 3 
>>>function( 3 )

Program #3: Hello world.
Telling it's important to keep in mind creating a new package and using setuptools directive data([...]) to store any data can store indefinitely your object compiled for your station... Might be problematic if we move toward another kernel version or simply different architecture... But the remaining story is my original New on Zero-install project with autoinstall module can freely transform and Egg out of the Web and installing it like np_inline function inline can compile it and create a module inside Tempfile and be directly Ansi-C code and directly create Assembly code ready to be executed... I do not have direct example like sending a shutdown-signal in Windows as example, but unfortunately the ctype tutorial explain how to load the windll.kernel32 and msvcrt dll too, leaving you unbreath when it's time to load Development back-end to do Administration task while Operator or Administrator had blocked such Entry over Windows Policy Group...

But unfortunately, developping a cluster, and using autoinstall and call a module being available in your personal File-Server can be spreaded fast and allow sometimes application to operate like lightning ...

And I'm working at home under Linux Environment wich is a personal pain creating virus under a ELF structure... Windows I do not own any personal knowledge of how hijacking a program running and today Virus are mostly look like to TSR and are not efficient like virus from 90' to mid-90 which was probably the end of a wage carrying their knowledge out of today technology...

XText may contains errors, syntax errors or lexical error...
XNow with SpellChecking and Editable text. Up to you to get something correct.

  • 1No Interest
  • 2Somewhat good
  • 3Good
  • 4Special.