mirror of
https://github.com/codingo/Interlace.git
synced 2025-12-17 06:44:23 +01:00
Added in port parsing with comma delimiter
This commit is contained in:
@@ -64,6 +64,8 @@ class InputHelper(object):
|
||||
final_commands = set()
|
||||
output = OutputHelper(arguments)
|
||||
|
||||
ports = arguments.port.split(",")
|
||||
|
||||
# process targets first
|
||||
if arguments.target:
|
||||
ranges.add(arguments.target)
|
||||
@@ -98,12 +100,15 @@ class InputHelper(object):
|
||||
for target in targets:
|
||||
# replace flags
|
||||
for command in commands:
|
||||
tmp_command = command
|
||||
for port in ports:
|
||||
command = tmp_command
|
||||
command = str(command).replace("_target_", target)
|
||||
command = str(command).replace("_host_", target)
|
||||
if arguments.output:
|
||||
command = str(command).replace("_output_", arguments.output)
|
||||
if arguments.port:
|
||||
command = str(command).replace("_port_", arguments.port)
|
||||
command = str(command).replace("_port_", port)
|
||||
if arguments.realport:
|
||||
command = str(command).replace("_realport_", arguments.realport)
|
||||
final_commands.add(command)
|
||||
|
||||
Reference in New Issue
Block a user