Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
- #AutoIt3Wrapper_Icon=FB Icon.ico
- #AutoIt3Wrapper_Compression=4
- #AutoIt3Wrapper_UseUpx=y
- #AutoIt3Wrapper_Res_Description=« Tool cho dân marketing by Phạm Tiến
- #AutoIt3Wrapper_Res_Fileversion=1.3
- #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
- #include <ButtonConstants.au3>
- #include <EditConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <StaticConstants.au3>
- #include <WindowsConstants.au3>
- #include <_HttpRequest.au3>
- #include<GuiStatusBar.au3>
- #include <md5.au3>
- #EndRegion
- #EndRegion
- #Region ### START Koda GUI section ### Form=
- $Form1 = GUICreate("POST GROUPS", 477, 394, 192, 124)
- $input1 = GUICtrlCreateInput("", 88, 8, 153, 21)
- $input2 = GUICtrlCreateInput("", 88, 32, 153, 21,$ES_PASSWORD)
- $Label1 = GUICtrlCreateLabel("Username: ", 8, 8, 76, 20)
- GUICtrlSetFont(-1, 10, 800, 0, "Arial")
- $Label2 = GUICtrlCreateLabel("Password: ", 8, 32, 73, 20)
- GUICtrlSetFont(-1, 10, 800, 0, "Arial")
- $credit = GUICtrlCreateEdit("", 8, 80, 457, 289)
- $Label3 = GUICtrlCreateLabel("Messages: ", 8, 56, 71, 23)
- GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
- $Button1 = GUICtrlCreateButton("POST", 264, 8, 91, 49)
- GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
- GUISetState(@SW_SHOW)
- $hStatus = _GUICtrlStatusBar_Create($Form1)
- _GUICtrlStatusBar_SetText($hStatus, "Idle")
- #EndRegion ### END Koda GUI section ###
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE
- Exit
- Case $Button1
- If GUICtrlRead($credit) = False Then
- MsgBox(16,"Thông báo","Bạn chưa viết tus. Vui lòng nhập tus vào!")
- Else
- _GUICtrlStatusBar_SetText($hStatus, "Loading...")
- If GUICtrlRead($input1) = '' Or GUICtrlRead($input2) = '' Or GUICtrlRead($credit) = False Then
- MsgBox(16,"Thông báo","Nhập tài khoản và mật khẩu của bạn!")
- Else
- $request = _HttpRequest(1,"https://www.facebook.com/")
- $cookie = _GetCookie($request)
- $username = GUICtrlRead($input1)
- $password = GUICtrlRead($input2)
- $dataLogin = "lsd=AVqYPu_3&email="&_URIEncode($username)&"&pass="&_URIEncode($password)&"&login=1"
- $header = _HttpRequest(1,'https://www.facebook.com/login/',$dataLogin,$cookie)
- $headertest = _HttpRequest(2,'https://www.facebook.com/login/',$dataLogin,$cookie)
- $GetToken =_HttpRequest(2,'https://www.facebook.com/profile.php')
- $tokenfull = GetTokenFull($username,$password)
- $string = StringRegExp($headertest,'\"USER_ID\"\:\"(.*?)\"',3)
- $Request = _Httprequest(2,"https://graph.facebook.com/v3.1/"&$string[0]&"?fields=groups&access_token="&$tokenfull&"")
- $GetIdGr = StringRegExp($Request,'"id\":\s\"(.*?)\"',3)
- For $i = 0 To UBound($GetIdGr) - 1
- _Httprequest(2,"https://graph.facebook.com/"&$GetIdGr[$i]&"/feed?method=post&message="&_URIEncode(GUICtrlRead($credit))&"&access_token="&$tokenfull&"")
- _GUICtrlStatusBar_SetText($hStatus, "Sending to: "&$GetIdGr[$i]&"")
- Next
- _GUICtrlStatusBar_SetText($hStatus, "Thành công!")
- Sleep(1500)
- _GUICtrlStatusBar_SetText($hStatus, "Idle")
- EndIf
- EndIf
- EndSwitch
- WEnd
- Func GetTokenFull($user,$pass)
- $api_key="882a8490361da98702bf97a021ddc14d"
- $email=$user
- $format="JSON"
- $locale="vi_vn"
- $method="auth.login"
- $password=$pass
- $return_ssl_resources=0
- $v="1.0"
- $sig="api_key=882a8490361da98702bf97a021ddc14demail="&$user&"format=JSONlocale=vi_vnmethod=auth.loginpassword="&$pass&"return_ssl_resources=0v=1.062f8ce9f74b12f84c123cc23437a4a32"
- $sig=_Md5Encode($sig)
- $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
- $data=_HttpRequest(2,'https://api.facebook.com/restserver.php',$data2Post)
- $x=StringRegExp($data,'"access_token":"(.*?)"',1)
- if IsArray($x) Then
- Return $x[0]
- Else
- Return "error"
- EndIf
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement