Failed arg

This commit is contained in:
2024-05-05 23:40:45 +02:00
parent a490365265
commit 3303730513

View File

@@ -17,7 +17,7 @@ def parseArguments():
parser = argparse.ArgumentParser(description='Ejemplo de script con flags') parser = argparse.ArgumentParser(description='Ejemplo de script con flags')
# Agregar los argumentos con sus respectivos flags # Agregar los argumentos con sus respectivos flags
parser.add_argument('-W', '--web', action='store', dest='web', help='Indicar un archivo con lista de Webs') parser.add_argument('-F', '--fail', action='store', dest='failed', help='Indicar un archivo con lista de Fails')
parser.add_argument('-H', '--host', action='store', dest='host', help='Indicar un archivo con lista de hosts') parser.add_argument('-H', '--host', action='store', dest='host', help='Indicar un archivo con lista de hosts')
try: try:
@@ -83,7 +83,7 @@ if __name__ == '__main__':
fails = set() fails = set()
if args.host: if args.host:
ips_and_hosts.update(toIP(read_document(args.host))) ips_and_hosts.update(toIP(read_document(args.host)))
fails.update(toIP(read_document("failed.txt"))) fails.update(toIP(read_document(args.failed)))
if args.web: if args.web:
print("Hay webs") print("Hay webs")
# Parsear correctamente # Parsear correctamente