Use print() function in Python 2 and Python 3

This commit is contained in:
cclauss 2020-02-25 12:30:43 +01:00
parent 34e95a7bbd
commit 915d8328c0
3 changed files with 14 additions and 11 deletions

View file

@ -5,6 +5,7 @@
# snifffer (packet capture script) using python.
#####################################################################
from __future__ import print_function
import socket
#create an INET, raw socket
@ -14,4 +15,4 @@ s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_TCP)
while True:
# print output on terminal
print s.recvfrom(65565)
print(s.recvfrom(65565))