mirror of
https://github.com/radareorg/radare.git
synced 2026-11-07 23:02:38 -10:00
* Initial working implementation of the ruby remote api - For server and client - Added examples * Fix cmd and system for python remote bindings * Properly close the connections and start listening again on the ruby and python bindings for the remote server * Drop '2>/dev/null' when building python and perl plugins * Fix 'pz' command when block doesnt ends with '\0' (only happens when block > filesize. Current implementation is slower but more secure
19 lines
299 B
Ruby
19 lines
299 B
Ruby
require 'radare/api'
|
|
require 'radare/remote'
|
|
|
|
#print "#{bin2hex("\x90\x12\x33")}\n"
|
|
|
|
port = 9999
|
|
|
|
class MyRapServer < RapServer
|
|
def handle_open(file, args)
|
|
print "OPEN HOOKED\n"
|
|
return super(file, args)
|
|
end
|
|
end
|
|
|
|
print "Listening at #{port}\n"
|
|
rs = MyRapServer.new()
|
|
rs.listen_tcp(port)
|
|
|