Skip to content

Instantly share code, notes, and snippets.

@rajapaju
Forked from hubgit/facebook-login.sh
Created October 12, 2011 18:00
Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save rajapaju/1282006 to your computer and use it in GitHub Desktop.
Save rajapaju/1282006 to your computer and use it in GitHub Desktop.
Login to Facebook using cURL
#!/bin/bash
EMAIL='YOUR_EMAIL' # edit this
PASS='YOUR_PASSWORD' # edit this
COOKIES='cookies.txt'
USER_AGENT='Firefox'
curl -X GET 'https://www.facebook.com/home.php' --verbose --user-agent $USER_AGENT --cookie $COOKIES --cookie-jar $COOKIES --location # redirects to https://login.facebook.com/login.php
curl -X POST 'https://login.facebook.com/login.php' --verbose --user-agent $USER_AGENT --data-urlencode "email=${EMAIL}" --data-urlencode "pass=${PASS}" --cookie $COOKIES --cookie-jar $COOKIES
curl -X GET 'https://www.facebook.com/home.php' --verbose --user-agent $USER_AGENT --cookie $COOKIES --cookie-jar $COOKIES
@VolodymyrPliuta
Copy link

Can you tell me what can be a reason, to log in from curl to Facebook?

@nomenclatures
Copy link

Can you tell me what can be a reason, to log in from curl to Facebook?

I will and im not a fully fledged Developer but married to one whose strength is in virrualization and data control - Im here looking for a way to brute force manually around his bullsh*t.

Because of those who run networks that abuse Static DNS vs running a Dynamic DNS. Virtualized copies of sites are no different than Phishing sites. My spouse is a liar whose gone as far as to abuse them to hide shit from me and claim no tampering has been in play yet I've clearly identified everything isn't showing me the defaults the sites normally would. Like the 2nd header information for my google login takes me to a version 2 service page suddenly via quic and account control is forcing me to myaccount.google.com or my- account.google.com which doesn't show me enrolled in developer services or even my google tag manager services. Why? because hes used those on my account to pump the code to help stop me from seeing information that triggers off the tags hes specifically programmed the code to react to in order to stay a step ahead of me in his abuse of development services to hide whatever it is he dont want me to know. I thought I lost my mind or something for years before having someone i respect in IT and development check out things with me and tell me I was not going crazy its actually happening but my spouse who's got total control of our funds/ router/ and services even stands there denying the other IT tech is correct. My spouse is a bad bad man to put it simply whos abusing his knowledge in development in very illegal ways and its hard to even report him or get him caught when he's got control over all my devices - he even tried hacking my Nintendo DS-XL to keep it from ever being able to behave as it should if i were to connect to a network not under his control [lookup key subjects "roaming profile services" "public versus private networks" and " "network account security and management" etc on provider pages such as Microsoft Azure Services for better understanding of how your information travels around the internet with you - "beacon services" as well.]

@nomenclatures
Copy link

sorry for the lengthy post but that's exactly why cURL'ing is a vital skill to learn and develop a habit in doing vs Trusting any network you're on.
Networking, Informational Services, and Security Development/Cryptography has that level of control across the internet that the average active user such as myself is unaware of & I didn't even explain it wholly!

@bibliomatic
Copy link

sorry for the lengthy post but that's exactly why cURL'ing is a vital skill to learn and develop a habit in doing vs Trusting any network you're on.
Networking, Informational Services, and Security Development/Cryptography has that level of control across the internet that the average active user such as myself is unaware of & I didn't even explain it wholly!

I recommend you use a VPN from a provider you can trust when using a hostile network. Make sure you statically configure your DNS settings so there's no leaking your DNS queries to the network adversary.
Man in the middle attacks often employ proxies or other stream parsers to manipulate HTTP traffic in real time. Completely encrypting your traffic with a VPN will render the proxy/parsers useless.
If Mr crypto expert is abusing PKI (public key infrastructure) to decrypt your traffic then the tell tale sign would be in your operating systems certificate store. He would have had to install a certificate he generated and placed it in your certificate store.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment