BVB Source Codes

voltron Show client.py Source code

Return Download voltron: download client.py Source code - Download voltron Source code - Type:.py
  1. #!/usr/bin/env python
  2. """
  3. Example Voltron client.
  4.  
  5. Start your debugger as follows:
  6.  
  7. $ lldb /tmp/inferior
  8. Voltron loaded.
  9. Run `voltron init` after you load a target.
  10. (lldb) target create "/tmp/inferior"
  11. Current executable set to '/tmp/inferior' (x86_64).
  12. (lldb) voltron init
  13. Registered stop-hook
  14. (lldb) b main
  15. Breakpoint 1: where = inferior`main, address = 0x0000000100000cf0
  16. (lldb) run
  17. Process 13185 launched: '/Volumes/Data/Users/snare/code/voltron/repo/tests/inferior' (x86_64)
  18. Process 13185 stopped
  19. * thread #1: tid = 0x1ee63, 0x0000000100000cf0 inferior`main, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
  20.    frame #0: 0x0000000100000cf0 inferior`main
  21. inferior`main:
  22. -> 0x100000cf0:  push   rbp
  23.   0x100000cf1:  mov    rbp, rsp
  24.   0x100000cf4:  sub    rsp, 0x50
  25.   0x100000cf8:  mov    dword ptr [rbp - 0x4], 0x0
  26.  
  27. Run this client in another terminal. Each time you `stepi` in the debugger,
  28. the client will output the current RIP:
  29.  
  30. $ python client.py
  31. Instruction pointer is: 0x100000CFF
  32. Instruction pointer is: 0x100000D02
  33. Instruction pointer is: 0x100000D06
  34. Instruction pointer is: 0x100000D0D
  35. Instruction pointer is: 0x100000D15
  36. Instruction pointer is: 0x100000D1C
  37. """
  38.  
  39. import voltron
  40. from voltron.core import Client
  41.  
  42.  
  43. def main():
  44.     # Create a client and connect to the server
  45.     client = Client()
  46.  
  47.     # Main event loop
  48.     while True:
  49.         # Wait for the debugger to stop again
  50.         res = client.perform_request('version', block=True)
  51.         if res.is_success:
  52.             # If nothing went wrong, get the instruction pointer and print it
  53.             res = client.perform_request('registers', registers=['rip'])
  54.             if res.is_success:
  55.                 print("Instruction pointer is: 0x{:X}".format(res.registers['rip']))
  56.             else:
  57.                 print("Failed to get registers: {}".format(res))
  58.         else:
  59.             print("Error waiting for the debugger to stop: {}".format(res))
  60.             break
  61.  
  62.  
  63. if __name__ == "__main__":
  64.     main()
  65.  
downloadclient.py Source code - Download voltron Source code
Related Source Codes/Software:
IGListKit - A data-driven UICollectionView framework for build... 2017-01-11
androidmvp - MVP Android Example 2017-01-11
svelte - The magical disappearing UI framework ... 2017-01-11
kcptun - A Simple UDP Tunnel Based On KCP 2017-01-11
poisontap - Exploits locked/password protected computers over ... 2017-01-10
ecma262 - Status, process, and documents for ECMA262 ... 2017-01-11
react-native-elements - React Native Elements UI Toolkit 2017-01-11
tensorflow-zh - Google new open source ai system TensorFlow Chines... 2017-01-11
forum - Blue light (the Lantern) the official BBS 2017-01-11
socketcluster - Highly scalable realtime framework ... 2017-01-11
discover-flask - Full Stack Web Development with Flask. ... 2017-01-12
spring-mvc-showcase - Demonstrates the features of the Spring MVC web fr... 2017-01-12
tushare - TuShare is a utility for crawling historical data ... 2017-01-12
raml-spec - RAML Specification http://raml.... 2017-01-12
android-stackblur - Android StackBlur is a library that can perform a ... 2017-01-12
sound-redux - A Soundcloud client built with React / Redux ... 2017-01-12
httpstat - curl statistics made simple 2017-01-12
vim - Vim configuration file and plug-ins 2017-01-12
appframework - The definitive HTML5 mobile javascript framework ... 2017-01-12
BaiduExporter - Assistant for Baidu to export download links to ar... 2017-01-11

 Back to top