python on the wine on the linux

リバースエンジニアリングを表紙にグッときたので買ってしまった.
PythonでDOSのdllとかLinuxのsoとかを呼び出したり,デバッガ作ったりDLLインジェクションをする話が載ってるっぽいです.

ただ,日常的に使ってるのがLinuxだけに,Windowsのデバッガを作ってる章を読む効率が悪そうなので,Linuxでも作業ができる環境を整えて見ました.

ってことで
python on the wine on the linux

そうです.wineです.

残念ながら手元の環境では.Python2.7のmsiが動かずに,Python2.6のmsiしか入りませんでした.
$ wget http://www.python.org/ftp/python/2.6.6/python-2.6.6.amd64.msi
$ execmsi /i python-2.6.6.amd64.msi
$ grep -n PATH *
system.reg:12555:"PATH"=str(2):"C:\\windows\\system32;C:\\windows"
$ vim system.reg
12555jiと打つ
PATHを編集
"PATH"=str(2):"C:\\windows\\system32;C:\\windows;C:\\Python26"
ESC:wq
$ wine python
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> msvcrt = ctypes.cdll.msvcrt
>>> msvcrt.printf("hello, world!\n")
hello, world!
14
>>>

よし,これで大丈夫そう.