From cb7b2c2e137be22760eafcd1f756fa0ae33ee3dd Mon Sep 17 00:00:00 2001 From: Manuel Vergara Date: Sun, 28 Jan 2024 20:53:14 +0100 Subject: [PATCH] Update network scan --- .../14_escaneres_red/02_network_scanner_arp.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/python-ofensivo/14_escaneres_red/02_network_scanner_arp.py b/python-ofensivo/14_escaneres_red/02_network_scanner_arp.py index 44c6f3f..46eff40 100644 --- a/python-ofensivo/14_escaneres_red/02_network_scanner_arp.py +++ b/python-ofensivo/14_escaneres_red/02_network_scanner_arp.py @@ -8,6 +8,9 @@ import argparse def get_arguments(): + """ + Obtiene los argumentos de la línea de comandos + """ parser = argparse.ArgumentParser(description='Escaner de red ARP') parser.add_argument( @@ -21,6 +24,9 @@ def get_arguments(): def scan(ip): + """ + Escanea la red en busca de hosts + """ arp_packet = scapy.ARP(pdst=ip) broadcast_packet = scapy.Ether(dst='ff:ff:ff:ff:ff:ff') @@ -34,6 +40,9 @@ def scan(ip): print(response) def main(): + """ + Función principal + """ target = get_arguments() scan(target)