Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
- #AutoIt3Wrapper_Icon=D:\test.ico
- #AutoIt3Wrapper_Compression=4
- #AutoIt3Wrapper_UseUpx=y
- #AutoIt3Wrapper_Res_Comment=Multi Request by SciTE IT
- #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>
- MultiGUI()
- Func MultiGUI()
- #Region ### START Koda GUI section ### Form=
- $Form3 = GUICreate("Multi Request by SciTE IT", 314, 147, 192, 124)
- ToolTip("Welcome to Multi Request!",0,0,"SciTE IT",1,1)
- GUISetBkColor(0xABABAB)
- $Button1 = GUICtrlCreateButton("Login FB", 8, 56, 83, 49)
- GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
- $Button2 = GUICtrlCreateButton("Check Token", 208, 56, 91, 49)
- GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
- $credit = GUICtrlCreateEdit(" WELCOME - TO - MULTI - REQUEST" & @CRLF & " By SciTE IT", 16, 8, 281, 33, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$ES_READONLY))
- $Button3 = GUICtrlCreateButton("Get Token", 104, 56, 91, 49)
- GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
- $Label1 = GUICtrlCreateLabel("Copyright by SciTE IT", 88, 120, 134, 20)
- GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
- GUICtrlSetColor(-1, 0xFF0000)
- GUISetState(@SW_SHOW)
- #EndRegion ### END Koda GUI section ###
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE
- Exit
- Case $Button1
- GUIDelete($Form3)
- LoginGUI()
- Case $Button3
- GUIDelete($Form3)
- GetTokenGUI()
- Case $Button2
- GUIDelete($Form3)
- CheckTokenGUI()
- EndSwitch
- WEnd
- EndFunc
- Func LoginGUI()
- #include <ButtonConstants.au3>
- #include <EditConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <StaticConstants.au3>
- #include <WindowsConstants.au3>
- #Region ### START Koda GUI section ### Form=
- $Form2 = GUICreate("Login", 274, 111, 192, 124)
- ToolTip("Welcome to Login!",0,0,"SciTE IT",1,1)
- $input2 = GUICtrlCreateInput("", 88, 8, 169, 21)
- $input1 = GUICtrlCreateInput("", 88, 32, 169, 21,$ES_PASSWORD)
- $Label1 = GUICtrlCreateLabel("Username:", 8, 8, 72, 20)
- GUICtrlSetFont(-1, 10, 800, 0, "Arial")
- GUICtrlSetColor(-1, 0xFF0000)
- $Label2 = GUICtrlCreateLabel("Password:", 8, 32, 69, 20)
- GUICtrlSetFont(-1, 10, 800, 0, "Arial")
- GUICtrlSetColor(-1, 0xFF0000)
- $Button1 = GUICtrlCreateButton("LOGIN", 32, 64, 75, 33)
- $Button2 = GUICtrlCreateButton("CANCEL", 160, 64, 75, 33)
- GUISetState(@SW_SHOW)
- #EndRegion ### END Koda GUI section ###
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE
- GUIDelete($Form2)
- MultiGUI()
- Case $Button1
- If GUICtrlRead($input1) = '' And GUICtrlRead($input2) = '' Then
- MsgBox(16,"PD Tool","Please enter your username and password")
- Else
- $request = _HttpRequest(1,"https://www.facebook.com/")
- $cookie = _GetCookie($request)
- $username = GUICtrlRead($input2)
- $password = GUICtrlRead($input1)
- IniWrite(@TempDir & "\Username.ini","U1","User",$username)
- IniWrite(@TempDir & "\Password.ini","P1","Pass",$password)
- $dataLogin = "lsd=AVqYPu_3&email="&$username&"&pass="&$password&"&login=1"
- $header = _HttpRequest(2,'https://www.facebook.com/login/',$dataLogin,$cookie)
- _HttpRequest_Test($header)
- EndIf
- Case $Button2
- GUIDelete($Form2)
- MultiGUI()
- EndSwitch
- WEnd
- EndFunc
- Func GetTokenGUI()
- #Region ### START Koda GUI section ### Form=
- $Form1 = GUICreate("PD Tool by CoderDuc", 469, 290, 300, 179)
- ToolTip("Welcome to Get Token!",0,0,"SciTE IT",1,1)
- $input1 = GUICtrlCreateInput("", 88, 8, 201, 21)
- $input2 = GUICtrlCreateInput("", 88, 32, 201, 21,$ES_PASSWORD)
- $Button1 = GUICtrlCreateButton("Get Token", 96, 64, 121, 57)
- GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
- $credit = GUICtrlCreateEdit("", 8, 128, 449, 153, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN))
- $Username = GUICtrlCreateLabel("Username", 8, 8, 68, 20)
- GUICtrlSetFont(-1, 10, 800, 0, "Arial")
- GUICtrlSetColor(-1, 0xFF0000)
- $Label2 = GUICtrlCreateLabel("Password:", 8, 32, 69, 20)
- GUICtrlSetFont(-1, 10, 800, 0, "Arial")
- GUICtrlSetColor(-1, 0xFF0000)
- GUISetState(@SW_SHOW)
- #EndRegion ### END Koda GUI section ###
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE
- GUIDelete($Form1)
- MultiGUI()
- Case $Button1
- If GUICtrlRead($input1) = '' And GUICtrlRead($input2) = '' Then
- MsgBox(16,"PD Tool","Please enter your username and password")
- Else
- GUICtrlSetData($credit,"Đang lấy token. Vui lòng đợi trong giây lát...")
- $request = _HttpRequest(1,"https://www.facebook.com/")
- $cookie = _GetCookie($request)
- $username = GUICtrlRead($input1)
- $password = GUICtrlRead($input2)
- IniWrite(@TempDir & "\Username.ini","U1","User",$username)
- IniWrite(@TempDir & "\Password.ini","P1","Pass",$password)
- $dataLogin = "lsd=AVqYPu_3&email="&$username&"&pass="&$password&"&login=1"
- $header = _HttpRequest(2,'https://www.facebook.com/login/',$dataLogin,$cookie)
- $GetToken =_HttpRequest(2,'https://www.facebook.com/profile.php')
- $token = StringRegExp($GetToken,'access_token:"(.*?)"',3)
- GUICtrlSetData($credit,"Lấy Token thành công!")
- Sleep(1000)
- GUICtrlSetData($credit,$token[0])
- EndIf
- EndSwitch
- WEnd
- EndFunc
- Func CheckTokenGUI()
- #include <ButtonConstants.au3>
- #include <EditConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <StaticConstants.au3>
- #include <WindowsConstants.au3>
- #Region ### START Koda GUI section ### Form=
- $Form4 = GUICreate("Check Token", 244, 156, 192, 124)
- ToolTip("Welcome to Check Token!",0,0,"SciTE IT",1,1)
- GUISetBkColor(0xABABAB)
- $Label1 = GUICtrlCreateLabel("Enter your token here:", 8, 16, 133, 20)
- GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
- $input = GUICtrlCreateInput("", 8, 88, 225, 21)
- $Button1 = GUICtrlCreateButton("OK", 24, 120, 75, 25)
- $Button2 = GUICtrlCreateButton("Cancel", 144, 120, 75, 25)
- GUISetState(@SW_SHOW)
- #EndRegion ### END Koda GUI section ###
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE
- GUIDelete($Form4)
- MultiGUI()
- Case $Button1
- $request = _HttpRequest(1,"https://www.facebook.com/")
- $cookie = _GetCookie($request)
- $username = IniRead(@TempDir & "\Username.ini","U1","User","Default Value")
- $password = IniRead(@TempDir & "\Password.ini","P1","Pass","Default Value")
- $dataLogin = "lsd=AVqYPu_3&email="&$username&"&pass="&$password&"&login=1"
- $header = _HttpRequest(2,'https://www.facebook.com/login/',$dataLogin,$cookie)
- $GetToken =_HttpRequest(2,'https://www.facebook.com/profile.php')
- $token = StringRegExp($GetToken,'access_token:"(.*?)"',3)
- $input = InputBox("Check Token by CoderDuc","Enter your token here: ")
- If not $input Then
- Exit
- ElseIf StringInStr($input,$tokenFinal) Then
- MsgBox(64,"Check Token","Token của bạn đúng!")
- FileDelete(@TempDir & "Username.ini")
- FileDelete(@TempDir & "Password.ini")
- Else
- MsgBox(16,"Check Token","Token của bạn sai!")
- EndIf
- Case $Button2
- GUIDelete($Form4)
- MultiGUI()
- EndSwitch
- WEnd
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement