Files
pancake 6692ec7595 * Some more scripting examples reorganization
--HG--
rename : scripts/anal.lua => api/lua/anal.lua
rename : scripts/fuzzer-loop.lua => api/lua/fuzzer-loop.lua
rename : scripts/fuzzer-target.c => api/lua/fuzzer-target.c
rename : scripts/opcleaner.lua => api/lua/opcleaner.lua
rename : scripts/lua/posix/Makefile => api/lua/posix/Makefile
rename : scripts/lua/posix/modemuncher.c => api/lua/posix/modemuncher.c
rename : scripts/lua/posix/posix.c => api/lua/posix/posix.c
rename : scripts/pushpop.lua => api/lua/pushpop.lua
rename : scripts/search-demo.lua => api/lua/search-demo.lua
rename : scripts/vozme.lua => api/lua/vozme.lua
rename : scripts/rscript.pl => api/perl/rscript.pl
rename : scripts/radapy_bochs.py => api/python/bochs.py
rename : scripts/radapy_client.py => api/python/client.py
rename : scripts/example.py => api/python/example.py
rename : scripts/standalone.py => api/python/standalone.py
2009-06-16 17:18:42 +02:00

32 lines
456 B
Python

hijack=1
import radare
import ranal
import radapy
# r.cmd() hijacking
if hijack:
class Food:
def cmd(str):
global c
print "Command to run is (%s)"%str
return c.cmd(str)
cmd = staticmethod(cmd)
global r
radare.r = Food
c = radapy.RapClient("localhost", 9999)
fd = c.open("/bin/ls", 0)
print c.cmd("px")
#r = Food
#r.cmd("#test")
print radare.r.cmd("pd 20")
radare.seek(33)
print radare.disasm(0, 10)
# close
c.close(fd)
c.disconnect()