Advertisement
Kissss

Untitled

Aug 12th, 2018
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.02 KB | None | 0 0
  1. #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
  2. #AutoIt3Wrapper_Icon=D:\test.ico
  3. #AutoIt3Wrapper_Compression=4
  4. #AutoIt3Wrapper_UseUpx=y
  5. #AutoIt3Wrapper_Res_Comment=Multi Request by SciTE IT
  6. #AutoIt3Wrapper_Res_Fileversion=1.3
  7. #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
  8. #include <ButtonConstants.au3>
  9. #include <EditConstants.au3>
  10. #include <GUIConstantsEx.au3>
  11. #include <StaticConstants.au3>
  12. #include <WindowsConstants.au3>
  13. #include <_HttpRequest.au3>
  14. MultiGUI()
  15. Func MultiGUI()
  16. #Region ### START Koda GUI section ### Form=
  17. $Form3 = GUICreate("Multi Request by SciTE IT", 314, 147, 192, 124)
  18. ToolTip("Welcome to Multi Request!",0,0,"SciTE IT",1,1)
  19. GUISetBkColor(0xABABAB)
  20. $Button1 = GUICtrlCreateButton("Login FB", 8, 56, 83, 49)
  21. GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
  22. $Button2 = GUICtrlCreateButton("Check Token", 208, 56, 91, 49)
  23. GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
  24. $credit = GUICtrlCreateEdit(" WELCOME - TO - MULTI - REQUEST" & @CRLF & " By SciTE IT", 16, 8, 281, 33, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$ES_READONLY))
  25. $Button3 = GUICtrlCreateButton("Get Token", 104, 56, 91, 49)
  26. GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
  27. $Label1 = GUICtrlCreateLabel("Copyright by SciTE IT", 88, 120, 134, 20)
  28. GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
  29. GUICtrlSetColor(-1, 0xFF0000)
  30. GUISetState(@SW_SHOW)
  31. #EndRegion ### END Koda GUI section ###
  32.  
  33. While 1
  34. $nMsg = GUIGetMsg()
  35. Switch $nMsg
  36. Case $GUI_EVENT_CLOSE
  37. Exit
  38. Case $Button1
  39. GUIDelete($Form3)
  40. LoginGUI()
  41. Case $Button3
  42. GUIDelete($Form3)
  43. GetTokenGUI()
  44. Case $Button2
  45. GUIDelete($Form3)
  46. CheckTokenGUI()
  47. EndSwitch
  48. WEnd
  49. EndFunc
  50. Func LoginGUI()
  51. #include <ButtonConstants.au3>
  52. #include <EditConstants.au3>
  53. #include <GUIConstantsEx.au3>
  54. #include <StaticConstants.au3>
  55. #include <WindowsConstants.au3>
  56. #Region ### START Koda GUI section ### Form=
  57. $Form2 = GUICreate("Login", 274, 111, 192, 124)
  58. ToolTip("Welcome to Login!",0,0,"SciTE IT",1,1)
  59. $input2 = GUICtrlCreateInput("", 88, 8, 169, 21)
  60. $input1 = GUICtrlCreateInput("", 88, 32, 169, 21,$ES_PASSWORD)
  61. $Label1 = GUICtrlCreateLabel("Username:", 8, 8, 72, 20)
  62. GUICtrlSetFont(-1, 10, 800, 0, "Arial")
  63. GUICtrlSetColor(-1, 0xFF0000)
  64. $Label2 = GUICtrlCreateLabel("Password:", 8, 32, 69, 20)
  65. GUICtrlSetFont(-1, 10, 800, 0, "Arial")
  66. GUICtrlSetColor(-1, 0xFF0000)
  67. $Button1 = GUICtrlCreateButton("LOGIN", 32, 64, 75, 33)
  68. $Button2 = GUICtrlCreateButton("CANCEL", 160, 64, 75, 33)
  69. GUISetState(@SW_SHOW)
  70. #EndRegion ### END Koda GUI section ###
  71.  
  72. While 1
  73. $nMsg = GUIGetMsg()
  74. Switch $nMsg
  75. Case $GUI_EVENT_CLOSE
  76. GUIDelete($Form2)
  77. MultiGUI()
  78. Case $Button1
  79. If GUICtrlRead($input1) = '' And GUICtrlRead($input2) = '' Then
  80. MsgBox(16,"PD Tool","Please enter your username and password")
  81. Else
  82. $request = _HttpRequest(1,"https://www.facebook.com/")
  83. $cookie = _GetCookie($request)
  84. $username = GUICtrlRead($input2)
  85. $password = GUICtrlRead($input1)
  86. IniWrite(@TempDir & "\Username.ini","U1","User",$username)
  87. IniWrite(@TempDir & "\Password.ini","P1","Pass",$password)
  88. $dataLogin = "lsd=AVqYPu_3&email="&$username&"&pass="&$password&"&login=1"
  89. $header = _HttpRequest(2,'https://www.facebook.com/login/',$dataLogin,$cookie)
  90. _HttpRequest_Test($header)
  91. EndIf
  92. Case $Button2
  93. GUIDelete($Form2)
  94. MultiGUI()
  95. EndSwitch
  96. WEnd
  97. EndFunc
  98. Func GetTokenGUI()
  99. #Region ### START Koda GUI section ### Form=
  100. $Form1 = GUICreate("PD Tool by CoderDuc", 469, 290, 300, 179)
  101. ToolTip("Welcome to Get Token!",0,0,"SciTE IT",1,1)
  102. $input1 = GUICtrlCreateInput("", 88, 8, 201, 21)
  103. $input2 = GUICtrlCreateInput("", 88, 32, 201, 21,$ES_PASSWORD)
  104. $Button1 = GUICtrlCreateButton("Get Token", 96, 64, 121, 57)
  105. GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
  106. $credit = GUICtrlCreateEdit("", 8, 128, 449, 153, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN))
  107. $Username = GUICtrlCreateLabel("Username", 8, 8, 68, 20)
  108. GUICtrlSetFont(-1, 10, 800, 0, "Arial")
  109. GUICtrlSetColor(-1, 0xFF0000)
  110. $Label2 = GUICtrlCreateLabel("Password:", 8, 32, 69, 20)
  111. GUICtrlSetFont(-1, 10, 800, 0, "Arial")
  112. GUICtrlSetColor(-1, 0xFF0000)
  113. GUISetState(@SW_SHOW)
  114. #EndRegion ### END Koda GUI section ###
  115.  
  116. While 1
  117. $nMsg = GUIGetMsg()
  118. Switch $nMsg
  119. Case $GUI_EVENT_CLOSE
  120. GUIDelete($Form1)
  121. MultiGUI()
  122. Case $Button1
  123. If GUICtrlRead($input1) = '' And GUICtrlRead($input2) = '' Then
  124. MsgBox(16,"PD Tool","Please enter your username and password")
  125. Else
  126. GUICtrlSetData($credit,"Đang lấy token. Vui lòng đợi trong giây lát...")
  127. $request = _HttpRequest(1,"https://www.facebook.com/")
  128. $cookie = _GetCookie($request)
  129. $username = GUICtrlRead($input1)
  130. $password = GUICtrlRead($input2)
  131. IniWrite(@TempDir & "\Username.ini","U1","User",$username)
  132. IniWrite(@TempDir & "\Password.ini","P1","Pass",$password)
  133. $dataLogin = "lsd=AVqYPu_3&email="&$username&"&pass="&$password&"&login=1"
  134. $header = _HttpRequest(2,'https://www.facebook.com/login/',$dataLogin,$cookie)
  135. $GetToken =_HttpRequest(2,'https://www.facebook.com/profile.php')
  136. $token = StringRegExp($GetToken,'access_token:"(.*?)"',3)
  137. GUICtrlSetData($credit,"Lấy Token thành công!")
  138. Sleep(1000)
  139. GUICtrlSetData($credit,$token[0])
  140. EndIf
  141. EndSwitch
  142. WEnd
  143. EndFunc
  144. Func CheckTokenGUI()
  145. #include <ButtonConstants.au3>
  146. #include <EditConstants.au3>
  147. #include <GUIConstantsEx.au3>
  148. #include <StaticConstants.au3>
  149. #include <WindowsConstants.au3>
  150. #Region ### START Koda GUI section ### Form=
  151. $Form4 = GUICreate("Check Token", 244, 156, 192, 124)
  152. ToolTip("Welcome to Check Token!",0,0,"SciTE IT",1,1)
  153. GUISetBkColor(0xABABAB)
  154. $Label1 = GUICtrlCreateLabel("Enter your token here:", 8, 16, 133, 20)
  155. GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
  156. $input = GUICtrlCreateInput("", 8, 88, 225, 21)
  157. $Button1 = GUICtrlCreateButton("OK", 24, 120, 75, 25)
  158. $Button2 = GUICtrlCreateButton("Cancel", 144, 120, 75, 25)
  159. GUISetState(@SW_SHOW)
  160. #EndRegion ### END Koda GUI section ###
  161.  
  162. While 1
  163. $nMsg = GUIGetMsg()
  164. Switch $nMsg
  165. Case $GUI_EVENT_CLOSE
  166. GUIDelete($Form4)
  167. MultiGUI()
  168. Case $Button1
  169. $request = _HttpRequest(1,"https://www.facebook.com/")
  170. $cookie = _GetCookie($request)
  171. $username = IniRead(@TempDir & "\Username.ini","U1","User","Default Value")
  172. $password = IniRead(@TempDir & "\Password.ini","P1","Pass","Default Value")
  173. $dataLogin = "lsd=AVqYPu_3&email="&$username&"&pass="&$password&"&login=1"
  174. $header = _HttpRequest(2,'https://www.facebook.com/login/',$dataLogin,$cookie)
  175. $GetToken =_HttpRequest(2,'https://www.facebook.com/profile.php')
  176. $token = StringRegExp($GetToken,'access_token:"(.*?)"',3)
  177. $input = InputBox("Check Token by CoderDuc","Enter your token here: ")
  178. If not $input Then
  179. Exit
  180. ElseIf StringInStr($input,$tokenFinal) Then
  181. MsgBox(64,"Check Token","Token của bạn đúng!")
  182. FileDelete(@TempDir & "Username.ini")
  183. FileDelete(@TempDir & "Password.ini")
  184. Else
  185. MsgBox(16,"Check Token","Token của bạn sai!")
  186. EndIf
  187. Case $Button2
  188. GUIDelete($Form4)
  189. MultiGUI()
  190. EndSwitch
  191. WEnd
  192. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement