@@ -64,6 +64,8 @@ def process_commands(arguments):
6464 final_commands = set ()
6565 output = OutputHelper (arguments )
6666
67+ ports = arguments .port .split ("," )
68+
6769 # process targets first
6870 if arguments .target :
6971 ranges .add (arguments .target )
@@ -98,16 +100,19 @@ def process_commands(arguments):
98100 for target in targets :
99101 # replace flags
100102 for command in commands :
101- command = str (command ).replace ("_target_" , target )
102- command = str (command ).replace ("_host_" , target )
103- if arguments .output :
104- command = str (command ).replace ("_output_" , arguments .output )
105- if arguments .port :
106- command = str (command ).replace ("_port_" , arguments .port )
107- if arguments .realport :
108- command = str (command ).replace ("_realport_" , arguments .realport )
109- final_commands .add (command )
110- output .terminal (Level .VERBOSE , command , "Added after processing" )
103+ tmp_command = command
104+ for port in ports :
105+ command = tmp_command
106+ command = str (command ).replace ("_target_" , target )
107+ command = str (command ).replace ("_host_" , target )
108+ if arguments .output :
109+ command = str (command ).replace ("_output_" , arguments .output )
110+ if arguments .port :
111+ command = str (command ).replace ("_port_" , port )
112+ if arguments .realport :
113+ command = str (command ).replace ("_realport_" , arguments .realport )
114+ final_commands .add (command )
115+ output .terminal (Level .VERBOSE , command , "Added after processing" )
111116
112117 return final_commands
113118
0 commit comments