salesforce / jarm

BSD 3-Clause "New" or "Revised" License
1.17k stars 143 forks source link

Destination Port should be logged #13

Open davan77 opened 2 years ago

davan77 commented 2 years ago

It turns out that the destination port can be important. I can provide examples of several IPs which produce different JARM hash results depending on the port chosen. I believe the following changes would include logging of that port:

510: file.write('{"host":"' + destination_host + '","ip":"' + ip +'","destination_port":"' + str(destination_port) +'","result":"' + result + '"')

512: file.write(destination_host + "," + ip + "," + str(destination_port) + "," + result)

528: sys.stdout.write('{"host":"' + destination_host + '","ip":"' + ip +'","destination_port":"' + str(destination_port) +'","result":"' + result + '"')

532: print("Port: " + str(destination_port))

536: sys.stdout.write('{"host":"' + destination_host + '","ip":null,"result":"' + result + '"')