A preserved archive of the Logical Gamers community forums, 2009-2025. The original threads and posts, served read-only. Registration, posting and private messages are gone for good.

[Source] Gaia Online Ignored Checker

1.9k views · started by The Unintelligible ·
#1
[Source] Gaia Online Ignored/Banned Checker
Someone requested this program before here: http://forum.logicalgamers.com/public-programs/51110-hater-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:

; 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()
[/0][/1][/0][/0][/0][/2]


Pastebin mirror: [autoit] Hater Checker - Pastebin.com[/autoit]

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.
#2
Oh wow, very nice tutorial and code!
Thanks for this.
#3
Thanks.

Glad someone can gain something from it.
#4
Great job champ.
#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.
#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.
#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?
#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.
#9
And if you AREN'T ignored by them, does connecting to /friend/add not add them as a friend was my question.
#10
I don't know? Maybe you should try it?

I don't see how that's relevant to this program though.
#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.
#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.
#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 :(
#14
Don't really know what you're trying to ask.
#15
Use wrote:
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 :(
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.
.