def mangleException(self, pkt, reason=''):
self.notifyBad('\nFENRIR PANIC : Process failed during MANGLING', 1, 1)
if reason != '':
self.notifyBad('Reason : ' + reason, 1)
self.notify('Packet was logged to errorLogFile : FENRIR.err', 1)
logfd = open('FENRIR.err', 'a')
logfd.write(
'---DUMP BEGINS--------------------------------------------------------------------------------------\n')
logfd.write(
'[*] Packet header SRC : ' + pkt[IP].src + ' (' + pkt[Ether].src + ') DST : ' + pkt[IP].dst + ' (' + pkt[
Ether].dst + ')\n')
logfd.write('Packet dump :\n')
logfd.write(str(ls(pkt)) + '\n')
logfd.write(
'---DUMP ENDS----------------------------------------------------------------------------------------\n')
logfd.close()
## fenrirPanic : unrecoverable exception handling ##
评论列表
文章目录