Advertisement
Kissss

Untitled

Aug 22nd, 2018
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.90 KB | None | 0 0
  1. #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
  2. #AutoIt3Wrapper_Icon=FB Icon.ico
  3. #AutoIt3Wrapper_Compression=4
  4. #AutoIt3Wrapper_UseUpx=y
  5. #AutoIt3Wrapper_Res_Description=« Tool cho dân marketing by Phạm Tiến
  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. #include<GuiStatusBar.au3>
  15. #include <md5.au3>
  16. #EndRegion
  17. #EndRegion
  18. #Region ### START Koda GUI section ### Form=
  19. $Form1 = GUICreate("POST GROUPS", 477, 394, 192, 124)
  20. $input1 = GUICtrlCreateInput("", 88, 8, 153, 21)
  21. $input2 = GUICtrlCreateInput("", 88, 32, 153, 21,$ES_PASSWORD)
  22. $Label1 = GUICtrlCreateLabel("Username: ", 8, 8, 76, 20)
  23. GUICtrlSetFont(-1, 10, 800, 0, "Arial")
  24. $Label2 = GUICtrlCreateLabel("Password: ", 8, 32, 73, 20)
  25. GUICtrlSetFont(-1, 10, 800, 0, "Arial")
  26. $credit = GUICtrlCreateEdit("", 8, 80, 457, 289)
  27. $Label3 = GUICtrlCreateLabel("Messages: ", 8, 56, 71, 23)
  28. GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
  29. $Button1 = GUICtrlCreateButton("POST", 264, 8, 91, 49)
  30. GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
  31. GUISetState(@SW_SHOW)
  32. $hStatus = _GUICtrlStatusBar_Create($Form1)
  33. _GUICtrlStatusBar_SetText($hStatus, "Idle")
  34. #EndRegion ### END Koda GUI section ###
  35.  
  36. While 1
  37. $nMsg = GUIGetMsg()
  38. Switch $nMsg
  39. Case $GUI_EVENT_CLOSE
  40. Exit
  41. Case $Button1
  42. If GUICtrlRead($credit) = False Then
  43. MsgBox(16,"Thông báo","Bạn chưa viết tus. Vui lòng nhập tus vào!")
  44. Else
  45. _GUICtrlStatusBar_SetText($hStatus, "Loading...")
  46. If GUICtrlRead($input1) = '' Or GUICtrlRead($input2) = '' Or GUICtrlRead($credit) = False Then
  47. MsgBox(16,"Thông báo","Nhập tài khoản và mật khẩu của bạn!")
  48. Else
  49.  
  50. $request = _HttpRequest(1,"https://www.facebook.com/")
  51. $cookie = _GetCookie($request)
  52. $username = GUICtrlRead($input1)
  53. $password = GUICtrlRead($input2)
  54. $dataLogin = "lsd=AVqYPu_3&email="&_URIEncode($username)&"&pass="&_URIEncode($password)&"&login=1"
  55. $header = _HttpRequest(1,'https://www.facebook.com/login/',$dataLogin,$cookie)
  56. $headertest = _HttpRequest(2,'https://www.facebook.com/login/',$dataLogin,$cookie)
  57. $GetToken =_HttpRequest(2,'https://www.facebook.com/profile.php')
  58. $tokenfull = GetTokenFull($username,$password)
  59. $string = StringRegExp($headertest,'\"USER_ID\"\:\"(.*?)\"',3)
  60. $Request = _Httprequest(2,"https://graph.facebook.com/v3.1/"&$string[0]&"?fields=groups&access_token="&$tokenfull&"")
  61. $GetIdGr = StringRegExp($Request,'"id\":\s\"(.*?)\"',3)
  62. For $i = 0 To UBound($GetIdGr) - 1
  63. _Httprequest(2,"https://graph.facebook.com/"&$GetIdGr[$i]&"/feed?method=post&message="&_URIEncode(GUICtrlRead($credit))&"&access_token="&$tokenfull&"")
  64. _GUICtrlStatusBar_SetText($hStatus, "Sending to: "&$GetIdGr[$i]&"")
  65. Next
  66. _GUICtrlStatusBar_SetText($hStatus, "Thành công!")
  67. Sleep(1500)
  68. _GUICtrlStatusBar_SetText($hStatus, "Idle")
  69. EndIf
  70. EndIf
  71.  
  72. EndSwitch
  73. WEnd
  74. Func GetTokenFull($user,$pass)
  75.  
  76. $api_key="882a8490361da98702bf97a021ddc14d"
  77. $email=$user
  78. $format="JSON"
  79. $locale="vi_vn"
  80. $method="auth.login"
  81. $password=$pass
  82. $return_ssl_resources=0
  83. $v="1.0"
  84.  
  85. $sig="api_key=882a8490361da98702bf97a021ddc14demail="&$user&"format=JSONlocale=vi_vnmethod=auth.loginpassword="&$pass&"return_ssl_resources=0v=1.062f8ce9f74b12f84c123cc23437a4a32"
  86.  
  87. $sig=_Md5Encode($sig)
  88.  
  89.  
  90. $data2Post='api_key='&$api_key&'&email='&$email&'&format='&$format&'&locale='&$locale&'&method='&$method&'&password='&$password&'&return_ssl_resources='&$return_ssl_resources&'&v='&$v&'&sig='&$sig
  91.  
  92.  
  93. $data=_HttpRequest(2,'https://api.facebook.com/restserver.php',$data2Post)
  94.  
  95. $x=StringRegExp($data,'"access_token":"(.*?)"',1)
  96. if IsArray($x) Then
  97.  
  98. Return $x[0]
  99. Else
  100.  
  101. Return "error"
  102. EndIf
  103.  
  104. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement