Skip to content
Extraits de code Groupes Projets
Valider 45e2d316 rédigé par François De Keersmaeker's avatar François De Keersmaeker
Parcourir les fichiers

Fixed imports

parent fcface94
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Initialization script for package `pcap_fuzzer`. Initialization script for package `pcap_fuzzer`.
""" """
from pcap_fuzzer import fuzz_pcaps from .pcap_fuzzer import fuzz_pcaps
__all__ = [ __all__ = [
"fuzz_pcaps" "fuzz_pcaps"
......
...@@ -14,7 +14,7 @@ import scapy.all as scapy ...@@ -14,7 +14,7 @@ import scapy.all as scapy
from scapy.layers import dhcp, dns, http from scapy.layers import dhcp, dns, http
from scapy.contrib import coap, igmp, igmpv3 from scapy.contrib import coap, igmp, igmpv3
# Custom Packet utilities # Custom Packet utilities
from packet.Packet import Packet from .packet.Packet import Packet
def strictly_positive_int(value: any) -> int: def strictly_positive_int(value: any) -> int:
...@@ -61,7 +61,7 @@ def fuzz_pcaps(pcaps: Union[str, list], output: str, random_range: int = 1, pack ...@@ -61,7 +61,7 @@ def fuzz_pcaps(pcaps: Union[str, list], output: str, random_range: int = 1, pack
:param dry_run: if True, do not write output PCAP file :param dry_run: if True, do not write output PCAP file
""" """
# If input PCAP is a single file, convert to list of one element # If input PCAP is a single file, convert to list of one element
pcaps = [pcaps] if isinstance(pcaps) != list else pcaps pcaps = [pcaps] if not isinstance(pcaps, list) else pcaps
# Loop on given input PCAP files # Loop on given input PCAP files
for input_pcap in pcaps: for input_pcap in pcaps:
...@@ -166,9 +166,6 @@ if __name__ == "__main__": ...@@ -166,9 +166,6 @@ if __name__ == "__main__":
if args.output is not None and len(args.input_pcaps) > 1: if args.output is not None and len(args.input_pcaps) > 1:
logging.warning("Multiple input PCAP files specified, ignoring output PCAP file name.") logging.warning("Multiple input PCAP files specified, ignoring output PCAP file name.")
print(args.input_pcaps)
exit()
### MAIN PROGRAM ### ### MAIN PROGRAM ###
fuzz_pcaps( fuzz_pcaps(
......
...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages ...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup( setup(
name='pcap_fuzzer', name='pcap_fuzzer',
version='0.2.0', version='0.3.0',
author='François De Keersmaeker', author='François De Keersmaeker',
author_email='francois.dekeersmaeker@uclouvain.be', author_email='francois.dekeersmaeker@uclouvain.be',
description='Randomly edit packet fields in a PCAP file.', description='Randomly edit packet fields in a PCAP file.',
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter