commit
298adb8541
|
@ -383,9 +383,9 @@ class objectProcessor(threading.Thread):
|
||||||
signatureLength, signatureLengthLength = decodeVarint(
|
signatureLength, signatureLengthLength = decodeVarint(
|
||||||
data[readPosition:readPosition + 10])
|
data[readPosition:readPosition + 10])
|
||||||
readPosition += signatureLengthLength
|
readPosition += signatureLengthLength
|
||||||
signature = data[readPosition:readPosition + signatureLength]
|
signature = bytes(data[readPosition:readPosition + signatureLength])
|
||||||
if highlevelcrypto.verify(
|
if highlevelcrypto.verify(
|
||||||
data[8:endOfSignedDataPosition],
|
bytes(data[8:endOfSignedDataPosition]),
|
||||||
signature, hexlify(publicSigningKey)):
|
signature, hexlify(publicSigningKey)):
|
||||||
logger.debug('ECDSA verify passed (within processpubkey)')
|
logger.debug('ECDSA verify passed (within processpubkey)')
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -30,7 +30,7 @@ def makeCryptor(privkey):
|
||||||
def hexToPubkey(pubkey):
|
def hexToPubkey(pubkey):
|
||||||
"""Convert a pubkey from hex to binary"""
|
"""Convert a pubkey from hex to binary"""
|
||||||
pubkey_raw = a.changebase(pubkey[2:], 16, 256, minlen=64)
|
pubkey_raw = a.changebase(pubkey[2:], 16, 256, minlen=64)
|
||||||
pubkey_bin = '\x02\xca\x00 ' + pubkey_raw[:32] + '\x00 ' + pubkey_raw[32:]
|
pubkey_bin = '\x02\xca\x00 '.encode('raw_unicode_escape') + pubkey_raw[:32] + '\x00 '.encode() + pubkey_raw[32:]
|
||||||
return pubkey_bin
|
return pubkey_bin
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -468,8 +468,6 @@ class BMProto(AdvancedDispatcher, ObjectTracker):
|
||||||
return self.decode_payload_content("LQIQ16sH")
|
return self.decode_payload_content("LQIQ16sH")
|
||||||
|
|
||||||
def bm_command_addr(self):
|
def bm_command_addr(self):
|
||||||
# print('+++++++++++++++++++++++++++\
|
|
||||||
# bm_command_addr bm_command_addr bm_command_addr ++++++++++++++++')
|
|
||||||
"""Incoming addresses, process them"""
|
"""Incoming addresses, process them"""
|
||||||
addresses = self._decode_addr() # pylint: disable=redefined-outer-name
|
addresses = self._decode_addr() # pylint: disable=redefined-outer-name
|
||||||
for i in addresses:
|
for i in addresses:
|
||||||
|
|
|
@ -326,6 +326,7 @@ def assembleVersionMessage(remoteHost, remotePort, participatingStreams, server=
|
||||||
# = 127.0.0.1. This will be ignored by the remote host. The actual remote connected IP will be used.
|
# = 127.0.0.1. This will be ignored by the remote host. The actual remote connected IP will be used.
|
||||||
#python3 need to check
|
#python3 need to check
|
||||||
payload += '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF'.encode('raw_unicode_escape') + pack('>L', 2130706433)
|
payload += '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF'.encode('raw_unicode_escape') + pack('>L', 2130706433)
|
||||||
|
|
||||||
# we have a separate extPort and incoming over clearnet
|
# we have a separate extPort and incoming over clearnet
|
||||||
# or outgoing through clearnet
|
# or outgoing through clearnet
|
||||||
extport = BMConfigParser().safeGetInt('bitmessagesettings', 'extport')
|
extport = BMConfigParser().safeGetInt('bitmessagesettings', 'extport')
|
||||||
|
|
Reference in New Issue
Block a user