Facebook Login

11/01/2012 01:09 Requiable#1
Ich will nen Session ID Grabber machen für ein Spiel in Facebook, aber ich schaff nicht mal den Facebook login

Code:
#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.8.1
 Author:         Requiable

 Script Function:
Grabbing UID and SID from Uridium Wars.

#ce ----------------------------------------------------------------------------

; Script Start



#include 
#include 
#include 
#include 
#include 
#include 
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("UID  SID Grabber for UW", 487, 196, 190, 121)
$Input1 = GUICtrlCreateInput("", 112, 24, 121, 21)
$Input2 = GUICtrlCreateInput("", 112, 80, 121, 21)
$Label1 = GUICtrlCreateLabel("E-Mail:", 16, 24, 62, 28)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
$Label2 = GUICtrlCreateLabel("Password:", 16, 72, 91, 28)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
$Group1 = GUICtrlCreateGroup("Info", 240, 0, 241, 105)
$Label3 = GUICtrlCreateLabel("Your SID and UID will be saved in a Textfile", 256, 24, 211, 17)
$Label4 = GUICtrlCreateLabel("where you saved the Grabber.", 256, 40, 147, 17)
$Label5 = GUICtrlCreateLabel("(c) by Requiable", 256, 80, 81, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("Get UID and SID", 24, 120, 435, 65)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$hsession = _WinHttpOpen("Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20100101 Firefox/14.0.1")
$hConnect = _WinHttpConnect($hsession, "www.facebook.com")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_FbLogin()
EndSwitch
WEnd

Func _FBLogin()

    $email = StringReplace($Input1, '@', '%40')
    $sHTML = _WinHttpSimpleRequest($hConnect, "GET", "")

    $sPost = "lsd=AVrV5E1V&email=" & $Input1 & "&pass=" & $Input2 & "&persistent=1&default_persistent=1&charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84"
    $sHTML = _WinHttpSimpleRequest($hConnect, "POST", "login.php?login_attempt=1", "https://www.facebook.com/", $sPost)


    _WinHttpCloseHandle($hConnect)

$hConnect = _WinhttpConnect($hSession, "www.facebook.com")
    $sHTml = _WinHttpSimpleRequest($hConnect, "GET", "home.php")

  ;  FileDelete("site.html") war für mich zum überprüfen 
  ;  FileWrite("site.html", $sHTML) das auch xD
EndFunc
Was muss ich ändern, dass es geht. Könnt ja selber mal testen und schauen was bei euch kommt.

MfG Requiable
11/01/2012 02:43 Achat#2
Code:
#cs ----------------------------------------------------------------------------
	
	AutoIt Version: 3.3.8.1
	Author:         Requiable
	
	Script Function:
	Grabbing UID and SID from Uridium Wars.
	
#ce ----------------------------------------------------------------------------

; Script Start



#include
#include
#include
#include
#include
#include
#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("UID  SID Grabber for UW", 487, 196, 190, 121)
$Input1 = GUICtrlCreateInput("", 112, 24, 121, 21)
$Input2 = GUICtrlCreateInput("", 112, 80, 121, 21)
$Label1 = GUICtrlCreateLabel("E-Mail:", 16, 24, 62, 28)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
$Label2 = GUICtrlCreateLabel("Password:", 16, 72, 91, 28)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
$Group1 = GUICtrlCreateGroup("Info", 240, 0, 241, 105)
$Label3 = GUICtrlCreateLabel("Your SID and UID will be saved in a Textfile", 256, 24, 211, 17)
$Label4 = GUICtrlCreateLabel("where you saved the Grabber.", 256, 40, 147, 17)
$Label5 = GUICtrlCreateLabel("(c) by Requiable", 256, 80, 81, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("Get UID and SID", 24, 120, 435, 65)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Button1
			_FbLogin()
	EndSwitch
WEnd

Func _FBLogin()
	$hsession = _WinHttpOpen("Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20100101 Firefox/14.0.1")
	$hConnect = _WinHttpConnect($hsession, "www.facebook.com")
	$email = StringReplace(GUICtrlRead($Input1), '@', '%40')
	$sHTML = _WinHttpSimpleRequest($hConnect, "GET", "")
	$sPost = "lsd=AVrV5E1V&email=" & GUICtrlRead($Input1) & "&pass=" & GUICtrlRead($Input2) & "&persistent=1&default_persistent=1&charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84"
	$sHTML = _WinHttpSimpleRequest($hConnect, "POST", "login.php?login_attempt=1", "https://www.facebook.com/", $sPost)
	$sHTML = _WinHttpSimpleRequest($hConnect, "GET", "home.php")

	;  FileDelete("site.html") war für mich zum überprüfen
	;  FileWrite("site.html", $sHTML) das auch xD
	_Winhttpclosehandle($hConnect)
	_Winhttpclosehandle($hsession)
EndFunc   ;==>_FBLogin
MfG
11/01/2012 11:51 Requiable#3
Genau den gleichen Fehler hab ich 5 Minuten zuvor bei nem anderen Login gemacht :facepalm:

Wieso hab ich das gleich wieder vergessen?

Aber Danke ;)

Lawliet pls closen :D
11/02/2012 16:44 Lawliet#4
#closed (on request)