Created
January 23, 2013 11:31
-
-
Save celoron/4604590 to your computer and use it in GitHub Desktop.
very simple script that can login facebook.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cookielib, urllib2, time | |
| from pyquery import PyQuery as pq | |
| email="mail@mail.com" | |
| pwd="yeasure :D" | |
| cj = cookielib.CookieJar() | |
| go = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj)) | |
| d= pq(go.open("http://www.facebook.com/").read()) | |
| lsd = d("input").filter(lambda i, this: pq(this).attr("name") == 'lsd').attr("value") | |
| lgnrnd= d("input").filter(lambda i, this: pq(this).attr("name") == 'lgnrnd').attr("value") | |
| data= "" | |
| #bot protectors | |
| data+= "lsd=%s&" % lsd | |
| data+= "lgnrnd=%s&" % lgnrnd | |
| data+= "lgnjs=%s&" % time.time() | |
| #login req | |
| data+= "email=%s&" % email | |
| data+= "pass=%s&" % pwd | |
| h=go.open("https://www.facebook.com/login.php", data).read() | |
| open("out.html", "w+").write(h) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment