erezlevi Posted January 25, 2008 Share Posted January 25, 2008 hi I have the following code: TCPStartUp() Dim $szServerPC = "9.148.218.20" Dim $szIPADDRESS = "9.148.218.20" Dim $nPORT = 23 Dim $ConnectedSocket = -1 $ConnectedSocket = TCPConnect($szIPADDRESS,$nPORT) sleep (600) TCPSend ($ConnectedSocket,Binary ("0xfffb18fffb1f")) sleep (10) TCPSend ($ConnectedSocket,Binary ("0xfffc20fffc23fffb27")) sleep (300) TCPSend ($ConnectedSocket,Binary ("0xfffa1f00500019fff0")) sleep (300) TCPSend ($ConnectedSocket,Binary ("0xfffa2700fff0fffa1800414e5349fff0")) sleep (300) TCPSend ($ConnectedSocket,Binary ("0xfffd03")) sleep (10) TCPSend ($ConnectedSocket,Binary ("0xfffb01fffe05fffc21")) sleep (300) tcpsend ($ConnectedSocket,Binary ("0xfffc01")) sleep (300) $r=InputBox ("","tcp source","") $m=TCPRecv ($r,2048) TCPSend ($ConnectedSocket,Binary ("0xfffd01")) sleep (300) MsgBox (0,"",$m) the part of TCPrecv does not work for me, I can't recieve the input from the other server, so I have two questions: a) how can I know which source port am I using, currently I am using netstat with inputbox to do that. how can I get the data that the server sends to my computer using TCPrecv? Link to comment Share on other sites More sharing options...
BrettF Posted January 25, 2008 Share Posted January 25, 2008 hi I have the following code: TCPStartUp() Dim $szServerPC = "9.148.218.20" Dim $szIPADDRESS = "9.148.218.20" Dim $nPORT = 23 Dim $ConnectedSocket = -1 $ConnectedSocket = TCPConnect($szIPADDRESS,$nPORT) sleep (600) TCPSend ($ConnectedSocket,Binary ("0xfffb18fffb1f")) sleep (10) TCPSend ($ConnectedSocket,Binary ("0xfffc20fffc23fffb27")) sleep (300) TCPSend ($ConnectedSocket,Binary ("0xfffa1f00500019fff0")) sleep (300) TCPSend ($ConnectedSocket,Binary ("0xfffa2700fff0fffa1800414e5349fff0")) sleep (300) TCPSend ($ConnectedSocket,Binary ("0xfffd03")) sleep (10) TCPSend ($ConnectedSocket,Binary ("0xfffb01fffe05fffc21")) sleep (300) tcpsend ($ConnectedSocket,Binary ("0xfffc01")) sleep (300) $r=InputBox ("","tcp source","") $m=TCPRecv ($r,2048) TCPSend ($ConnectedSocket,Binary ("0xfffd01")) sleep (300) MsgBox (0,"",$m) the part of TCPrecv does not work for me, I can't recieve the input from the other server, so I have two questions: a) how can I know which source port am I using, currently I am using netstat with inputbox to do that. how can I get the data that the server sends to my computer using TCPrecv? Shove the TCPRecive into a while loop, and do an if statement like if $m <> "" Then ExitLoop. Should work... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! 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