Skip to content

Instantly share code, notes, and snippets.

@karelhala
Created March 2, 2013 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karelhala/5071863 to your computer and use it in GitHub Desktop.
Save karelhala/5071863 to your computer and use it in GitHub Desktop.
Do you wonder how to use wget to login faceboook? Well this is exactly how to do it. Just paste it in console, change email, passwd and you can log in very easily.
wget "https://www.facebook.com/login.php?login_attempt=1" --post-data "email=mail&pass=heslo" --no-check-certificate --keep-session-cookies --save-cookies=cookies --load-cookies=cookies -U "Mozilla/5.0 (Windows NT 5.2; rv:2.0.1) Gecko/20100101 Firefox/4.0.1" -S
#Description what does every option do
#--post-data tells wget to send these information
#--keep-session-cookies mark your cookies to be used later on
#--save-cookies=cookies save your cookies into file "cookies" you need this to bypass cookies verification on facebook
#--load-cookies you need this to force facebook to think you use cookies
#-U "Mozilla/5.0 (Windows NT 5.2; rv:2.0.1) Gecko/20100101 Firefox/4.0.1" makes facebook to think you use proper browser, otherwise facebook wouldn't log-in
#-S print out whole communication to console
#after the running this script, you can check if everything is ok by openning file login.php?login_attempt=1 it should show your timeline
#after usefull login you can run any kind of script and either download pictures by their name, send messages, check your RSS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment