Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions Interlace/lib/core/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ def process_commands(arguments):
final_commands = set()
output = OutputHelper(arguments)

ports = arguments.port.split(",")

# process targets first
if arguments.target:
ranges.add(arguments.target)
Expand Down Expand Up @@ -98,16 +100,19 @@ def process_commands(arguments):
for target in targets:
# replace flags
for command in commands:
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)
if arguments.realport:
command = str(command).replace("_realport_", arguments.realport)
final_commands.add(command)
output.terminal(Level.VERBOSE, command, "Added after processing")
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_", port)
if arguments.realport:
command = str(command).replace("_realport_", arguments.realport)
final_commands.add(command)
output.terminal(Level.VERBOSE, command, "Added after processing")

return final_commands

Expand Down