We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 489a1ee commit 6f82e88Copy full SHA for 6f82e88
run/pcap2john.py
@@ -1227,12 +1227,12 @@ def pcap_parser_ah(fname):
1227
# zero mutable fields (tos, flags, chksum)
1228
salt[1] = 0 # tos
1229
salt[6] = 0 # flags
1230
- salt[10:12] = "\x00\x00" # checksum
+ salt[10:12] = b"\x00\x00" # checksum
1231
icv_offset = iphdr_len + icv_length
1232
h = salt[icv_offset:icv_offset+icv_length]
1233
# zero ah icv
1234
- salt[icv_offset:icv_offset+icv_length] = "\x00" * icv_length
1235
- sys.stdout.write("$net-ah$0$%s$%s\n" % (hexlify(salt), hexlify(h)))
+ salt[icv_offset:icv_offset+icv_length] = b"\x00" * icv_length
+ sys.stdout.write("$net-ah$0$%s$%s\n" % (hexlify(salt).decode('ascii'), hexlify(h).decode('ascii')))
1236
1237
f.close()
1238
0 commit comments