Skip to content

Instantly share code, notes, and snippets.

View mpd980's full-sized avatar
🏠
Working from home

Sir Mithilesh mpd980

🏠
Working from home
  • India
View GitHub Profile
@mpd980
mpd980 / fb.ps1
Created September 30, 2020 05:12 — forked from potatoqualitee/fb.ps1
login to facebook mobile using powershell
$url = "https://m.facebook.com/login.php"
$webrequest = Invoke-WebRequest -Uri $url -SessionVariable session
# The cookies aren't always set properly. Here, we'll force set them
$setcookies = $webrequest.Headers["Set-Cookie"].Split(";").Trim()
foreach ($setcookie in $setcookies) {
$cookie = New-Object System.Net.Cookie
$cookie.Name = $setcookie.split("=")[0]
$cookie.Value = $setcookie.split("=")[1]
$cookie.Domain = ".facebook.com"