cembry90 Posted May 2, 2009 Posted May 2, 2009 (edited) Hey. I can't post this in the correct forum so hopefully I wont get the banz0r for posting here. This is a contribution for teamspeak admins to use on their servers. Enjoy!YATAT.rar, 297 KBNOTE TO SCRIPTERS: I attempted to use this as a universal Telnet tool but it doesn't work, so I commented out the necessary areas for this to be Teamspeak-specific.PS: I gurantee this is 100% virus/malware/trojan/etc - free. I have also posted the source if you want to compile it yourself or modify it.~Chris[edit: fixed a typo]expandcollapse popup#cs YATAT - Yet Another Teamspeak Admin Tool Chris Embry cembry90@aol.com #ce #include<Constants.au3> #include<GUIConstantsEx.au3> #include<WindowsConstants.au3> #include<EditConstants.au3> #include<StaticConstants.au3> #include <TreeViewConstants.au3> $gui = GUICreate("Telnet Tool", 800, 300) GUICtrlCreateLabel("IP", 1, 1, 30, 20) GUICtrlCreateLabel("Port", 1, 21, 30, 20) GUICtrlCreateLabel("Serv Port", 151, 1, 70, 40) ;GUICtrlCreateLabel("Serv", 171, 1, 35, 40) ;GUICtrlCreateLabel("Port", 171, 21, 35, 40) GUICtrlCreateLabel("Name", 341, 1, 30, 20) GUICtrlCreateLabel("Pass", 341, 21, 30, 20) ;$ts = GUICtrlCreateCheckbox("Teamspeak?", 201, 21, 80, 20) ;GuiCtrlSetState($ts, $GUI_UNCHECKED) $te = 0 Local $e1 Local $e2 Local $e3 Local $e4 Local $e5 Local $li Local $w1 Local $x1 $ini = "settings.ini" if not FileExists($ini) Then IniWrite($ini, "conf", "warn", "1") MsgBox(0, "Warning!", "Please be sure the server you are" & @CRLF & "attempting to establish a connection with exists" & @CRLF & "to ensure this progam functions correctly." & @CRLF & @CRLF & "This program will not warn you again unless" & @CRLF & "the settings file is moved, renamed, or deleted.") EndIf $ag = 0 $in = IniRead($ini, "conf", "read", -1) if FileExists($ini) Then $ip = IniRead($ini, "conf", "IP", 0) $po = IniRead($ini, "conf", "PO", 0) $sv = IniRead($ini, "conf", "SV", 0) $un = IniRead($ini, "conf", "UN", 0) $up = IniRead($ini, "conf", "UP", 0) Else $ip = "" $po = "" $sv = "" $un = "" $up = "" EndIf $ip = GUICtrlCreateInput($ip, 31, 1, 90, 20) $po = GUICtrlCreateInput($po, 31, 21, 90, 20) $sv = GUICtrlCreateInput($sv, 201, 1, 90, 20) $un = GUICtrlCreateInput($un, 371, 1, 90, 20) $up = GUICtrlCreateInput($up, 371, 21, 90, 20, $ES_PASSWORD) ;GUICtrlSetState($sv, $GUI_DISABLE) ;GUICtrlSetState($un, $GUI_DISABLE) ;GUICtrlSetState($up, $GUI_DISABLE) $co = GUICtrlCreateButton("START", 511, 1, 40, 40) $ou = GUICtrlCreateEdit("", 1, 41, 580, 220, $WS_HSCROLL + $WS_VSCROLL) $cm = GUICtrlCreateInput("", 1, 261, 540, 20) $cs = GUICtrlCreateButton("Send", 541, 261, 40, 20) GUISetState(@SW_SHOW, $gui) While 1 $msg = GUIGetMsg($gui) Select Case $msg = $co GUICtrlDelete($co) $dc = GUICtrlCreateButton("STOP", 551, 1, 40, 40) $c1 = GUICtrlRead($ip) $c2 = GUICtrlRead($po) $c3 = GUICtrlRead($sv) $c4 = GUICtrlRead($un) $c5 = GUICtrlRead($up) di() $ic = 1 IniWrite($ini, "conf", "ip", $c1) IniWrite($ini, "conf", "po", $c2) IniWrite($ini, "conf", "sv", $c3) IniWrite($ini, "conf", "un", $c4) IniWrite($ini, "conf", "up", $c5) If Not $ag = 1 Then TCPStartup() $so = TCPConnect($c1, $c2) ; If $te = 1 Then $se = TCPSend($so, "help" & @CRLF) Sleep(1) $re = TCPRecv($so, 65535) GUICtrlSetData($ou, $re) TCPSend($so, "sel " & $c3 & @CRLF) TCPSend($so, "login " & $c4 & " " & $c5 & @CRLF) Sleep(1) $re = TCPRecv($so, 65535) If $re = "OK" & @CRLF & "OK" & @CRLF Then MsgBox(0, "Login Confirmed.", "Thank you for logging in.") $li = 1 EndIf GUICtrlSetData($ou, $re & @CRLF & GUICtrlRead($ou)) $ag = 1 ; EndIf EndIf If $li = 1 Then createhelp() $li = 0 EndIf while 2 $msg = GUIGetMsg($gui) If $msg = $dc Then $ic = 0 TCPSend($so, "quit " & $c4 & " " & $c5 & @CRLF) GUICtrlDelete($dc) GUICtrlDelete($w1) GUICtrlDelete($x1) $co = GUICtrlCreateButton("START", 511, 1, 40, 40) en() $ag = 0 TCPCloseSocket($so) TCPShutdown() GUICtrlSetData($ou, "Disconnected from the server.") ExitLoop ElseIf $msg = $cs Then $cr = GUICtrlRead($cm) TCPSend($so, $cr & @CRLF) ;TCPSend($so, $cr & @CRLF);sometimes have to send twice... Sleep(1) $re = TCPRecv($so, 65535) guictrlsetdata($ou, $re & GUICtrlRead($ou)); & @CRLF & $re) ElseIf $msg = $gui_event_close Then If $ic = 1 Then MsgBox(0, "Error!", "You must disconnect before exiting.") Else Exit EndIf EndIf WEnd Case $msg = $gui_event_close Exit Case $msg = $gui_event_minimize GUISetState(@SW_MINIMIZE, $gui) Case $msg = $gui_event_restore GUISetState(@SW_RESTORE, $gui) #cs Case $msg = $ts If $te = 0 Then $te = 1 GUICtrlSetState($sv, $GUI_ENABLE) GUICtrlSetState($un, $GUI_ENABLE) GUICtrlSetState($up, $GUI_ENABLE) ElseIf $te = 1 Then $te = 0 GUICtrlSetState($sv, $GUI_DISABLE) GUICtrlSetState($un, $GUI_DISABLE) GUICtrlSetState($up, $GUI_DISABLE) EndIf #ce Endselect Sleep(1) WEnd Func di() GUICtrlSetState($ip, $GUI_DISABLE) GUICtrlSetState($po, $GUI_DISABLE) GUICtrlSetState($sv, $GUI_DISABLE) GUICtrlSetState($un, $GUI_DISABLE) GUICtrlSetState($up, $GUI_DISABLE) ; GUICtrlSetState($ts, $GUI_DISABLE) EndFunc Func en() GUICtrlSetState($ip, $GUI_ENABLE) GUICtrlSetState($po, $GUI_ENABLE) ; If $te = 1 Then GUICtrlSetState($sv, $GUI_ENABLE) GUICtrlSetState($un, $GUI_ENABLE) GUICtrlSetState($up, $GUI_ENABLE) ; EndIf ; GUICtrlSetState($ts, $GUI_ENABLE) EndFunc Func createhelp() $w1 = GuiCtrlCreateTreeView(596, 6, 200, 220) $x1 = GuiCtrlCreateTreeViewItem("Server Commands", $w1) $y1 = GuiCtrlCreateTreeViewItem("<Message>", $x1) $z1 = GuiCtrlCreateTreeViewItem("msg", $y1) $z2 = GuiCtrlCreateTreeViewItem("msgu", $y1) $z3 = GuiCtrlCreateTreeViewItem("msgall", $y1) $y2 = GuiCtrlCreateTreeViewItem("<Login>", $x1) $z4 = GuiCtrlCreateTreeViewItem("login", $y2) $z5 = GuiCtrlCreateTreeViewItem("slogin", $y2) $y3 = GuiCtrlCreateTreeViewItem("<Account/Player>", $x1) $z6 = GuiCtrlCreateTreeViewItem("pl", $y3) $z7 = GuiCtrlCreateTreeViewItem("mptc", $y3) $z8 = GuiCtrlCreateTreeViewItem("pi", $y3) $z9 = GuiCtrlCreateTreeViewItem("dbpi", $y3) $z10 = GuiCtrlCreateTreeViewItem("fp", $y3) $z11 = GuiCtrlCreateTreeViewItem("dbfp", $y3) $z12 = GuiCtrlCreateTreeViewItem("sppriv", $y3) $z13 = GuiCtrlCreateTreeViewItem("dbuserlist", $y3) $z14 = GuiCtrlCreateTreeViewItem("dbuseradd", $y3) $z15 = GuiCtrlCreateTreeViewItem("dbuserdel", $y3) $z16 = GuiCtrlCreateTreeViewItem("dbuserchangepw", $y3) $z17 = GuiCtrlCreateTreeViewItem("dbuserchangeattribs", $y3) $z18 = GuiCtrlCreateTreeViewItem("dbuserid", $y3) $z19 = GuiCtrlCreateTreeViewItem("dbsuserlist", $y3) $z20 = GuiCtrlCreateTreeViewItem("dbsuseradd", $y3) $z21 = GuiCtrlCreateTreeViewItem("dbsuserdel", $y3) $z22 = GuiCtrlCreateTreeViewItem("dbsuserchangepw", $y3) $y4 = GuiCtrlCreateTreeViewItem("<Ban/Kick>", $x1) $z23 = GuiCtrlCreateTreeViewItem("kick", $y4) $z24 = GuiCtrlCreateTreeViewItem("removeclient", $y4) $z25 = GuiCtrlCreateTreeViewItem("ki", $y4) $z26 = GuiCtrlCreateTreeViewItem("banlist", $y4) $z27 = GuiCtrlCreateTreeViewItem("banadd", $y4) $z28 = GuiCtrlCreateTreeViewItem("bandel", $y4) $z29 = GuiCtrlCreateTreeViewItem("banclear", $y4) $z30 = GuiCtrlCreateTreeViewItem("banplayer", $y4) $y5 = GuiCtrlCreateTreeViewItem("<Server/Channel>", $x1) $z31 = GuiCtrlCreateTreeViewItem("sl", $y5) $z32 = GuiCtrlCreateTreeViewItem("cl", $y5) $z33 = GuiCtrlCreateTreeViewItem("sel", $y5) $z34 = GuiCtrlCreateTreeViewItem("si", $y5) $z35 = GuiCtrlCreateTreeViewItem("fc", $y5) $z36 = GuiCtrlCreateTreeViewItem("ci", $y5) $z37 = GuiCtrlCreateTreeViewItem("dbci", $y5) $z38 = GuiCtrlCreateTreeViewItem("dccl", $y5) $z39 = GuiCtrlCreateTreeViewItem("dbserverlist", $y5) $y6 = GuiCtrlCreateTreeViewItem("<Conn Info>", $x1) $z40 = GuiCtrlCreateTreeViewItem("ver", $y6) $z41 = GuiCtrlCreateTreeViewItem("gi", $y6) $z42 = GuiCtrlCreateTreeViewItem("gapl", $y6) $z43 = GuiCtrlCreateTreeViewItem("log", $y6) $z44 = GuiCtrlCreateTreeViewItem("logfind", $y6) $z45 = GuiCtrlCreateTreeViewItem("logmark", $y6) $y7 = GuiCtrlCreateTreeViewItem("<Start/Stop>", $x1) $z46 = GuiCtrlCreateTreeViewItem("serverstart", $y7) $z47 = GuiCtrlCreateTreeViewItem("serverstop", $y7) $z48 = GuiCtrlCreateTreeViewItem("serveradd", $y7) $z49 = GuiCtrlCreateTreeViewItem("serverdel", $y7) $z50 = GuiCtrlCreateTreeViewItem("serverset", $y7) $y8 = GuiCtrlCreateTreeViewItem("<Maintenance>", $x1) $z51 = GuiCtrlCreateTreeViewItem("checkserverok", $y8) $z52 = GuiCtrlCreateTreeViewItem("rehash", $y8) $z53 = GuiCtrlCreateTreeViewItem("lc", $y8) $z54 = GuiCtrlCreateTreeViewItem("globalset", $y8) $z55 = GuiCtrlCreateTreeViewItem("quit", $y8) $z56 = GuiCtrlCreateTreeViewItem("quit", $x1) GuiCtrlSetState($x1, $GUI_EXPAND) EndFunc Edited May 2, 2009 by cembry90 AutoIt Stuff: UDFs: {Grow}
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