Tim Net Posted March 24, 2009 Share Posted March 24, 2009 I have a public server which has 13 IP addresses on it. When my scripts make an inetget or process a request using tcpsend, the traffic always sources from the base IP on the machine. How can I get my scripts to source it's traffoc from the seconds, third, fourth, etc IP bound to the NIC? NetCat(nc.exe) can assign the source port with the -s argument. Is there any way to bind to a specific outbound source port? Thanks, Tim Link to comment Share on other sites More sharing options...
Zachlr Posted March 28, 2009 Share Posted March 28, 2009 (edited) TCPListen(Desired IP, port) TCPListen(192.168.1.100, 80) So if you want to listen on the IP address 192.168.1.104, port 80 then do TCPListen(192.168.1.104, 80) You can also use @IPaddress1 @IPaddress2, and so on through 4 to automatically detect the address. Same goes for UDPBind() Oh and next time please use the General Help forum. This forum is for example scripts. TCPListen returns the main socket. So ultimately you will want to do $mainsocket = TCPListen(192.168.1.104, 80) Do $connectedsocket = TCPAccept($mainsocket) Until $connectedsocket <> -1 TCPSend($connectedsocket, "send data") Edited March 28, 2009 by Zachlr Link to comment Share on other sites More sharing options...
Xand3r Posted March 29, 2009 Share Posted March 29, 2009 afaik you can't do that with autoit Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now