Update package versions to 2019.2.15 and fix flake8
Change-Id: I491a6f23065189390f7287b1ce756ac5e88d2b99
diff --git a/scripts/sniffer.py b/scripts/sniffer.py
index 8657f8a..72ccbb9 100644
--- a/scripts/sniffer.py
+++ b/scripts/sniffer.py
@@ -1,3 +1,8 @@
+"""
+This is a WIP script.
+Work is halted,
+due to incompatibility between Mac OS X and Linux on how to handle network
+"""
import binascii
import socket
import struct
@@ -118,21 +123,22 @@
# Capture packets from network
pkt = s.recvfrom(65565)
- print "\n\n=== [+] ------------ Ethernet Header----- [+]"
+ print("\n\n=== [+] ------------ Ethernet Header----- [+]")
# print data on terminal
for i in u.eth_header(pkt[0][0:14]).items():
a, b = i
- print "{} : {} | ".format(a, b),
- print "\n=== [+] ------------ IP Header ------------[+]"
+ print("{} : {} | ".format(a, b))
+ print("\n=== [+] ------------ IP Header ------------[+]")
for i in u.ip_header(pkt[0][14:34]).items():
a, b = i
- print "{} : {} | ".format(a, b),
- print "\n== [+] ------------ Tcp Header ----------- [+]"
+ print("{} : {} | ".format(a, b))
+ print("\n== [+] ------------ Tcp Header ----------- [+]")
+
for i in u.tcp_header(pkt[0][34:54]).items():
a, b = i
- print "{} : {} | ".format(a, b),
- print "\n===== Data ===="
- print pkt[0][54:]
- print "\n======="
- print pkt[1:]
+ print("{} : {} | ".format(a, b))
+ print("\n===== Data ====")
+ print(pkt[0][54:])
+ print("\n=======")
+ print(pkt[1:])