Example #1
0
 def state_proxy_handshake_done(self):
     Socks4aConnection.state_proxy_handshake_done(self)
     self.nodeid = randomBytes(8)
     self.append_write_buf(protocol.assembleVersionMessage(self.destination.host, self.destination.port, \
             network.connectionpool.BMConnectionPool().streams, False, nodeid=self.nodeid))
     self.set_state("bm_header", expectBytes=protocol.Header.size)
     return True
Example #2
0
 def state_proxy_handshake_done(self):
     Socks4aConnection.state_proxy_handshake_done(self)
     self.nodeid = randomBytes(8)
     self.append_write_buf(protocol.assembleVersionMessage(self.destination.host, self.destination.port, \
             network.connectionpool.BMConnectionPool().streams, False, nodeid=self.nodeid))
     self.set_state("bm_header", expectBytes=protocol.Header.size)
     return True
Example #3
0
 def state_proxy_handshake_done(self):
     """State when SOCKS4a connection succeeds, we need to send a Bitmessage handshake to peer."""
     Socks4aConnection.state_proxy_handshake_done(self)
     self.nodeid = randomBytes(8)
     self.append_write_buf(
         protocol.assembleVersionMessage(
             self.destination.host,
             self.destination.port,
             network.connectionpool.BMConnectionPool().streams,
             False,
             nodeid=self.nodeid))
     self.set_state("bm_header", expectBytes=protocol.Header.size)
     return True
Example #4
0
 def __init__(self, address):
     Socks4aConnection.__init__(self, address=address)
     TCPConnection.__init__(self, address=address, sock=self.socket)
     self.set_state("init")
Example #5
0
 def __init__(self, address):
     Socks4aConnection.__init__(self, address=address)
     TCPConnection.__init__(self, address=address, sock=self.socket)
     self.set_state("init")