mirror of
https://github.com/codingo/Interlace.git
synced 2025-12-17 23:04:24 +01:00
EOD push
This commit is contained in:
@@ -28,7 +28,7 @@ class InputHelper(object):
|
|||||||
else:
|
else:
|
||||||
for target in arguments.target_list:
|
for target in arguments.target_list:
|
||||||
targets.add(target.strip())
|
targets.add(target.strip())
|
||||||
print('[DEBUG] Added Target')
|
print('[DEBUG] Added Target %s' % target.strip())
|
||||||
|
|
||||||
# take list of targets and expand CIDR / comma notation
|
# take list of targets and expand CIDR / comma notation
|
||||||
if not arguments.nocidr:
|
if not arguments.nocidr:
|
||||||
@@ -43,27 +43,30 @@ class InputHelper(object):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def process_commands(arguments):
|
def process_commands(arguments):
|
||||||
commands = set()
|
commands = set()
|
||||||
|
final_commands = set()
|
||||||
|
|
||||||
print("[DEBUG] Commands argument: %s" % arguments.command)
|
print("[DEBUG] Commands argument: %s" % arguments.command)
|
||||||
if arguments.command:
|
if arguments.command:
|
||||||
commands.add(arguments.command)
|
commands.add(arguments.command)
|
||||||
print("[DEBUG] Added command")
|
print("[DEBUG] Added command %s" % arguments.command)
|
||||||
else:
|
else:
|
||||||
for command in arguments.command_list:
|
for command in arguments.command_list:
|
||||||
commands.add(command.strip())
|
commands.add(command.strip())
|
||||||
print("[DEBUG] Added command")
|
print("[DEBUG] Added command %s" % command)
|
||||||
|
|
||||||
targets = InputHelper.process_targets(arguments)
|
targets = InputHelper.process_targets(arguments)
|
||||||
|
|
||||||
for target in targets:
|
for target in targets:
|
||||||
# replace flags
|
# replace flags
|
||||||
|
print("[DEBUG] ............................................")
|
||||||
for command in commands:
|
for command in commands:
|
||||||
command = command.replace("_target_", target)
|
command = command.replace("_target_", target)
|
||||||
command = command.replace("_output_", arguments.output)
|
command = command.replace("_output_", arguments.output)
|
||||||
command = command.replace("_port_", arguments.port)
|
command = command.replace("_port_", arguments.port)
|
||||||
command = command.replace("_realport_", arguments.realport)
|
command = command.replace("_realport_", arguments.realport)
|
||||||
commands.add(command)
|
final_commands.add(command)
|
||||||
print("[DEBUG] Added command")
|
print("[DEBUG] Added final command %s" % command)
|
||||||
return commands
|
return final_commands
|
||||||
|
|
||||||
|
|
||||||
class InputParser(object):
|
class InputParser(object):
|
||||||
|
|||||||
Reference in New Issue
Block a user