clean up unused Python imports (#454)
* Remove unused python imports These changes have been auto-generated with: pip3 install isort autoflake isort -rc -sl . autoflake --remove-all-unused-imports -i -r . isort -rc -m 3 . Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org> * python: remove redundant parenthesis Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
This commit is contained in:
committed by
GitHub
parent
50f397b249
commit
d84179e42f
@@ -1,11 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
import sys
|
||||
import struct
|
||||
|
||||
from scapy.all import sniff, sendp, hexdump, get_if_list, get_if_hwaddr
|
||||
from scapy.all import Packet
|
||||
from scapy.all import IP, UDP, Raw
|
||||
from scapy.layers.inet import _IPOption_HDR
|
||||
from scapy.all import get_if_list, sniff
|
||||
|
||||
|
||||
def get_if():
|
||||
ifs=get_if_list()
|
||||
@@ -28,7 +25,7 @@ def handle_pkt(pkt):
|
||||
|
||||
def main():
|
||||
iface = 'eth0'
|
||||
print(("sniffing on %s" % iface))
|
||||
print("sniffing on %s" % iface)
|
||||
sys.stdout.flush()
|
||||
sniff(filter="udp and port 4321", iface = iface,
|
||||
prn = lambda x: handle_pkt(x))
|
||||
|
||||
@@ -1,19 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
import socket
|
||||
import random
|
||||
import struct
|
||||
|
||||
from scapy.all import sendp, send, hexdump, get_if_list, get_if_hwaddr
|
||||
from scapy.all import Packet, IPOption
|
||||
from scapy.all import Ether, IP, UDP
|
||||
from scapy.all import IntField, FieldListField, FieldLenField, ShortField
|
||||
from scapy.layers.inet import _IPOption_HDR
|
||||
|
||||
import sys
|
||||
from time import sleep
|
||||
|
||||
from scapy.all import IP, UDP, Ether, get_if_hwaddr, get_if_list, sendp
|
||||
|
||||
|
||||
def get_if():
|
||||
ifs=get_if_list()
|
||||
iface=None # "h1-eth0"
|
||||
|
||||
Reference in New Issue
Block a user