now check base64 after bool check
parent
c562fabbbd
commit
7199b0e5da
|
@ -239,12 +239,12 @@ class OnionrCommunicate:
|
||||||
for i in peerList:
|
for i in peerList:
|
||||||
hasher = hashlib.sha3_256()
|
hasher = hashlib.sha3_256()
|
||||||
data = self.performGet('getData', i, hash)
|
data = self.performGet('getData', i, hash)
|
||||||
|
if data == False or len(data) > 10000000:
|
||||||
|
continue
|
||||||
try:
|
try:
|
||||||
base64.b64decode(data)
|
base64.b64decode(data)
|
||||||
except binascii.Error:
|
except binascii.Error:
|
||||||
data = b''
|
data = b''
|
||||||
if data == False or len(data) > 10000000:
|
|
||||||
continue
|
|
||||||
hasher.update(data)
|
hasher.update(data)
|
||||||
digest = hasher.hexdigest()
|
digest = hasher.hexdigest()
|
||||||
if type(digest) is bytes:
|
if type(digest) is bytes:
|
||||||
|
|
Loading…
Reference in New Issue