@@ -64,6 +64,8 @@ def process_commands(arguments):
64
64
final_commands = set ()
65
65
output = OutputHelper (arguments )
66
66
67
+ ports = arguments .port .split ("," )
68
+
67
69
# process targets first
68
70
if arguments .target :
69
71
ranges .add (arguments .target )
@@ -98,16 +100,19 @@ def process_commands(arguments):
98
100
for target in targets :
99
101
# replace flags
100
102
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" )
111
116
112
117
return final_commands
113
118
0 commit comments