Пример #1
0
import msgUtils
import socket

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(("97.88.151.164", 8333))

sock.send(msgUtils.getVersionMsg())
sock.recv(1000)  # receive version
sock.recv(1000)  # receive verack
sock.send(
    msgUtils.getTxMsg(
        "0100000001484d40d45b9ea0d652fca8258ab7caa42541eb52975857f96fb50cd732c8b481000000008a47304402202cb265bf10707bf49346c3515dd3d16fc454618c58ec0a0ff448a676c54ff71302206c6624d762a1fcef4618284ead8f08678ac05b13c84235f1654e6ad168233e8201410414e301b2328f17442c0b8310d787bf3d8a404cfbd0704f135b6ad4b2d3ee751310f981926e53a6e8c39bd7d3fefd576c543cce493cbac06388f2651d1aacbfcdffffffff0162640100000000001976a914c8e90996c7c6080ee06284600c684ed904d14c5c88ac00000000"
        .decode('hex')))
Пример #2
0
import msgUtils
import socket
import codecs
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(("192.168.99.100", 49020))
#sock.connect(("127.17.42.1", 49020))

sock.send(msgUtils.getVersionMsg())
sock.recv(1000) # receive version
sock.recv(1000) # receive verack
#sock.send(msgUtils.getTxMsg(codecs.encode("0100000001484d40d45b9ea0d652fca8258ab7caa42541eb52975857f96fb50cd732c8b481000000008a47304402202cb265bf10707bf49346c3515dd3d16fc454618c58ec0a0ff448a676c54ff71302206c6624d762a1fcef4618284ead8f08678ac05b13c84235f1654e6ad168233e8201410414e301b2328f17442c0b8310d787bf3d8a404cfbd0704f135b6ad4b2d3ee751310f981926e53a6e8c39bd7d3fefd576c543cce493cbac06388f2651d1aacbfcdffffffff0162640100000000001976a914c8e90996c7c6080ee06284600c684ed904d14c5c88ac00000000".encode('utf-8'),'hex')))
sock.send(msgUtils.getTxMsg(codecs.encode("0100000001b1f882d58e9f85aa3c03c2c828f88b422b7292063cbd787e97fb62726e49f7ac000000006a47304402203a3ddde990d0f63ddb83fb8082cf1353d728b0d1f887e3a59c1ae4d86989ff34022039e4c2d9310c315d72b80ff9654c91e97e7b8cf22c0ea1e96cf4e0a2617d76400121031906010cdc4cfafc11a4588fe26197c979bd31f76e19d9f4b91b5660838ac9acffffffff01a0860100000000001976a91492f945443c9aff591d1412925e747352d3077e3e88ac00000000".encode('utf-8'),'hex')))
Пример #3
0
import msgUtils
import socket
import codecs
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(("192.168.99.100", 49020))
#sock.connect(("127.17.42.1", 49020))

sock.send(msgUtils.getVersionMsg())
sock.recv(1000)  # receive version
sock.recv(1000)  # receive verack
#sock.send(msgUtils.getTxMsg(codecs.encode("0100000001484d40d45b9ea0d652fca8258ab7caa42541eb52975857f96fb50cd732c8b481000000008a47304402202cb265bf10707bf49346c3515dd3d16fc454618c58ec0a0ff448a676c54ff71302206c6624d762a1fcef4618284ead8f08678ac05b13c84235f1654e6ad168233e8201410414e301b2328f17442c0b8310d787bf3d8a404cfbd0704f135b6ad4b2d3ee751310f981926e53a6e8c39bd7d3fefd576c543cce493cbac06388f2651d1aacbfcdffffffff0162640100000000001976a914c8e90996c7c6080ee06284600c684ed904d14c5c88ac00000000".encode('utf-8'),'hex')))
sock.send(
    msgUtils.getTxMsg(
        codecs.encode(
            "0100000001b1f882d58e9f85aa3c03c2c828f88b422b7292063cbd787e97fb62726e49f7ac000000006a47304402203a3ddde990d0f63ddb83fb8082cf1353d728b0d1f887e3a59c1ae4d86989ff34022039e4c2d9310c315d72b80ff9654c91e97e7b8cf22c0ea1e96cf4e0a2617d76400121031906010cdc4cfafc11a4588fe26197c979bd31f76e19d9f4b91b5660838ac9acffffffff01a0860100000000001976a91492f945443c9aff591d1412925e747352d3077e3e88ac00000000"
            .encode('utf-8'), 'hex')))
Пример #4
0
import msgUtils
import socket

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(("97.88.151.164", 8333))

sock.send(msgUtils.getVersionMsg())
sock.recv(1000) # receive version
sock.recv(1000) # receive verack
sock.send(msgUtils.getTxMsg("0100000001484d40d45b9ea0d652fca8258ab7caa42541eb52975857f96fb50cd732c8b481000000008a47304402202cb265bf10707bf49346c3515dd3d16fc454618c58ec0a0ff448a676c54ff71302206c6624d762a1fcef4618284ead8f08678ac05b13c84235f1654e6ad168233e8201410414e301b2328f17442c0b8310d787bf3d8a404cfbd0704f135b6ad4b2d3ee751310f981926e53a6e8c39bd7d3fefd576c543cce493cbac06388f2651d1aacbfcdffffffff0162640100000000001976a914c8e90996c7c6080ee06284600c684ed904d14c5c88ac00000000".decode('hex')))