4 ms·
That's pretty wild. Obviously you can do similar with straight up gdb and C programs, but does this sort of thing exist with other languages? I'd be fairly in
by burgerbrain 15y ago
That's pretty wild. Obviously you can do similar with straight up gdb and C programs, but does this sort of thing exist with other languages? I'd be fairly interested in something like this for racket and ruby.
- jeremya 15y agoFrom a quick glance at the code, it looks like it is using gdb to call methods in the Python/C API. I agree, it is pretty neat.
- packetlss 15y agoHave you seen 'hijack'? https://github.com/ileitch/hijack https://github.com/ileitch/hijack
- maxs 15y agoJava (well, JVM) has method hotswapping. It's very useful for debugging and development. Because of static typing, you can't change classes to add new methods, but you can modify existing methods. (There is something called JRebel which does allow you to change classes but I find it a little hacky.)
- dustingetz 15y agoMS Detours[1] makes this easy in win32 processes. Stuff like this is useful for reverse engineers when prototyping hacks, security research, hooking kernel-level calls for e.g. packet filtering or AV, etc. Note that your run-of-the-mill antivirus will detect this, hacking processes in production is much harder. Here's an article describing how to do it by hand the naive way, they use minesweeper as the target: [2] [1] http://research.microsoft.com/en-us/projects/detours/ http://research.microsoft.com/en-us/projects/detours/ [2] http://uninformed.org/?v=1&a=7 http://uninformed.org/?v=1&a=7
- pwg 15y agoTcl has had this capability for a very long time: http://wiki.tcl.tk/1055 http://wiki.tcl.tk/1055 Tkcon (http://wiki.tcl.tk/1878 http://wiki.tcl.tk/1878) makes use of the various methods Tcl provides to great effect.
- praptak 15y ago"Obviously you can do similar with straight up gdb and C programs" Yes, but it is a bit harder - unlike C, Python is designed to make things easily changeable at runtime.