Guest User

Untitled

a guest
Mar 9th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 5.54 KB | None | 0 0
  1. ;**** Wrapper Directives  ****
  2. #AutoIt3Wrapper_icon=..\Downloads\favicon.ico
  3. #AutoIt3Wrapper_UseUpx=n
  4. #AutoIt3Wrapper_Res_Comment=Made by Lan @ Syber Security.
  5. #AutoIt3Wrapper_Res_Description=Gaiaonline Friend Adding Bot
  6. #AutoIt3Wrapper_Res_Fileversion=1.0.0.0
  7. #AutoIt3Wrapper_Res_LegalCopyright=Syber Security
  8. ;**** End Of Wrapper Directives ****
  9.  
  10. #include <GUIConstantsEx.au3>
  11. #include <WindowsConstants.au3>
  12. #include <EditConstants.au3>
  13. #include <File.au3>
  14. #include <Misc.au3>
  15. #include "GaiaHTTP.au3"
  16.  
  17. Dim $aForm[2], $aMenu[2], $aMenuItem[3], $aMemo[1], $aGroup[2], $aBtn[3], $aLabel[3], $aInput[3], $aTrayItem[5]
  18. Global $fToggleBool = False, $sUniversalMsg, $hTxt, $fAuthenticated
  19.  
  20. AutoItSetOption("GUIOnEventMode", 1)
  21. AutoItSetOption("TrayMenuMode", 1)
  22. AutoItSetOption("TrayOnEventMode", 1)
  23.  
  24. If _Singleton(@ScriptName) Then
  25.     MsgBox(16, "Error", "An instance of this program already exists.")
  26.     Exit
  27. EndIf
  28.  
  29. HotKeySet("{ESC}", "Close")
  30.  
  31. $aForm[0] = GUICreate("Gaia Friend Inviter - by Syber Sec", 250, 254, 247, 125, BitOR($WS_SYSMENU, $WS_CAPTION, $WS_POPUP, $WS_POPUPWINDOW, $WS_BORDER, $WS_CLIPSIBLINGS))
  32. GUISetFont(9, 400, 0, "Tahoma")
  33. $aMenu[0] = GUICtrlCreateMenu("File")
  34. $aMenuItem[0] = GUICtrlCreateMenuItem("Login", $aMenu[0])
  35. $aMenu[1] = GUICtrlCreateMenu("Help")
  36. $aMenuItem[1] = GUICtrlCreateMenuItem("About", $aMenu[1])
  37. $aMemo[0] = GUICtrlCreateEdit("", 32, 24, 193, 105)
  38. GUICtrlSetLimit(-1, 200)
  39. $aGroup[0] = GUICtrlCreateGroup("Universal Request Message", 24, 8, 209, 129)
  40. $aBtn[0] = GUICtrlCreateButton("...", 16, 152, 51, 25, $WS_GROUP)
  41. $aInput[0] = GUICtrlCreateInput("", 72, 154, 161, 22, BitOR($ES_AUTOHSCROLL, $ES_READONLY))
  42. GUICtrlSetBkColor(-1, 0xFFFFFF)
  43. $aGroup[1] = GUICtrlCreateGroup("User List", 8, 137, 233, 47)
  44. $aBtn[1] = GUICtrlCreateButton("Start", 72, 188, 107, 25, $WS_GROUP)
  45. $aLabel[0] = GUICtrlCreateLabel("Status: Ready", 4, 216, 89, 15)
  46. GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
  47. $aTrayItem[0] = TrayCreateItem("Restore")
  48. $aTrayItem[1] = TrayCreateItem("")
  49. $aTrayItem[2] = TrayCreateItem("Exit")
  50. $aTrayItem[3] = TrayCreateItem("")
  51. $aTrayItem[4] = TrayCreateItem("Reload")
  52. GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
  53. GUICtrlSetOnEvent($aMenuItem[0], "Login")
  54. GUICtrlSetOnEvent($aMenuItem[1], "About")
  55. GUICtrlSetOnEvent($aBtn[0], "UserSelection")
  56. GUICtrlSetOnEvent($aBtn[1], "Start")
  57. TrayItemSetOnEvent($aTrayItem[0], "Restore")
  58. TrayItemSetOnEvent($aTrayItem[2], "Close")
  59. TrayItemSetOnEvent($aTrayItem[4], "Reload")
  60. GUISetState()
  61.  
  62. While 1
  63.     Sleep(10)
  64. WEnd
  65.  
  66. Func Close()
  67.     Exit
  68. EndFunc   ;==>Close
  69.  
  70. Func Login()
  71.     $aForm[1] = GUICreate("Gaia Friend Adder | Gaia Online Login", 254, 100, 192, 124, -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_WINDOWEDGE))
  72.     GUISetFont(9, 400, 0, "Tahoma")
  73.     $aInput[1] = GUICtrlCreateInput("", 75, 8, 169, 22)
  74.     $aLabel[1] = GUICtrlCreateLabel("Username:", 8, 10, 67, 20)
  75.     GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
  76.     $aInput[2] = GUICtrlCreateInput("", 75, 40, 169, 22, BitOR($ES_PASSWORD, $ES_AUTOHSCROLL))
  77.     $aLabel[2] = GUICtrlCreateLabel("Password:", 8, 42, 64, 20)
  78.     GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
  79.     $aBtn[2] = GUICtrlCreateButton("Submit", 88, 72, 91, 25, $WS_GROUP)
  80.     GUISetOnEvent($GUI_EVENT_CLOSE, "_Close")
  81.     GUICtrlSetOnEvent($aBtn[2], "_Login")
  82.     GUISetState(@SW_SHOW)
  83. EndFunc   ;==>Login
  84.  
  85. Func _Close()
  86.     GUIDelete($aForm[1])
  87. EndFunc   ;==>_Close
  88.  
  89. Func _Login()
  90.     $fsSID = _GLogin(_URLEncode(GUICtrlRead($aInput[1])), GUICtrlRead($aInput[2]))
  91.     If StringLen($fsSID) >= 47 Then
  92.         MsgBox(64, "Success", "Login successful; access granted!")
  93.         $fAuthenticated = 1
  94.         _Close()
  95.     Else
  96.         MsgBox(16, "Failure", "Login unsuccessful. Please enter valid user information and try again.")
  97.         GUICtrlSetData($aInput[1], "")
  98.         GUICtrlSetData($aInput[2], "")
  99.     EndIf
  100. EndFunc   ;==>_Login
  101.  
  102. Func About()
  103.     MsgBox(4096, "About", "Created by The UnIntellgible/Lan of Syber Security." & @CRLF & @CRLF & "Copyright (c) 2011 Syber Security.")
  104. EndFunc   ;==>About
  105.  
  106. Func UserSelection()
  107.     $hTxt = FileOpenDialog("Choose users via Text file", @ScriptDir & "\", "Text Files (*.txt;*.text)", 1 + 4)
  108.     If $hTxt <> '' Then
  109.         MsgBox(64, "", "User list successfully loaded!")
  110.     Else
  111.         MsgBox(16, "", "No txt file selected. Please try again.")
  112.     EndIf
  113.     GUICtrlSetData($aInput[0], $hTxt)
  114. EndFunc   ;==>UserSelection
  115.  
  116. Func Main()
  117.     $iSuccesses = 0
  118.     $iLines = _FileCountLines($hTxt)
  119.     For $i = 1 To $iLines
  120.         $sUser = FileReadLine($hTxt, $i)
  121.         $fResult = _AddFriend($sUser, $sUniversalMsg)
  122.         If $fResult Then $iSuccesses += 1
  123.     Next
  124.     If $fToggleBool <> False Then
  125.         TrayTip("Gaia Friend Adder", "Friend request(s) successfully sent to approximately " & $iSuccesses & '/' & $iLines & _
  126.         " people.", 3000)
  127.     EndIf
  128.     $fToggleBool = False
  129.     GUICtrlSetData($aBtn[1], "Start")
  130.     AdlibUnRegister("Main")
  131.     GUICtrlSetData($aLabel[0], "Status: Ready")
  132. EndFunc   ;==>Main
  133.  
  134. Func Start()
  135.     If $fAuthenticated And GUICtrlRead($aInput[0]) <> $sNullStr Then
  136.         If $fToggleBool Then
  137.             $fToggleBool = False
  138.             GUICtrlSetData($aBtn[1], "Start")
  139.             AdlibUnRegister("Main")
  140.             TrayTip("Gaia Friend Adder", "Autonomous friend adding process has stopped.", 2000)
  141.             GUICtrlSetData($aLabel[0], "Status: Ready")
  142.         Else
  143.             $fToggleBool = True
  144.             TrayTip("Gaia Friend Adder", "Autonomous friend adding process has started.", 2000)
  145.             GUICtrlSetData($aBtn[1], "Stop")
  146.             $sUniversalMsg = GUICtrlRead($aMemo[0])
  147.             AdlibRegister("Main", 100)
  148.             GUICtrlSetData($aLabel[0], "Status: Active")
  149.         EndIf
  150.     Else
  151.         MsgBox(16, "Technical Error", "No user authenticated and/or user list loaded. Please meet these requirements and try again.")
  152.     EndIf
  153. EndFunc   ;==>Start
  154.  
  155. Func Restore()
  156.     WinActivate($aForm[0])
  157. EndFunc   ;==>Restore
  158.  
  159. Func Reload()
  160.     ShellExecute(@ScriptFullPath)
  161.     Exit
  162. EndFunc   ;==>Reload
Add Comment
Please, Sign In to add comment