Jump to content

Reloaded

Members
  • Posts

    19
  • Joined

  • Last visited

Reloaded's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I was wondering how do you add the Publisher, Copyright and other details like that? I made a script and when i right click it and choose "Run as Administrator" in Windows 7 and in Windows Vista the UAC comes up with the name of the application and the Publisher as "Unknown". Also in Properties > Details of the file the copyright is blank... Please help! Thanks a lot
  2. I know i read this somewhere in the help file so i know its possible (i think) but i can't find it again. But im pretty sure there is a way to have your program check if there is 2+ instances of it running. How can i accomplish this? I already tried: If ProcessExists("myProgram.exe") Then MsgBox(0, "", "Process already exists") But that won't work i tried with just 1 instance of it and it still detects itself even though there is 1 instance.
  3. Is a loop needed in order to "walk" though multiple lines
  4. Im really bad at StringRegExp i can't get mine to work, if i post it can you help me out please?
  5. So i started to make an auto admin bot and i need it to monitor the game chat (through the webadmin page). What it needs to do is: 1) Look through all the chat and compare it to a dictionary list (contains bad words) 2) If it finds any, go to the beginning of the string and find AND store: "PERSONS NAME: " (the : is there so it will 99% of the time end up at the PERSONS NAME and not anywhere else in the chat. That is all i want help with so far, the next part would be getting into the list of players and searching for their name then grabbing their IP that is in the list but that i want to try on my own. So what im having trouble with is "walking" through the lines of code. So far i tried everything that is in these categories in the help file: Function Reference > String Management UDFs > Array Management UDFs > String Management Here is my code, followed by the HTML source for that players chat (should be helpful), followed by a SS of it. Btw the Username & Pass included into the source is not an actual log in if i was to give out the login my gaming clan would rip my head off. #cs ---------------------------------------------------------------------------- Title: |ELITE| AdminBot CodeName: Hydra Version: 1.0 Author: |ELITE|Reloaded Website: http://www.eliteswat.com Date Created: 2-23-2010 Date Last Modified: 3-15-2010 Email: reloaded@eliteswat.com OR harrisjason10@yahoo.com Copyright: |ELITE| The Clan that Makes a Difference! #ce ---------------------------------------------------------------------------- #Include <Array.au3> #Include <EditConstants.au3> #Include <GUIConstants.au3> #Include <GUIConstantsEx.au3> #Include <IE.au3> #Include <String.au3> Opt('MustDeclareVars', 1) Opt('GUIOnEventMode', 1) Global $ip, $port, $username, $password, $gotUsername, $gotPass, $http $http = "http://" Global $startBot, $svrFlush GUICreate("|ELITE| AdminBot - Hydra", 250, 180) GUISetOnEvent($GUI_EVENT_CLOSE, "close") ;IP edit GUICtrlCreateLabel("WebAdmin IP:", 67, 20, 200, 20) GUICtrlCreateLabel("http://", 32, 42, 50, 20) $ip = GUICtrlCreateInput("", 67, 40, 150, 20) ;PORT edit ;GUICtrlCreateLabel("Port:", 157, 20, 60, 20) ;$port = GUICtrlCreateInput("", 157, 40, 60, 20) ;USERNAME edit GUICtrlCreateLabel("Username:", 32, 70, 120, 20) $username = GUICtrlCreateInput("", 32, 90, 120, 20) ;PASSWORD edit GUICtrlCreateLabel("Password:", 157, 70, 60, 20) $password = GUICtrlCreateInput("", 157, 90, 60, 20, BitOr($GUI_SS_DEFAULT_INPUT, $ES_PASSWORD)) ;START BOT button $startBot = GUICtrlCreateButton("Start Bot", 75, 130, 100, 30) GUICtrlSetOnEvent(-1, "startBot") GUISetState(@SW_SHOW) While 1 Sleep(1000) WEnd Func close() Exit EndFunc Func checkFields() ;Get the IP and store it Local $gotIP = $ip ;Get the Username and store it $gotUsername = GUICtrlRead($username) ;Get the Password and store it $gotPass = GUICtrlRead($password) Select ;Check if the IP is invalid (format: ***.***.***.***) Case $gotIP = 0 MsgBox(0, "Invalid IP", "IP must be in this format: ***.***.***.***" & @CR & "Only characters ""0-9"" and "".""") ;For now used as a test to see if it runs this code when it shouldn't Case $gotIP = 1 MsgBox(0, "", "Start Bot func going to execute") ;startBot() EndSelect EndFunc Func startBot() ;============================Variables============================= ; Local $svrWebAdmin, $logInForm, $logInUserField, $logInPassField, $oIE ;Store the IP ;eg. 192.168.1.1:10490 $svrWebAdmin = "http://81.19.215.40:10490" ;$http & GUICtrlRead($ip) ;Get the username and store it $gotUsername = "someUsername" ;GUICtrlRead($username) ;Get the password and store it $gotPass = "somePass" ;GUICtrlRead($password) ;================================================================== ;================================================================== ;Open up IE and connect to WebAdmin and LogIn ; $oIE = _IECreate($svrWebAdmin, 0, 1, 0, 1) ;Make sure page is fully loaded before continuing _IELoadWait($oIE) $logInUserField = _IEGetObjById($oIE, "user") _IEFormElementSetValue($logInUserField, $gotUsername) $logInPassField = _IEGetObjById($oIE, "pw") _IEFormElementSetValue($logInPassField, $gotPass) $logInForm = _IEFormGetCollection($oIE, 0) _IEFormSubmit($logInForm) ;Make sure page is fully loaded before continuing ;We can't use _IELoadWait here because the Frames constantly ;reload the browser! Sleep(5000) ;================================================================== ;============================Variables============================= ;Variables that need to be defined after IE is opened ; Local $consoleButton, $console, $playerList, $playerChat $consoleButton = _IEGetObjByName($oIE, "consolebutton") $console = _IEGetObjByName($oIE, "consoleinput") $playerChat = _IEGetObjById($oIE, "console") $playerList = _IEGetObjById($oIE, "players") ;================================================================== ;============================HERE IS WHERE I NEED HELP THANKS FOR HELPING IF YOU CAN AUTOIT FORUM USERS :D============================= ; ;Let me explain some things before you look at the code below, so far i haven't worked on making the dictionary list, ;at the moment im trying to just find <RANDOM_NAME: > without < > ofc. The name will only appear when someone in-game talks. ; ;Grab ALL the chat without HTML tags Local $a = _IEPropertyGet($playerChat, "innertext") ;This is just something i tried but couldnt get it to work (don't remember what i was trying to accomplish with it, sry) ;Local $b = _StringExplode($a, @CR, 0) ;Find the persons NAME, tell it to look for a STRING between the start of the line and : Local $c = _StringBetween($a, "", ": ", -1) MsgBox(0, "", @Error) ;If $c was found (RANDOM_NAME: ) then display it If $c Then _ArrayDisplay($c, "Test") EndIf ;================================================================== ;----Start Monitoring ;$console = _IEGetObjById($oIE, "console") ;$playerChat = _IEBodyReadText($console) EndFunc <table width="100%" height="750" class="listtable"> <tbody> <tr> <td valign="top" id="console"> <font color="#00ff00"><b>|ELITE|Reloaded^Maj(SPEC)</b>: Test for AutoIt forum help</font><br> <font color="#00ff00"><b>|ELITE|Reloaded^Maj(SPEC)</b>: Test for AutoIt forum help</font><br> <font color="#00ff00"><b>|ELITE|Reloaded^Maj(SPEC)</b>: Test for AutoIt forum help</font><br> <font color="#ffff00"></font><font color="#ffffff"><b><u>-=No Spamming The Server=-</u></b><u></u></font><br> <font color="#ffff00"></font><font color="#ffffff"><b><u>-=English Langauge Only=-</u></b><u></u></font><br> <font color="#ffff00"></font><font color="#ffffff"><b><u>-=Do Not Team Shoot=-</u></b><u></u></font><br> <font color="#ffff00"></font><font color="#ffffff"><b><u>-=Do Not Team Tazer=-</u></b><u></u></font><br> <font color="#ffff00"></font><font color="#ffffff"><b><u>-=Do Not Team Nade=-</u></b><u></u></font><br> <font color="#ffff00"></font><font color="#ffffff"><b><u>-=Do Not Steal Somones Arrest=-</u></b><u></u></font><br> <font color="#ffff00"></font><font color="#ffffff"><b><u>-=Do Not Kill Arrest=-</u></b><u></u></font><br> <font color="#ffff00"><b>ok7</b> disconnected (94.181.5.237).</font><br> <font color="#ffff00"><b>ok7</b> dropped from the server.</font><br> <font color="#ffff00"></font><font color="#ffffff"><b><u>-=Do not use exploits=-</u></b><u></u></font><br> <font color="#ffff00"></font><font color="#ffffff"><b><u>-=Do not use glitches=-</u></b><u></u></font><br> <font color="#ffff00"></font><font color="#ffffff"><b><u>-=Do not use hacks=-</u></b><u></u></font><br> <font color="#ffff00"></font><font color="#ffffff"><b><u>-=No Noob Calling=-</u></b><u></u></font><br> <font color="#ffff00"></font><font color="#ffffff"><b><u>-=No Name Calling=-</u></b><u></u></font><br> <font color="#ffff00"></font><font color="#ffffff"><b><u>-=No Abusive Langauge=-</u></b><u></u></font><br> <font color="#ffff00"></font><font color="#ffffff"><b><u>-=Please Follow The Server Rules=-</u></b><u></u></font><br> <font color="#ffff00"></font><font color="#ffffff"><b><u>-=Welcome to |ELITE| European Server 1!-</u></b><u></u></font><br> <font color="#ffff00"></font><font color="#ffffff"><b><u>-=Contact: dutch@eliteswat.com or Legend@eliteswat.com=-</u></b><u></u></font><br> <font color="#ffff00"></font><font color="#ffffff"><b><u>-=Any problems and no ELITE on the server=-</u></b><u></u></font></td> </tr> </tbody> </table>
  6. >"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "F:\Jason\Documents\ELITE Files\SWAT4 AdminBot\SWAT4-Admin-Bot.au3" C:\Program Files (x86)\AutoIt3\Include\IE.au3 (2348) : ==> The requested action with this object has failed.: If IsObj($o_object.document.GetElementsByName($s_Id).item($i_index)) Then If IsObj($o_object.document^ ERROR >Exit code: 1 Time: 2.072 Can someone PLEASE tell me why im getting that error in the console? It's weird... It was working perfectly, now it won't enter anything into the Username & Password field and it won't even bother to click on the SUBMIT button... #cs ---------------------------------------------------------------------------- Author: |ELITE|Reloaded Website: http://www.eliteswat.com Date Created: 2-23-2010 Date Last Modified: 2-23-2010 Description: |ELITE| AdminBot S4 is an Admin Bot for our SWAT4 servers. Email: reloaded@eliteswat.com OR harrisjason10@yahoo.com Copyright: |ELITE| Clan #ce ---------------------------------------------------------------------------- #Include <Array.au3> #Include <EditConstants.au3> #Include <GUIConstants.au3> #Include <GUIConstantsEx.au3> #Include <IE.au3> Opt('MustDeclareVars', 1) Opt('GUIOnEventMode', 1) Global $ip, $port, $username, $password, $gotUsername, $gotPass, $http $http = "http://" Global $startBot, $msg, $startMon GUICreate("|ELITE| AdminBot", 250, 180) GUISetOnEvent($GUI_EVENT_CLOSE, "close") ;IP edit GUICtrlCreateLabel("WebAdmin IP:", 67, 20, 200, 20) GUICtrlCreateLabel("http://", 32, 42, 50, 20) $ip = GUICtrlCreateInput("", 67, 40, 150, 20) ;PORT edit ;GUICtrlCreateLabel("Port:", 157, 20, 60, 20) ;$port = GUICtrlCreateInput("", 157, 40, 60, 20) ;USERNAME edit GUICtrlCreateLabel("Username:", 32, 70, 120, 20) $username = GUICtrlCreateInput("", 32, 90, 120, 20) ;PASSWORD edit GUICtrlCreateLabel("Password:", 157, 70, 60, 20) $password = GUICtrlCreateInput("", 157, 90, 60, 20, BitOr($GUI_SS_DEFAULT_INPUT, $ES_PASSWORD)) ;START BOT button $startBot = GUICtrlCreateButton("Start Bot", 75, 130, 100, 30) GUICtrlSetOnEvent(-1, "startBot") GUISetState(@SW_SHOW) While 1 Sleep(1000) WEnd Func close() Exit EndFunc Func checkFields() ;Get the IP and store it Local $gotIP = $ip ;Get the Username and store it $gotUsername = GUICtrlRead($username) ;Get the Password and store it $gotPass = GUICtrlRead($password) Select ;Check if the IP is invalid (format: ***.***.***.***) Case $gotIP = 0 MsgBox(0, "Invalid IP", "IP must be in this format: ***.***.***.***" & @CR & "Only characters ""0-9"" and "".""") ;For now used as a test to see if it runs this code when it shouldn't Case $gotIP = 1 MsgBox(0, "", "Start Bot func going to execute") ;startBot() EndSelect EndFunc Func startBot() Local $svrWebAdmin, $logInForm, $logInUserField, $logInPassField, $playerList, $console, $playerChat, $kickButton, $banButton, $fnwButton, $fnaButton, $muteButton, $addBanButton, $sayButton, $oIE ;Store the IP ;eg. 192.168.1.1:10490 $svrWebAdmin = "http://81.19.215.40:10490" ;$http & GUICtrlRead($ip) ;Get the username and store it $gotUsername = "someUsername" ;GUICtrlRead($username) ;Get the password and store it $gotPass = "somePass" ;GUICtrlRead($password) ;----Open up IE and connect to WebAdmin and LogIn $oIE = _IECreate($svrWebAdmin, 0, 1, 0, 1) $logInUserField = _IEGetObjByName($oIE, "user") _IEFormElementSetValue($logInUserField, $gotUsername) $logInPassField = _IEGetObjByName($oIE, "pw") _IEFormElementSetValue($logInPassField, $gotPass) $logInForm = _IEFormGetCollection($oIE, 0) _IEFormSubmit($logInForm) ;----Start Monitoring ;$console = _IEGetObjById($oIE, "console") ;$playerChat = _IEBodyReadText($console) EndFunc
  7. To make sure they enter an IP and no letters or other characters. I need to figure out how to make a loop that will walk through the code and check... And then cancel the checkFields() if there is something wrong.
  8. You aren't by any chance trying to make a malicious tool are you? Keylogger?? I can see this happening: You make the program Someone uses the Input field to put in data (lets say an email and password) They click on the Submit button It Emails it to you Anyways to help with your question, you would need to have it to do this: Read the Input field, grab the character code(s) StringToASCIIArray($someVar) Send those characters ;Not sure if THIS right here works, never tried it StringToASCIIArray($someVar) Is the way i would work with it
  9. Ok so now im trying to use StringRegExp to check the fields, im on the IP field so it needs to check only for DIGITS and DECIMALS. At least 1 digit and at most 3 digits in each group. It's not working though and i tried 2 different ways and it says when i enter "192.168.1.1" its wrong, and when i enter "hajldjfld" its wrong (which is good for this last string with the letters). Here is the 2 ways i tried: Func checkFields() ;Get the IP and store it Local $gotIP = StringRegExp($ip, "([:digit:]{1,3}\.{1}){4}", 0) ;Get the Port and store it Local $gotPort = StringRegExp($port, "[:digit:]{1,5}") ;Get the Username and store it $gotUsername = GUICtrlRead($username) ;Get the Password and store it $gotPass = GUICtrlRead($password) $msg = GUIGetMsg() Select ;Check if the IP is invalid (format: ***.***.***.***) Case $gotIP = 0 MsgBox(0, "Invalid IP", "IP must be in this format: ***.***.***.***" & @CR & "Only characters ""0-9"" and "".""") MsgBox(0, "", @Error) ;Check if the Port is invalid (only 1-5 digits) Case $gotPort = 0 MsgBox(0, "Invalid Port", "Port must be only characters ""0-9"", 1-5 characters long") ;For now used as a test to see if it runs this code when it shouldn't Case $gotIP = 1 MsgBox(0, "", "Start Bot func going to execute") ;startBot() EndSelect EndFunc Func checkFields() ;Get the IP and store it Local $gotIP = StringRegExp($ip, "[:digit:]{1,3}\.{1}[:digit:]{1,3}\.{1}[:digit:]{1,3}\.{1}[:digit:]{1,3}\.{1}", 0) ;Get the Port and store it Local $gotPort = StringRegExp($port, "[:digit:]{1,5}") ;Get the Username and store it $gotUsername = GUICtrlRead($username) ;Get the Password and store it $gotPass = GUICtrlRead($password) Select ;Check if the IP is invalid (format: ***.***.***.***) Case $gotIP = 0 MsgBox(0, "Invalid IP", "IP must be in this format: ***.***.***.***" & @CR & "Only characters ""0-9"" and "".""") ;Check if the Port is invalid (only 1-5 digits) Case $gotPort = 0 MsgBox(0, "Invalid Port", "Port must be only characters ""0-9"", 1-5 characters long") ;For now used as a test to see if it runs this code when it shouldn't Case $gotIP = 1 MsgBox(0, "", "Start Bot func going to execute") ;startBot() EndSelect EndFunc
  10. Hmm yea i will shorten that variable it will be faster to type. Yea i was planning on after using the variable $eliteSvrWebAdmin (which has the IP:PORT in it at this time) to replace IP:PORT with _IECreate....
  11. Ok i see, but just a question, why put the "o" in $oIE ? Makes no sense to me, but i do see what you mean by putting it into a variable . Just another quick question, instead of having a whole NEW variable for it, should i just overwrite the IP+PORT that is stored into "$eliteSvrWebAdmin" and place _IECreate..... in it? YOu are the bombo for replying ))))
  12. Ok im making a AdminBot program for an old game SWAT4 which has a WebAdmin capability so i figured i'll make something in AutoIt to do some basic admining for me. The problem im having is this code snippet which you can view all the code below and here is the errors i get: Func startBot() ;Take the IP that was entered and combine it with the PORT ;eg. 192.168.1.1:10490 $eliteSvrWebAdmin = GUICtrlRead($ip) & ":" & GUICtrlRead($port) ;Get the username and store it $gotUsername = GUICtrlRead($username) ;Get the password and store it $gotPass = GUICtrlRead($password) Local $logInUserField = _IEFormElementGetObjByName($eliteSvrWebAdmin, "user") ;Open up IE and connect to WebAdmin and LogIn _IECreate($eliteSvrWebAdmin, 0, 1, 1) _IEFormElementSetValue($logInUserField, $gotUsername) MsgBox(0, "", @Error) EndFunc So far here is what i sketched onto paper that it needs to do so you can hopefully see things a bit clearer: 1)Connect to Internet 2)Connect to WebAdmin 2a)For username field filter it to only allow 0-9, . and : (IP:PORT) 3)Click LOGIN 4)Monitor Chat 5)Find player in list 6)Select radio button 7)Click the right Admin button (eg. MUTE) And you will need to enter this into the URL if you need to check out the webpage > http://81.19.215.32:10490 Currently im trying to get it to enter a username into the username field. If you actually copy/paste this into Scite and run it for the IP just up this: http://81.19.215.32 for the port: 10490 put any username and any password. (NOte that the : is put in automatically. #cs ---------------------------------------------------------------------------- Author: |ELITE|Reloaded Website: http://www.eliteswat.com Date Created: 2-23-2010 Date Last Modified: 2-23-2010 Description: |ELITE| AdminBot S4 is an Admin Bot for our SWAT4 servers. Email: reloaded@eliteswat.com OR harrisjason10@yahoo.com Copyright: |ELITE| Clan #ce ---------------------------------------------------------------------------- #Include <IE.au3> #Include <GUIConstants.au3> #Include <GUIConstantsEx.au3> #Include <IE.au3> Opt('MustDeclareVars', 1) Opt('GUIOnEventMode', 1) Global $eliteSvrWebAdmin, $ip, $port, $username, $password, $gotUsername, $gotPass Global $startBot, $msg GUICreate("|ELITE| AdminBot", 200, 200) GUISetOnEvent($GUI_EVENT_CLOSE, "close") ;IP edit GUICtrlCreateLabel("WebAdmin IP:", 7, 20, 200, 20) $ip = GUICtrlCreateEdit("", 7, 40, 120, 20) ;PORT edit GUICtrlCreateLabel("Port:", 132, 20, 60, 20) $port = GUICtrlCreateEdit("", 132, 40, 60, 20) ;USERNAME edit GUICtrlCreateLabel("Username:", 7, 70, 120, 20) $username = GUICtrlCreateEdit("", 7, 90, 120, 20) ;PASSWORD edit GUICtrlCreateLabel("Password:", 132, 70, 60, 20) $password = GUICtrlCreateEdit("", 132, 90, 60, 20) ;START BOT button $startBot = GUICtrlCreateButton("Start Bot", 50, 118, 100, 20) GUICtrlSetOnEvent(-1, "startBot") GUISetState(@SW_SHOW) While 1 Sleep(1000) WEnd Func close() Exit EndFunc Func startBot() ;Take the IP that was entered and combine it with the PORT ;eg. 192.168.1.1:10490 $eliteSvrWebAdmin = GUICtrlRead($ip) & ":" & GUICtrlRead($port) ;Get the username and store it $gotUsername = GUICtrlRead($username) ;Get the password and store it $gotPass = GUICtrlRead($password) Local $logInUserField = _IEFormElementGetObjByName($eliteSvrWebAdmin, "user") ;Open up IE and connect to WebAdmin and LogIn _IECreate($eliteSvrWebAdmin, 0, 1, 1) _IEFormElementSetValue($logInUserField, $gotUsername) MsgBox(0, "", @Error) EndFunc
  13. Ok thanks for the reply, but i tried to use a BMP file type but still nothing EDIT: OMG it works , i guess when i created GIF and BMP to test i tested with GIF but must have forgot to test BMP. Thanks for your replies and help!
  14. Well do you know how to make an image button?
×
×
  • Create New...