Guest User

Untitled

a guest
Mar 8th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.74 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) = 1 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. GUICtrlSetData($aInput[0], $hTxt)
  110. MsgBox(64, "", "User list successfully loaded!")
  111. Else
  112. MsgBox(16, "", "No txt file selected. Please try again.")
  113. EndIf
  114. GUICtrlSetData($aInput[0], $hTxt)
  115. EndFunc ;==>UserSelection
  116.  
  117. Func Main()
  118. $iSuccesses = 0
  119. $iLines = _FileCountLines($hTxt)
  120. For $i = 1 To $iLines
  121. $sUser = FileReadLine($hTxt, $i)
  122. $fResult = _AddFriend($sUser, $sUniversalMsg)
  123. If $fResult = 1 Then $iSuccesses += 1
  124. Next
  125. If $fToggleBool <> False Then
  126. TrayTip("Gaia Friend Adder", "Friend request(s) successfully sent to approximately " & $iSuccesses & '/' & $iLines & _
  127. " people.", 3000)
  128. EndIf
  129. $fToggleBool = False
  130. GUICtrlSetData($aBtn[1], "Start")
  131. AdlibUnRegister("Main")
  132. GUICtrlSetData($aLabel[0], "Status: Ready")
  133. EndFunc ;==>Main
  134.  
  135. Func Start()
  136. If $fAuthenticated And GUICtrlRead($aInput[0]) <> $sNullStr Then
  137. If $fToggleBool Then
  138. $fToggleBool = False
  139. GUICtrlSetData($aBtn[1], "Start")
  140. AdlibUnRegister("Main")
  141. TrayTip("Gaia Friend Adder", "Autonomous friend adding process has stopped.", 2000)
  142. GUICtrlSetData($aLabel[0], "Status: Ready")
  143. Else
  144. $fToggleBool = True
  145. TrayTip("Gaia Friend Adder", "Autonomous friend adding process has started.", 2000)
  146. GUICtrlSetData($aBtn[1], "Stop")
  147. $sUniversalMsg = GUICtrlRead($aMemo[0])
  148. AdlibRegister("Main", 100)
  149. GUICtrlSetData($aLabel[0], "Status: Active")
  150. EndIf
  151. Else
  152. MsgBox(16, "Technical Error", "No user authenticated and/or user list loaded. Please meet these requirements and try again.")
  153. EndIf
  154. EndFunc ;==>Start
  155.  
  156. Func Restore()
  157. WinActivate($aForm[0])
  158. EndFunc ;==>Restore
  159.  
  160. Func Reload()
  161. ShellExecute(@ScriptFullPath)
  162. Exit
  163. EndFunc ;==>Reload
Add Comment
Please, Sign In to add comment