Someone requested this program before here: http://forum.logicalgamers.com/publi...r-checker.html
Was bored and haven't exactly made anything gaia related in a while, so I thought why not.
Here's a screenshot of it:
Anyways it was made in AutoIt, here's the source code:
Pastebin mirror: [AutoIt] Hater Checker - Pastebin.comPHP Code:
; AutoIt Wrapper Directives
#Region
#AutoIt3Wrapper_Res_Comment=Made by The Unintelligible
#AutoIt3Wrapper_Res_Description=Gaia Online Ignore Check
#AutoIt3Wrapper_UseUpx=n
#EndRegion
; Includes
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <String.au3>
; Variable declarations
Global Const $SOH = Chr(01), $ENQ = Chr(05) ; SOH/ENQ for web requests
Global $oWinHTTP = ObjCreate("winhttp.winhttprequest.5.1") ; Creating our default winhttp COM object
Global $sUsername, $sPassword
; Functions
Func _HTTPRequest(ByRef $oWinHTTP, $sMethod, $sURL, $sData = "")
$oWinHTTP.Open($sMethod, $sURL, False)
$oWinHTTP.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5")
If $sMethod == "POST" Then $oWinHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
$oWinHTTP.Send($sData)
Return $oWinHTTP.ResponseText
EndFunc
Func _Login(ByRef $oWinHTTP, $sUsername, $sPassword)
Local $sSource, $aInputs, $sResponse, $sSID
Local $sPostData = "username=" & $sUsername & "&password=" & $sPassword & "&"
Local $aTemporary_1, $aTemporary_2
Dim $aReturn[2]
$sSource = _HTTPRequest($oWinHTTP, "GET", "http://www.gaiaonline.com/")
$aInputs = StringRegExp($sSource, '<input([^>]+)>', 3)
For $i = 3 to UBound($aInputs) - 1
$aTemporary_1 = _StringBetween($aInputs[$i], 'name="', '"')
$aTemporary_2 = _StringBetween(StringReplace($aInputs[$i], "data-value", ""), 'value="', '"')
$sPostData &= $aTemporary_1[0] & "=" & $aTemporary_2[0] & "&"
Next
$sPostData = StringLeft($sPostData, StringLen($sPostData) - 1)
_HTTPRequest($oWinHTTP, "POST", "http://www.gaiaonline.com/auth/login/", $sPostData)
$sResponse = _HTTPRequest($oWinHTTP, "GET", "http://www.gaiaonline.com/chat/gsi/index.php?m=109")
$sSID = StringReplace($sResponse, "109" & $SOH & $ENQ & $SOH, "")
$aReturn[0] = (StringInStr($sResponse, "User not authenticated") <> True)
$aReturn[1] = $sSID
Return $aReturn
EndFunc
Func _IsIgnored($sUsername)
Local $iProfileID = StringReplace(_HTTPRequest($oWinHTTP, "GET", "http://gaiaonline.com/chat/gsi/index.php?m=121" & $SOH & $sUsername), _
"121" & $SOH & $ENQ & $SOH, "") ; Parse GSI request response that contains your profile ID of the given user
Local $sResponse = _HTTPRequest($oWinHTTP, "GET", "http://www.gaiaonline.com/friends/add/" & $iProfileID & "?_gaia_t_=724&view=ajax")
If StringInStr($sResponse, "Oof! Rejected!") Then Return True
EndFunc
; GUI/functionality
Func Main()
Local $hForm = GUICreate("Gaia Ignore Checker", 373, 75, 291, 206)
Local $hInput = GUICtrlCreateInput("Enter username of person you want to evaluate...", 16, 16, 265, 21, -1, BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE))
Local $hBtn = GUICtrlCreateButton("&Go!", 288, 16, 75, 17)
Local $hLabel = GUICtrlCreateLabel("Made by The Unintelligible @ Logical Gamers", 152, 56, 219, 17, -1, $GUI_WS_EX_PARENTDRAG)
GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
GUICtrlSetCursor(-1, 0)
GUICtrlCreateGroup("", 8, 0, 361, 49)
GUISetState()
; Event loop
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $hBtn
If _IsIgnored(GUICtrlRead($hInput)) Then
MsgBox(0, "Result", "Yes, unfortunately you are ignored by this user.")
Else
MsgBox(0, "Result", "It's your lucky day! You are not ignored by this user.")
EndIf
Case $hLabel
ShellExecute("http://logicalgamers.com") ; Obviously launch LG in another tab
EndSwitch
WEnd
EndFunc
; Main
While True
; Loop valid information is given; breakpoint is if the Input box is exited
$sUsername = InputBox("Enter your username", "Enter your gaia online username in the input below to sign in", "")
$sPassword = InputBox("Enter your password", "Enter your gaia online password in the input below to sign in", "password", '*')
$aResponse = _Login($oWinHTTP, $sUsername, $sPassword)
If $aResponse[0] Then
MsgBox(0, "Success", "Your information is valid! You have been signed in.")
ExitLoop
Else
MsgBox(16, "Error", "Invalid information specified! Please enter your correct user info then try again.")
EndIf
If $sPassword == "" Then Exit
WEnd
Main()
If anyone needs it for OS X, Linux or possibly another OS I can probably make a Lua version if I get around to it. But the script you see here only works for Windows.
Here's it compiled as an executable file for those who want a .exe program: https://www.mediafire.com/?y6aa4rqkre84p7w
It's obviously small, so it's only 864 KB.
Link to AU3 for those who want to compile it themselves: AutoIt Downloads - AutoItScript
It'd probably be best to download both the AutoIt interpreter and the SciTE editor.
I probably rushed this, so if you find any issues with the program or have any questions post them here.
Results 1 to 15 of 15
- 22 Feb. 2014 09:43am #1
[Source] Gaia Online Ignored/Banned Checker
Last edited by The Unintelligible; 14 Jun. 2014 at 12:52am.
I'm lightning on my feet
- 22 Feb. 2014 07:12pm #2
Oh wow, very nice tutorial and code!
Thanks for this.There's nothing ideal about being real, there's so many flaws to cover and conceal.
- 22 Feb. 2014 11:26pm #3
Thanks.
Glad someone can gain something from it.I'm lightning on my feet
- 22 Feb. 2014 11:32pm #4
Great job champ.
I don't get tired.
- 22 Feb. 2014 11:41pm #5
was uh, something I thought I should have done a while back. Never had the time. It was friday and didn't have shiz to do. *Friday reference*
Yeah, used your login method btw with a few tweaks. If I do anything else gaia related I'm probably almost certainly going to supersede your regex way of logging in with something more efficient and easier a la HTML/DOM parsing. The method Tree also utilized. Doing it through this way is pretty fool proof unless they statically change any of the tags they use for the page in which case would be able to be revised as well. The developers admitted that this way is "unpatchable" in their own terms because you aren't explicitly parsing HTML with patterns and such like with regular expressions.Last edited by The Unintelligible; 22 Feb. 2014 at 11:44pm.
I'm lightning on my feet
- 14 Jun. 2014 12:51am #6
Footnote: Forgot to mention that this also doubles as a ban checker to check if the given user is banned (if you are ignored by them and you don't know the user or have them added as a friend or anything they are 90% likely to be banned).
Something that crossed my mind when discussing gaya topics with peeps in LG chat.I'm lightning on my feet
- 14 Jun. 2014 06:20pm #7
Will connecting to /friends/add/etc. not add them as a friend? Or will checking if you are ignored add them to your friend's list?
- 14 Jun. 2014 06:41pm #8
Er. Neither.
If you are ignored by them and you absolutely have no clue who they are, there's a solid 9/10 chance said user is banned.
Use a mule account and check if users ignored you (i.e. users you don't know or don't interact with), if you are ignored by them they are more than most likely banned.
edit: Example,
This is one of my old accounts. It's banned. It's pretty impossible that I'm ignored by them and I don't even know who they are. 99.8% chance that they're banned rather than ignoring you -- which in this case, they are banned.
I'm thinking about updating the program to better distinguish between actually being ignored or banned. Although if you have basic reasoning skills it's easy to infer whether they're banned or ignoring you.Last edited by The Unintelligible; 14 Jun. 2014 at 06:55pm.
I'm lightning on my feet
- 14 Jun. 2014 08:45pm #9
And if you AREN'T ignored by them, does connecting to /friend/add not add them as a friend was my question.
- 14 Jun. 2014 08:55pm #10
I don't know? Maybe you should try it?
I don't see how that's relevant to this program though.I'm lightning on my feet
- 14 Jun. 2014 11:21pm #11
... Your program connects to /friends/add/username to tell if you are ignored.
Ergo if the answer is no, you aren't ignored, then you will also find that you added that person to your friends list.
Seeing as how you coded it, I figured you would know whether or not the connection that your program makes does this or not.
- 14 Jun. 2014 11:28pm #12
You always ask some pretty tangential questions...
Coded this months ago man. I didn't put much thought into it either given it's a simple program.
It doesn't add them to your friends list afterwards, no. If that's what you were asking.
Edit: Actually this was actually a pretty important question. I can see how it would look like it adds them or sends them a request afterwards based on the coding. Just didn't understand what you were asking at first.Last edited by The Unintelligible; 14 Jun. 2014 at 11:40pm.
I'm lightning on my feet
- 15 Jun. 2014 03:56am #13
isnt there a way to see if they're banned like this
or else its if they aren't receiving friend requests, this would be useful i played gaia anymore
- 15 Jun. 2014 04:32am #14
Don't really know what you're trying to ask.
I'm lightning on my feet
- 15 Jun. 2014 05:24am #15