0

Is there a way I could create a wrapper to execute a python script that would bind to multiple source addresses defined on the local client that executes the script? I would not mind having the wrapper execute the script for each source address but not sure if this is possible.

Rather than executing a single script from multiple virtual machines, I would like to do this similar to how curl-loader works but executing my own script. I don not believe curl-loader has a function to execute scripts arbitrary scripts.

If a wrapper is not possible, maybe i could edit the script itself to bind to multiple source addresses however i am testing multiple scripts so i would have to modify each one, so this is the reason i am looking for a wrapper.

Sylvain Leroux
  • 50,096
  • 7
  • 103
  • 125
  • See [Source interface with Python and urllib2](http://stackoverflow.com/questions/1150332/source-interface-with-python-and-urllib2). – falsetru Aug 11 '13 at 15:25
  • Your use of "source address" and "client" are puzzling. Could you please edit the question to explain what you mean by these uses of terminology? Usually a server binds a port, and a client connects by sending a packet which contains the client's IP address in the IP "source address" field. – tripleee Aug 11 '13 at 19:48
  • I am sorry let me elaborate. – ehmueller Aug 12 '13 at 14:56
  • I am sorry let me elaborate. I have scripts that generate traffic used for security testing at my job. These scripts utilize my virtual machines source IP address however I need them to simulate multiple source IP addresses as if the traffic was coming from multiple virtual machines. Instead of me editing each script, I was hoping there was a way I could write a python wrapper that would execute a single script multiple times using multiple source IP addresses that would be configured on my virtual machine. If this is not possible then I would need to edit each script manually. – ehmueller Aug 12 '13 at 15:03

0 Answers0