Schatten Posted November 5, 2006 Share Posted November 5, 2006 (edited) I read in some forums and found out that some people may want to use telnet with autoit. So i scripted a telnet client with autoit most of the comments are written in german expandcollapse popup#include <GUIConstants.au3> ;TCP starten TCPStartup () ;GUI Creation GuiCreate("Telnet Client", 500, 390,-1, -1 ) ;----------> GUI Control Creation Anfang <---------- ;Edit Control für Chat Text $Edit = GuiCtrlCreateEdit("", 10, 10, 480, 330) ;Input Control für Chat Text Eingabe $Input = GuiCtrlCreateInput("", 10, 360, 480, 20) ;-----------> GUI Control Creation Ende <----------- ;GUI sichtbar machen GUISetState () ;Client Hostname auflösen $Host = TCPNameToIP ( "THE HOST YOU WANT TO CONNECT TO" ) ;<<<<<<<<<< change the host ;Mit Host Connecten $Conection = TCPConnect ( $Host, THE PORT OF THE HOST ) ;<<<<<<<<<< change the port If @error Then Exit While 1 $msg = GuiGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit $recv = TCPRecv ( $Conection,2048 ) If $recv <> "" Then $text = GUICtrlRead ( $Edit ) GUICtrlSetData ( $Edit,$text & $recv ) ControlSend ( "Telnet Client","", $Edit, "{ENTER}") EndIf If $msg = $Input Then $text = GUICtrlRead ( $Edit ) $eingabe = GUICtrlRead ( $Input ) GUICtrlSetData ( $Edit, $text & $eingabe ) GUICtrlSetData ( $Input, "" ) ControlSend ( "Telnet Client","", $Edit, "{ENTER}") TCPSend ( $Conection, $eingabe & Chr ( 10 ) ) If @error Then MsgBox (0,"","Error") Exit EndIf EndIf WEnd you only have to change the host and the port if you want to use it if someone have some ideas for my proggy pls post Edited November 5, 2006 by Schatten Link to comment Share on other sites More sharing options...
WhiteTiger Posted November 6, 2006 Share Posted November 6, 2006 hmm , seems nice , but why edit the script ? just make a gui with a server an port inputbox , and put the userinput into 2 variabels , so the user can give in all the info in the gui , if you need help , i would be my pleasure :-) Link to comment Share on other sites More sharing options...
Schatten Posted November 6, 2006 Author Share Posted November 6, 2006 thats easy to add a gui for that but i was to lazy to do Link to comment Share on other sites More sharing options...
Schatten Posted November 6, 2006 Author Share Posted November 6, 2006 (edited) puh... that was hard... I added two script lines, lol now the proggy has a little (poor) interface for host and port input expandcollapse popup#include <GUIConstants.au3> ;TCP starten TCPStartup () ;GUI Creation GuiCreate("Telnet Client", 500, 390,-1, -1 ) ;----------> GUI Control Creation Anfang <---------- ;Edit Control für Chat Text $Edit = GuiCtrlCreateEdit("", 10, 10, 480, 330) ;Input Control für Chat Text Eingabe $Input = GuiCtrlCreateInput("", 10, 360, 480, 20) ;-----------> GUI Control Creation Ende <----------- ;user input for host and port $HostI = InputBox ( "Telnet Client", "Please enter the name of the host you want to connect to" ) $PortI = InputBox ( "Telnet Client", "Please enter the port of the host" ) ;GUI sichtbar machen GUISetState () ControlSend ( "Telnet Client","", $Edit, "{TAB}") ;Client Hostname auflösen $Host = TCPNameToIP ( $HostI ) ;Mit Host Connecten $Conection = TCPConnect ( $Host, $PortI ) If @error Then Exit While 1 $msg = GuiGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit $recv = TCPRecv ( $Conection,2048 ) If $recv <> "" Then $text = GUICtrlRead ( $Edit ) GUICtrlSetData ( $Edit,$text & $recv ) ControlSend ( "Telnet Client","", $Edit, "{ENTER}") EndIf If $msg = $Input Then $text = GUICtrlRead ( $Edit ) $eingabe = GUICtrlRead ( $Input ) GUICtrlSetData ( $Edit, $text & $eingabe ) GUICtrlSetData ( $Input, "" ) TCPSend ( $Conection, $eingabe & Chr ( 10 ) ) ControlSend ( "Telnet Client","", $Edit, "{ENTER}") If @error Then MsgBox (0,"","Error") Exit EndIf EndIf WEnd here the script for download telnet_client.au3 in the next version i will: - add functions to automate telnet commands - replace the german comments through english if you have suggestions what i could fix or do better, please post it Edited November 7, 2006 by Schatten Link to comment Share on other sites More sharing options...
ConsultingJoe Posted November 9, 2006 Share Posted November 9, 2006 I don't have anything to telnet right now but does this work well? [center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center] Link to comment Share on other sites More sharing options...
AzKay Posted November 9, 2006 Share Posted November 9, 2006 I don't have anything to telnet right now but does this work well?Its just an edit box. Basically. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
ConsultingJoe Posted November 10, 2006 Share Posted November 10, 2006 Its just an edit box. Basically.oh, so i will take that as a no. Is there going to be telnet support or not in the future?if not, does anyone know how to TCP raw telnet data?Thanks [center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center] Link to comment Share on other sites More sharing options...
Schatten Posted November 10, 2006 Author Share Posted November 10, 2006 (edited) telnet is a dos programm that only sends raw data to a server so theres no protocoll or something else. Because of that you can connect to EVERY kind of server you want. You only have to know what you have to send to the server... I think... Edited November 14, 2006 by Schatten Link to comment Share on other sites More sharing options...
Schatten Posted November 10, 2006 Author Share Posted November 10, 2006 here a server where you can try to connect to with my client: server: void.dune.net Port: 3000 the text formatting with my client is very bad but the basic functions work Link to comment Share on other sites More sharing options...
ConsultingJoe Posted November 10, 2006 Share Posted November 10, 2006 here a server where you can try to connect to with my client: server: void.dune.net Port: 3000the text formatting with my client is very bad but the basic functions workOh, it seems like it works well thanks [center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center] Link to comment Share on other sites More sharing options...
ConsultingJoe Posted November 10, 2006 Share Posted November 10, 2006 What about the line feeds? are those suposed to be there? [center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center] Link to comment Share on other sites More sharing options...
Schatten Posted November 10, 2006 Author Share Posted November 10, 2006 there should be line feeds if you connect to that server with telnet there are some Link to comment Share on other sites More sharing options...
jvanegmond Posted November 10, 2006 Share Posted November 10, 2006 oh, so i will take that as a no. Is there going to be telnet support or not in the future?if not, does anyone know how to TCP raw telnet data?ThanksYeah, Dethredic is working on Telnet chat server. He's probably got a topic around here somewhere. github.com/jvanegmond Link to comment Share on other sites More sharing options...
AzKay Posted November 10, 2006 Share Posted November 10, 2006 A bunch of people are working on them. I dont see why they are so popular all of a sudden. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
cpuobsessed Posted November 17, 2006 Share Posted November 17, 2006 What about adding SSH? Link to comment Share on other sites More sharing options...
Schatten Posted November 17, 2006 Author Share Posted November 17, 2006 ssh is a protocoll and i dont know how it works (if someone can explain me the protocoll i could try to add ssh) Link to comment Share on other sites More sharing options...
/dev/null Posted November 17, 2006 Share Posted November 17, 2006 (edited) ssh is a protocoll and i dont know how it works(if someone can explain me the protocoll i could try to add ssh)I don't want to be a smart-ass, but your code is NOT a telnet client. It's "just" a TCP client. There is more to telnet than just a TCP connection. Read the RFC for the telnet protocol to learn more about that. http://www.faqs.org/rfcs/rfc854.html. Btw: If you need a telnet server to test a real telnet client, use this list: http://www.telnet.org/htm/places.htmSSH is the secure shell protocol. You can find plenty of information about SSH here: http://en.wikipedia.org/wiki/Ssh and of course here: http://www.openssh.org/. You can use the open source code of openssh to extend your tcp client. However, that will multiply the size of your code by ~ 17.354. CheersKurt Edited November 17, 2006 by /dev/null __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Schatten Posted November 17, 2006 Author Share Posted November 17, 2006 (edited) i think that telnet is not a real protocoll but youre right, there are some telnet commands (e.g. for color). I dont know all telnet commands (in order to be honest i know none). However if anyone knows a documentation of telnet commands please post it ^^ hmm... later i'll take a look at the ssh things Edited November 17, 2006 by Schatten Link to comment Share on other sites More sharing options...
/dev/null Posted November 17, 2006 Share Posted November 17, 2006 i think that telnet is not a real protocollbut youre right, there are some telnet commands (e.g. for color).well, I'm sorry to tell you that TELNET IS a protocol. Just read the RFC and you will understand....CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Schatten Posted November 17, 2006 Author Share Posted November 17, 2006 (edited) ok, ok telnet IS a protocoll thx for the links but im too lazy to read all the pages cause i have to translate it all into german but i will give my best to transform my faked telnet client to a real one maybe i will need some help Edited November 17, 2006 by Schatten 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