Upon receiving bad data from peer (bad magic bytes) print the data to console for analysis
This commit is contained in:
parent
3d78ece84e
commit
9d385a290d
|
@ -312,6 +312,7 @@ class receiveDataThread(QThread):
|
||||||
if verbose >= 2:
|
if verbose >= 2:
|
||||||
printLock.acquire()
|
printLock.acquire()
|
||||||
sys.stderr.write('The magic bytes were not correct. First 40 bytes of data: %s\n' % repr(self.data[0:40]))
|
sys.stderr.write('The magic bytes were not correct. First 40 bytes of data: %s\n' % repr(self.data[0:40]))
|
||||||
|
print 'self.data:', self.data.encode('hex')
|
||||||
printLock.release()
|
printLock.release()
|
||||||
self.data = ""
|
self.data = ""
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -39,7 +39,8 @@ def readSent():
|
||||||
cur.execute(item, parameters)
|
cur.execute(item, parameters)
|
||||||
output = cur.fetchall()
|
output = cur.fetchall()
|
||||||
for row in output:
|
for row in output:
|
||||||
print row
|
msgid, toaddress, toripe, fromaddress, subject, message, ackdata, lastactiontime, status, pubkeyretrynumber, msgretrynumber, folder = row
|
||||||
|
print msgid.encode('hex'), toaddress, 'toripe:', toripe.encode('hex'), 'fromaddress:', fromaddress, 'SUBJECT:', repr(subject), 'MESSAGE:', repr(message), 'ACKDATA:', ackdata.encode('hex'), lastactiontime, status, pubkeyretrynumber, msgretrynumber, folder
|
||||||
|
|
||||||
def readSubscriptions():
|
def readSubscriptions():
|
||||||
print 'Printing everything in subscriptions table:'
|
print 'Printing everything in subscriptions table:'
|
||||||
|
@ -90,9 +91,9 @@ def takeSentMessagesOutOfTrash():
|
||||||
#takeInboxMessagesOutOfTrash()
|
#takeInboxMessagesOutOfTrash()
|
||||||
#takeSentMessagesOutOfTrash()
|
#takeSentMessagesOutOfTrash()
|
||||||
#readInbox()
|
#readInbox()
|
||||||
#readSent()
|
readSent()
|
||||||
#readPubkeys()
|
#readPubkeys()
|
||||||
readSubscriptions()
|
#readSubscriptions()
|
||||||
#readInventory()
|
#readInventory()
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user