diff --git a/Interlace/lib/core/input.py b/Interlace/lib/core/input.py index 57b7327..c88d99f 100644 --- a/Interlace/lib/core/input.py +++ b/Interlace/lib/core/input.py @@ -53,13 +53,17 @@ class InputHelper(object): for target in targets: # replace flags print("[DEBUG] ............................................") + print("[DEBUG] Commend length: %s" % len(commands)) for command in commands: - command = command.replace("_target_", target) - command = command.replace("_output_", arguments.output) - command = command.replace("_port_", arguments.port) - command = command.replace("_realport_", arguments.realport) + command = str(command).replace("_target_", 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) - print("[DEBUG] Added final command %s" % command) + print("[DEBUG] Added final command %s" % str(command)) return final_commands diff --git a/output.txt b/output.txt new file mode 100644 index 0000000..368aed7 --- /dev/null +++ b/output.txt @@ -0,0 +1,20 @@ +PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data. + +PING 10.0.0.4 (10.0.0.4) 56(84) bytes of data. + +PING 10.0.0.3 (10.0.0.3) 56(84) bytes of data. + +PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data. + +--- 10.0.0.1 ping statistics --- +70 packets transmitted, 0 received, 100% packet loss, time 728ms + +--- 10.0.0.4 ping statistics --- +70 packets transmitted, 0 received, 100% packet loss, time 728ms + +--- 10.0.0.3 ping statistics --- +70 packets transmitted, 0 received, 100% packet loss, time 728ms + +--- 10.0.0.2 ping statistics --- +70 packets transmitted, 0 received, 100% packet loss, time 728ms +