Add link to sites.md in readme and merge with master

pull/22/head
anto-christo 6 years ago
commit a3ff122d9d

7
.gitignore vendored

@ -1,3 +1,10 @@
# Jupyter Notebook # Jupyter Notebook
.ipynb_checkpoints .ipynb_checkpoints
*.ipynb *.ipynb
# Output files, except requirements.txt
*.txt
!requirements.txt
# Comma-Separated Values (CSV) Reports
*.csv

@ -1,13 +1,15 @@
# Sherlock # Sherlock
> Find usernames across over 75 social networks > Find usernames across [social networks](https://github.com/sdushantha/sherlock/blob/master/sites.md)
<p align="center"> <p align="center">
<img src="sherlock_preview.png"> <img src="preview.png">
</a> </a>
</p> </p>
## Installation ## Installation
**NOTE**: Python 3.6 or higher is required.
```bash ```bash
# clone the repo # clone the repo
$ git clone https://github.com/sdushantha/sherlock.git $ git clone https://github.com/sdushantha/sherlock.git
@ -20,87 +22,30 @@ $ pip3 install -r requirements.txt
``` ```
## Usage ## Usage
Just run ```python3 sherlock.py```
All of the accounts found will be stored in a text file with their username (e.g ```user123.txt```)
## List of Social Networks ```bash
1. [500px](https://500px.com) $ python3 sherlock.py --help
2. [About.me](https://about.me) usage: sherlock.py [-h] [--version] [--verbose] [--quiet] [--csv] [--tor] [--unique-tor]
3. [AngelList](https://angel.co) USERNAMES [USERNAMES ...]
4. [BLIP.fm](https://blip.fm)
5. [Bandcamp](https://www.bandcamp.com) Sherlock: Find Usernames Across Social Networks (Version 0.1.0)
6. [Behance](https://www.behance.net)
7. [BitBucket](https://bitbucket.org) positional arguments:
8. [Blogger](https://www.blogspot.com) USERNAMES One or more usernames to check with social networks.
9. [BuzzFeed](https://buzzfeed.com)
10. [Canva](https://www.canva.com) optional arguments:
11. [CashMe](https://cash.me) -h, --help show this help message and exit
12. [Codecademy](https://www.codecademy.com) --version Display version information and dependencies.
13. [Codementor](https://www.codementor.io) --verbose, -v, -d, --debug
14. [ColourLovers](https://www.colourlovers.com) Display extra debugging information.
15. [Contently](https://www.contently.com) --quiet, -q Disable debugging information (Default Option).
16. [DailyMotion](https://www.dailymotion.com) --csv Create Comma-Separated Values (CSV) File.
17. [Designspiration](https://www.designspiration.net) --tor, -t Make requests over TOR; increases runtime; requires TOR to be installed and in system path.
18. [DeviantART](https://www.deviantart.com) --unique-tor, -u Make requests over TOR with new TOR circuit after each request; increases runtime; requires TOR to be installed and in system path.
19. [Disqus](https://disqus.com) ```
20. [Dribbble](https://dribbble.com)
21. [Ebay](https://www.ebay.com)
22. [Ello](https://ello.co)
23. [Etsy](https://www.etsy.com)
24. [Facebook](https://www.facebook.com)
25. [Flickr](https://www.flickr.com)
26. [Flipboard](https://flipboard.com)
27. [Fotolog](https://fotolog.com)
28. [Foursquare](https://foursquare.com)
29. [GitHub](https://www.github.com)
30. [GoodReads](https://www.goodreads.com)
31. [Google Plus](https://plus.google.com)
32. [Gravatar](http://en.gravatar.com)
33. [Gumroad](https://www.gumroad.com)
34. [HackerNews](https://news.ycombinator.com)
35. [HackerOne](https://hackerone.com)
36. [Houzz](https://houzz.com)
37. [IFTTT](https://www.ifttt.com)
38. [Imgur](https://imgur.com)
39. [Instagram](https://www.instagram.com)
40. [Instructables](https://www.instructables.com)
41. [Keybase](https://keybase.io)
42. [Kongregate](https://www.kongregate.com)
43. [LiveJournal](https://www.livejournal.com)
44. [Medium](https://medium.com)
45. [MixCloud](https://www.mixcloud.com)
46. [Newgrounds](https://www.newgrounds.com)
47. [Pastebin](https://pastebin.com)
48. [Patreon](https://www.patreon.com)
49. [Pexels](https://www.pexels.com)
50. [Pinterest](https://www.pinterest.com)
51. [Reddit](https://www.reddit.com)
52. [ReverbNation](https://www.reverbnation.com)
53. [Roblox](https://www.roblox.com)
54. [Scribd](https://www.scribd.com)
55. [Slack](https://www.slack.com)
56. [SlideShare](https://slideshare.net)
57. [SoundCloud](https://soundcloud.com)
58. [Spotify](https://open.spotify.com)
59. [Steam](https://steamcommunity.com)
60. [Tinder](https://www.gotinder.com)
61. [Trakt](https://www.trakt.tv)
62. [Trip](https://www.trip.skyscanner.com)
63. [TripAdvisor](https://tripadvisor.com)
64. [Twitter](https://www.twitter.com)
65. [Unsplash](https://unsplash.com)
66. [VK](https://vk.com)
67. [VSCO](https://vsco.co)
68. [Vimeo](https://vimeo.com)
69. [Wattpad](https://www.wattpad.com)
70. [We Heart It](https://weheartit.com)
71. [WordPress](https://www.wordpress.com)
72. [YouTube](https://www.youtube.com)
73. [devRant](https://devrant.com)
74. [iMGSRC.RU](https://imgsrc.ru)
75. [last.fm](https://last.fm)
For example, run ```python3 sherlock.py user123```, and all of the accounts
found will be stored in a text file with the username (e.g ```user123.txt```).
## License ## License
MIT License MIT License

@ -1,360 +1,462 @@
{ {
"Instagram": { "Instagram": {
"url": "https://www.instagram.com/{}", "url": "https://www.instagram.com/{}",
"urlMain": "https://www.instagram.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "The link you followed may be broken" "errorMsg": "The link you followed may be broken"
}, },
"Twitter": { "Twitter": {
"url": "https://www.twitter.com/{}", "url": "https://www.twitter.com/{}",
"urlMain": "https://www.twitter.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "page doesnt exist" "errorMsg": "page doesnt exist"
}, },
"Facebook": { "Facebook": {
"url": "https://www.facebook.com/{}", "url": "https://www.facebook.com/{}",
"urlMain": "https://www.facebook.com/",
"errorType": "status_code" "errorType": "status_code"
}, },
"YouTube": { "YouTube": {
"url": "https://www.youtube.com/{}", "url": "https://www.youtube.com/{}",
"urlMain": "https://www.youtube.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "Not Found" "errorMsg": "Not Found"
}, },
"Blogger": { "Blogger": {
"url": "https://{}.blogspot.com", "url": "https://{}.blogspot.com",
"urlMain": "https://www.blogger.com/",
"errorType": "status_code", "errorType": "status_code",
"noPeriod": "True" "regexCheck": "^[a-zA-Z][a-zA-Z0-9_-]*$"
}, },
"Google Plus": { "Google Plus": {
"url": "https://plus.google.com/+{}", "url": "https://plus.google.com/+{}",
"urlMain": "https://plus.google.com/",
"errorType": "status_code" "errorType": "status_code"
}, },
"Reddit": { "Reddit": {
"url": "https://www.reddit.com/user/{}", "url": "https://www.reddit.com/user/{}",
"urlMain": "https://www.reddit.com/",
"errorType": "message", "errorType": "message",
"errorMsg":"page not found" "errorMsg":"page not found"
}, },
"Pinterest": { "Pinterest": {
"url": "https://www.pinterest.com/{}", "url": "https://www.pinterest.com/{}",
"urlMain": "https://www.pinterest.com/",
"errorType": "response_url", "errorType": "response_url",
"errorUrl": "https://www.pinterest.com/?show_error=true" "errorUrl": "https://www.pinterest.com/?show_error=true"
}, },
"GitHub": { "GitHub": {
"url": "https://www.github.com/{}", "url": "https://www.github.com/{}",
"urlMain": "https://www.github.com/",
"errorType": "status_code", "errorType": "status_code",
"noPeriod": "True" "regexCheck": "^[a-zA-Z0-9](?:[a-zA-Z0-9]|-(?=[a-zA-Z0-9])){0,38}$"
}, },
"Steam": { "Steam": {
"url": "https://steamcommunity.com/id/{}", "url": "https://steamcommunity.com/id/{}",
"urlMain": "https://steamcommunity.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "The specified profile could not be found" "errorMsg": "The specified profile could not be found"
}, },
"Vimeo": { "Vimeo": {
"url": "https://vimeo.com/{}", "url": "https://vimeo.com/{}",
"urlMain": "https://vimeo.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "404 Not Found" "errorMsg": "404 Not Found"
}, },
"SoundCloud": { "SoundCloud": {
"url": "https://soundcloud.com/{}", "url": "https://soundcloud.com/{}",
"urlMain": "https://soundcloud.com/",
"errorType": "status_code" "errorType": "status_code"
}, },
"Disqus": { "Disqus": {
"url": "https://disqus.com/{}", "url": "https://disqus.com/{}",
"urlMain": "https://disqus.com/",
"errorType": "status_code" "errorType": "status_code"
}, },
"Medium": { "Medium": {
"url": "https://medium.com/@{}", "url": "https://medium.com/@{}",
"urlMain": "https://medium.com/",
"errorType": "status_code" "errorType": "status_code"
}, },
"DeviantART": { "DeviantART": {
"url": "https://{}.deviantart.com", "url": "https://{}.deviantart.com",
"urlMain": "https://deviantart.com",
"errorType": "status_code", "errorType": "status_code",
"noPeriod": "True" "regexCheck": "^[a-zA-Z][a-zA-Z0-9_-]*$"
}, },
"VK": { "VK": {
"url": "https://vk.com/{}", "url": "https://vk.com/{}",
"urlMain": "https://vk.com/",
"errorType": "status_code" "errorType": "status_code"
}, },
"About.me": { "About.me": {
"url": "https://about.me/{}", "url": "https://about.me/{}",
"urlMain": "https://about.me/",
"errorType": "status_code" "errorType": "status_code"
}, },
"Imgur": { "Imgur": {
"url": "https://imgur.com/user/{}", "url": "https://imgur.com/user/{}",
"urlMain": "https://imgur.com/",
"errorType": "status_code" "errorType": "status_code"
}, },
"Flipboard": { "Flipboard": {
"url": "https://flipboard.com/@{}", "url": "https://flipboard.com/@{}",
"urlMain": "https://flipboard.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "loading" "errorMsg": "loading"
}, },
"SlideShare": { "SlideShare": {
"url": "https://slideshare.net/{}", "url": "https://slideshare.net/{}",
"urlMain": "https://slideshare.net/",
"errorType": "status_code" "errorType": "status_code"
}, },
"Fotolog": { "Fotolog": {
"url": "https://fotolog.com/{}", "url": "https://fotolog.com/{}",
"urlMain": "https://fotolog.com/",
"errorType": "status_code" "errorType": "status_code"
}, },
"Spotify": { "Spotify": {
"url": "https://open.spotify.com/user/{}", "url": "https://open.spotify.com/user/{}",
"urlMain": "https://open.spotify.com/",
"errorType": "status_code" "errorType": "status_code"
}, },
"MixCloud": { "MixCloud": {
"url": "https://www.mixcloud.com/{}", "url": "https://www.mixcloud.com/{}",
"urlMain": "https://www.mixcloud.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "Page Not Found" "errorMsg": "Page Not Found"
}, },
"Scribd": { "Scribd": {
"url": "https://www.scribd.com/{}", "url": "https://www.scribd.com/{}",
"urlMain": "https://www.scribd.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "Page not found" "errorMsg": "Page not found"
}, },
"Patreon": { "Patreon": {
"url": "https://www.patreon.com/{}", "url": "https://www.patreon.com/{}",
"urlMain": "https://www.patreon.com/",
"errorType": "status_code" "errorType": "status_code"
}, },
"BitBucket": { "BitBucket": {
"url": "https://bitbucket.org/{}", "url": "https://bitbucket.org/{}",
"urlMain": "https://bitbucket.org/",
"errorType": "status_code" "errorType": "status_code"
}, },
"Roblox": { "Roblox": {
"url": "https://www.roblox.com/user.aspx?username={}", "url": "https://www.roblox.com/user.aspx?username={}",
"urlMain": "https://www.roblox.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "Page cannot be found or no longer exists" "errorMsg": "Page cannot be found or no longer exists"
}, },
"Gravatar": { "Gravatar": {
"url": "http://en.gravatar.com/{}", "url": "http://en.gravatar.com/{}",
"urlMain": "http://en.gravatar.com/",
"errorType": "status_code" "errorType": "status_code"
}, },
"iMGSRC.RU": { "iMGSRC.RU": {
"url": "https://imgsrc.ru/main/user.php?user={}", "url": "https://imgsrc.ru/main/user.php?user={}",
"urlMain": "https://imgsrc.ru/",
"errorType": "response_url", "errorType": "response_url",
"errorUrl": "https://imgsrc.ru/" "errorUrl": "https://imgsrc.ru/"
}, },
"DailyMotion": { "DailyMotion": {
"url": "https://www.dailymotion.com/{}", "url": "https://www.dailymotion.com/{}",
"urlMain": "https://www.dailymotion.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "Page not found" "errorMsg": "Page not found"
}, },
"Etsy": { "Etsy": {
"url": "https://www.etsy.com/shop/{}", "url": "https://www.etsy.com/shop/{}",
"urlMain": "https://www.etsy.com/",
"errorType": "status_code" "errorType": "status_code"
}, },
"CashMe": { "CashMe": {
"url": "https://cash.me/{}", "url": "https://cash.me/{}",
"urlMain": "https://cash.me/",
"errorType": "status_code" "errorType": "status_code"
}, },
"Behance": { "Behance": {
"url": "https://www.behance.net/{}", "url": "https://www.behance.net/{}",
"urlMain": "https://www.behance.net/",
"errorType": "message", "errorType": "message",
"errorMsg": "Oops! We cant find that page." "errorMsg": "Oops! We cant find that page."
}, },
"GoodReads": { "GoodReads": {
"url": "https://www.goodreads.com/{}", "url": "https://www.goodreads.com/{}",
"urlMain": "https://www.goodreads.com/",
"errorType": "status_code" "errorType": "status_code"
}, },
"Instructables": { "Instructables": {
"url": "https://www.instructables.com/member/{}", "url": "https://www.instructables.com/member/{}",
"urlMain": "https://www.instructables.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "404: We're sorry, things break sometimes" "errorMsg": "404: We're sorry, things break sometimes"
}, },
"Keybase": { "Keybase": {
"url": "https://keybase.io/{}", "url": "https://keybase.io/{}",
"urlMain": "https://keybase.io/",
"errorType": "status_code" "errorType": "status_code"
}, },
"Kongregate": { "Kongregate": {
"url": "https://www.kongregate.com/accounts/{}", "url": "https://www.kongregate.com/accounts/{}",
"urlMain": "https://www.kongregate.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "Sorry, no account with that name was found.", "errorMsg": "Sorry, no account with that name was found.",
"noPeriod": "True" "regexCheck": "^[a-zA-Z][a-zA-Z0-9_-]*$"
}, },
"LiveJournal": { "LiveJournal": {
"url": "https://{}.livejournal.com", "url": "https://{}.livejournal.com",
"urlMain": "https://www.livejournal.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "Unknown Journal", "errorMsg": "Unknown Journal",
"noPeriod": "True" "regexCheck": "^[a-zA-Z][a-zA-Z0-9_-]*$"
}, },
"VSCO": { "VSCO": {
"url": "https://vsco.co/{}", "url": "https://vsco.co/{}",
"urlMain": "https://vsco.co/",
"errorType": "status_code" "errorType": "status_code"
}, },
"AngelList": { "AngelList": {
"url": "https://angel.co/{}", "url": "https://angel.co/{}",
"urlMain": "https://angel.co/",
"errorType": "message", "errorType": "message",
"errorMsg": "We couldn't find what you were looking for." "errorMsg": "We couldn't find what you were looking for."
}, },
"last.fm": { "last.fm": {
"url": "https://last.fm/user/{}", "url": "https://last.fm/user/{}",
"urlMain": "https://last.fm/",
"errorType": "message", "errorType": "message",
"errorMsg": "Whoops! Sorry, but this page doesn't exist." "errorMsg": "Whoops! Sorry, but this page doesn't exist."
}, },
"Dribbble": { "Dribbble": {
"url": "https://dribbble.com/{}", "url": "https://dribbble.com/{}",
"urlMain": "https://dribbble.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "Whoops, that page is gone.", "errorMsg": "Whoops, that page is gone.",
"noPeriod": "True" "regexCheck": "^[a-zA-Z][a-zA-Z0-9_-]*$"
}, },
"Codecademy": { "Codecademy": {
"url": "https://www.codecademy.com/{}", "url": "https://www.codecademy.com/{}",
"urlMain": "https://www.codecademy.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "404 error" "errorMsg": "404 error"
}, },
"Pastebin": { "Pastebin": {
"url": "https://pastebin.com/u/{}", "url": "https://pastebin.com/u/{}",
"urlMain": "https://pastebin.com/",
"errorType": "response_url", "errorType": "response_url",
"errorUrl": "https://pastebin.com/index" "errorUrl": "https://pastebin.com/index"
}, },
"Foursquare": { "Foursquare": {
"url": "https://foursquare.com/{}", "url": "https://foursquare.com/{}",
"urlMain": "https://foursquare.com/",
"errorType": "status_code" "errorType": "status_code"
}, },
"Gumroad": { "Gumroad": {
"url": "https://www.gumroad.com/{}", "url": "https://www.gumroad.com/{}",
"urlMain": "https://www.gumroad.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "Page not found." "errorMsg": "Page not found."
}, },
"Newgrounds": { "Newgrounds": {
"url": "https://{}.newgrounds.com", "url": "https://{}.newgrounds.com",
"urlMain": "https://newgrounds.com",
"errorType": "status_code", "errorType": "status_code",
"noPeriod": "True" "regexCheck": "^[a-zA-Z][a-zA-Z0-9_-]*$"
}, },
"Wattpad": { "Wattpad": {
"url": "https://www.wattpad.com/user/{}", "url": "https://www.wattpad.com/user/{}",
"urlMain": "https://www.wattpad.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "This page seems to be missing..." "errorMsg": "This page seems to be missing..."
}, },
"Canva": { "Canva": {
"url": "https://www.canva.com/{}", "url": "https://www.canva.com/{}",
"urlMain": "https://www.canva.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "Not found (404)" "errorMsg": "Not found (404)"
}, },
"Trakt": { "Trakt": {
"url": "https://www.trakt.tv/users/{}", "url": "https://www.trakt.tv/users/{}",
"urlMain": "https://www.trakt.tv/",
"errorType": "message", "errorType": "message",
"errorMsg": "404" "errorMsg": "404"
}, },
"500px": { "500px": {
"url": "https://500px.com/{}", "url": "https://500px.com/{}",
"urlMain": "https://500px.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "Sorry, no such page." "errorMsg": "Sorry, no such page."
}, },
"BuzzFeed": { "BuzzFeed": {
"url": "https://buzzfeed.com/{}", "url": "https://buzzfeed.com/{}",
"urlMain": "https://buzzfeed.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "We can't find the page you're looking for." "errorMsg": "We can't find the page you're looking for."
}, },
"TripAdvisor": { "TripAdvisor": {
"url": "https://tripadvisor.com/members/{}", "url": "https://tripadvisor.com/members/{}",
"urlMain": "https://tripadvisor.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "This page is on vacation…" "errorMsg": "This page is on vacation…"
}, },
"Contently": { "Contently": {
"url": "https://{}.contently.com/", "url": "https://{}.contently.com/",
"urlMain": "https://contently.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "We can't find that page!", "errorMsg": "We can't find that page!",
"noPeriod": "True" "regexCheck": "^[a-zA-Z][a-zA-Z0-9_-]*$"
}, },
"Houzz": { "Houzz": {
"url": "https://houzz.com/user/{}", "url": "https://houzz.com/user/{}",
"urlMain": "https://houzz.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "The page you requested was not found." "errorMsg": "The page you requested was not found."
}, },
"BLIP.fm": { "BLIP.fm": {
"url": "https://blip.fm/{}", "url": "https://blip.fm/{}",
"urlMain": "https://blip.fm/",
"errorType": "message", "errorType": "message",
"errorMsg": "Page Not Found" "errorMsg": "Page Not Found"
}, },
"HackerNews": { "HackerNews": {
"url": "https://news.ycombinator.com/user?id={}", "url": "https://news.ycombinator.com/user?id={}",
"urlMain": "https://news.ycombinator.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "No such user." "errorMsg": "No such user."
}, },
"Codementor": { "Codementor": {
"url": "https://www.codementor.io/{}", "url": "https://www.codementor.io/{}",
"urlMain": "https://www.codementor.io/",
"errorType": "message", "errorType": "message",
"errorMsg": "404" "errorMsg": "404"
}, },
"ReverbNation": { "ReverbNation": {
"url": "https://www.reverbnation.com/{}", "url": "https://www.reverbnation.com/{}",
"urlMain": "https://www.reverbnation.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "Sorry, we couldn't find that page" "errorMsg": "Sorry, we couldn't find that page"
}, },
"Designspiration": { "Designspiration": {
"url": "https://www.designspiration.net/{}", "url": "https://www.designspiration.net/{}",
"urlMain": "https://www.designspiration.net/",
"errorType": "message", "errorType": "message",
"errorMsg": "Content Not Found" "errorMsg": "Content Not Found"
}, },
"Bandcamp": { "Bandcamp": {
"url": "https://www.bandcamp.com/{}", "url": "https://www.bandcamp.com/{}",
"urlMain": "https://www.bandcamp.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "Sorry, that something isnt here" "errorMsg": "Sorry, that something isnt here"
}, },
"ColourLovers": { "ColourLovers": {
"url": "https://www.colourlovers.com/love/{}", "url": "https://www.colourlovers.com/love/{}",
"urlMain": "https://www.colourlovers.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "Page Not Loved" "errorMsg": "Page Not Loved"
}, },
"IFTTT": { "IFTTT": {
"url": "https://www.ifttt.com/p/{}", "url": "https://www.ifttt.com/p/{}",
"urlMain": "https://www.ifttt.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "The requested page or file does not exist" "errorMsg": "The requested page or file does not exist"
}, },
"Ebay": { "Ebay": {
"url": "https://www.ebay.com/usr/{}", "url": "https://www.ebay.com/usr/{}",
"urlMain": "https://www.ebay.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "The User ID you entered was not found" "errorMsg": "The User ID you entered was not found"
}, },
"Slack": { "Slack": {
"url": "https://{}.slack.com", "url": "https://{}.slack.com",
"urlMain": "https://slack.com",
"errorType": "status_code", "errorType": "status_code",
"noPeriod": "True" "regexCheck": "^[a-zA-Z][a-zA-Z0-9_-]*$"
}, },
"Trip": { "Trip": {
"url": "https://www.trip.skyscanner.com/user/{}", "url": "https://www.trip.skyscanner.com/user/{}",
"urlMain": "https://www.trip.skyscanner.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "Page not found" "errorMsg": "Page not found"
}, },
"Ello": { "Ello": {
"url": "https://ello.co/{}", "url": "https://ello.co/{}",
"urlMain": "https://ello.co/",
"errorType": "message", "errorType": "message",
"errorMsg": "We couldn't find the page you're looking for" "errorMsg": "We couldn't find the page you're looking for"
}, },
"HackerOne": { "HackerOne": {
"url": "https://hackerone.com/{}", "url": "https://hackerone.com/{}",
"urlMain": "https://hackerone.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "Page not found" "errorMsg": "Page not found"
}, },
"Tinder": { "Tinder": {
"url": "https://www.gotinder.com/@{}", "url": "https://www.gotinder.com/@{}",
"urlMain": "https://tinder.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "Looking for Someone?" "errorMsg": "Looking for Someone?"
}, },
"We Heart It": { "We Heart It": {
"url": "https://weheartit.com/{}", "url": "https://weheartit.com/{}",
"urlMain": "https://weheartit.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "Oops! You've landed on a moving target!" "errorMsg": "Oops! You've landed on a moving target!"
}, },
"Flickr": { "Flickr": {
"url": "https://www.flickr.com/people/{}", "url": "https://www.flickr.com/people/{}",
"urlMain": "https://www.flickr.com/",
"errorType": "status_code" "errorType": "status_code"
}, },
"WordPress": { "WordPress": {
"url": "https://{}.wordpress.com", "url": "https://{}.wordpress.com",
"urlMain": "https://wordpress.com",
"errorType": "response_url", "errorType": "response_url",
"errorUrl": "wordpress.com/typo/?subdomain=", "errorUrl": "wordpress.com/typo/?subdomain=",
"noPeriod": "True" "regexCheck": "^[a-zA-Z][a-zA-Z0-9_-]*$"
}, },
"Unsplash": { "Unsplash": {
"url": "https://unsplash.com/@{}", "url": "https://unsplash.com/@{}",
"urlMain": "https://unsplash.com/",
"errorType": "status_code" "errorType": "status_code"
}, },
"Pexels": { "Pexels": {
"url": "https://www.pexels.com/@{}", "url": "https://www.pexels.com/@{}",
"urlMain": "https://www.pexels.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "Ouch, something went wrong!" "errorMsg": "Ouch, something went wrong!"
}, },
"devRant": { "devRant": {
"url": "https://devrant.com/users/{}", "url": "https://devrant.com/users/{}",
"urlMain": "https://devrant.com/",
"errorType": "response_url", "errorType": "response_url",
"errorUrl": "https://devrant.com/" "errorUrl": "https://devrant.com/"
},
"MyAnimeList": {
"url": "https://myanimelist.net/profile/{}",
"urlMain": "https://myanimelist.net/",
"errorType": "status_code"
},
"ImageShack": {
"url": "https://imageshack.us/user/{}",
"urlMain": "https://imageshack.us/",
"errorType": "response_url",
"errorUrl": "https://imageshack.us/"
},
"Badoo": {
"url": "https://badoo.com/profile/{}",
"urlMain": "https://badoo.com/",
"errorType": "status_code"
},
"MeetMe": {
"url": "https://www.meetme.com/{}",
"urlMain": "https://www.meetme.com/",
"errorType": "response_url",
"errorUrl": "https://www.meetme.com/"
},
"Quora": {
"url": "https://www.quora.com/profile/{}",
"urlMain": "https://www.quora.com/",
"errorType": "status_code"
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

@ -1 +1,2 @@
requests requests
torrequest

@ -1,10 +1,21 @@
"""Sherlock: Find Usernames Across Social Networks Module
This module contains the main logic to search for usernames at social
networks.
"""
import requests import requests
import json import json
import os import os
import sys import sys
import argparse import re
import csv
from argparse import ArgumentParser, RawDescriptionHelpFormatter
import platform
from torrequest import TorRequest
module_name = "Sherlock: Find Usernames Across Social Networks"
__version__ = "0.1.0"
DEBUG = False
# TODO: fix tumblr # TODO: fix tumblr
@ -12,41 +23,57 @@ def write_to_file(url, fname):
with open(fname, "a") as f: with open(fname, "a") as f:
f.write(url+"\n") f.write(url+"\n")
def print_error(err, errstr, var, debug = False): def print_error(err, errstr, var, debug = False):
if debug: if debug:
print (f"\033[37;1m[\033[91;1m-\033[37;1m]\033[91;1m {errstr}\033[93;1m {err}") print(f"\033[37;1m[\033[91;1m-\033[37;1m]\033[91;1m {errstr}\033[93;1m {err}")
else: else:
print (f"\033[37;1m[\033[91;1m-\033[37;1m]\033[91;1m {errstr}\033[93;1m {var}") print(f"\033[37;1m[\033[91;1m-\033[37;1m]\033[91;1m {errstr}\033[93;1m {var}")
def make_request(url, headers, error_type, social_network): def make_request(url, headers, error_type, social_network, verbose=False, tor=False, unique_tor=False):
r = TorRequest() if (tor or unique_tor) else requests
try: try:
r = requests.get(url, headers=headers) rsp = r.get(url, headers=headers)
if r.status_code: if unique_tor:
return r, error_type r.reset_identity()
if rsp.status_code:
return rsp, error_type
except requests.exceptions.HTTPError as errh: except requests.exceptions.HTTPError as errh:
print_error(errh, "HTTP Error:", social_network, DEBUG) print_error(errh, "HTTP Error:", social_network, verbose)
except requests.exceptions.ConnectionError as errc: except requests.exceptions.ConnectionError as errc:
print_error(errc, "Error Connecting:", social_network, DEBUG) print_error(errc, "Error Connecting:", social_network, verbose)
except requests.exceptions.Timeout as errt: except requests.exceptions.Timeout as errt:
print_error(errt, "Timeout Error:", social_network, DEBUG) print_error(errt, "Timeout Error:", social_network, verbose)
except requests.exceptions.RequestException as err: except requests.exceptions.RequestException as err:
print_error(err, "Unknown error:", social_network, DEBUG) print_error(err, "Unknown error:", social_network, verbose)
return None, "" return None, ""
def sherlock(username, verbose=False, tor=False, unique_tor=False):
"""Run Sherlock Analysis.
Checks for existence of username on various social media sites.
def sherlock(username): Keyword Arguments:
# Not sure why, but the banner messes up if i put into one print function username -- String indicating username that report
print("\033[37;1m .\"\"\"-.") should be created against.
print("\033[37;1m / \\") verbose -- Boolean indicating whether to give verbose output.
print("\033[37;1m ____ _ _ _ | _..--'-.") tor -- Boolean indicating whether to use a tor circuit for the requests.
print("\033[37;1m/ ___|| |__ ___ _ __| | ___ ___| |__ >.`__.-\"\"\;\"`") unique_tor -- Boolean indicating whether to use a new tor circuit for each request.
print("\033[37;1m\___ \| '_ \ / _ \ '__| |/ _ \ / __| |/ / / /( ^\\")
print("\033[37;1m ___) | | | | __/ | | | (_) | (__| < '-`) =|-.")
print("\033[37;1m|____/|_| |_|\___|_| |_|\___/ \___|_|\_\ /`--.'--' \ .-.")
print("\033[37;1m .'`-._ `.\ | J /")
print("\033[37;1m / `--.| \__/\033[0m")
print()
Return Value:
Dictionary containing results from report. Key of dictionary is the name
of the social network site, and the value is another dictionary with
the following keys:
url_main: URL of main site.
url_user: URL of user on site (if account exists).
exists: String indicating results of test for account existence.
http_status: HTTP status code of query which checked for existence on
site.
response_text: Text that came back from request. May be None if
there was an HTTP error when checking for existence.
"""
fname = username+".txt" fname = username+".txt"
if os.path.isfile(fname): if os.path.isfile(fname):
@ -57,66 +84,179 @@ def sherlock(username):
raw = open("data.json", "r", encoding="utf-8") raw = open("data.json", "r", encoding="utf-8")
data = json.load(raw) data = json.load(raw)
# User agent is needed because some sites does not # User agent is needed because some sites does not
# return the correct information because it thinks that # return the correct information because it thinks that
# we are bot # we are bot
headers = { headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:55.0) Gecko/20100101 Firefox/55.0' 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:55.0) Gecko/20100101 Firefox/55.0'
} }
# Results from analysis of all sites
results_total = {}
for social_network in data: for social_network in data:
# Results from analysis of this specific site
results_site = {}
# Record URL of main site
results_site['url_main'] = data.get(social_network).get("urlMain")
# URL of user on site (if it exists)
url = data.get(social_network).get("url").format(username) url = data.get(social_network).get("url").format(username)
results_site['url_user'] = url
error_type = data.get(social_network).get("errorType") error_type = data.get(social_network).get("errorType")
cant_have_period = data.get(social_network).get("noPeriod") regex_check = data.get(social_network).get("regexCheck")
if ("." in username) and (cant_have_period == "True"): # Default data in case there are any failures in doing a request.
print("\033[37;1m[\033[91;1m-\033[37;1m]\033[92;1m {}:\033[93;1m User Name Not Allowed!".format(social_network)) http_status = "?"
continue response_text = ""
r, error_type = make_request(url=url, headers=headers, error_type=error_type, social_network=social_network) if regex_check and re.search(regex_check, username) is None:
#No need to do the check at the site: this user name is not allowed.
if error_type == "message": print("\033[37;1m[\033[91;1m-\033[37;1m]\033[92;1m {}:\033[93;1m Illegal Username Format For This Site!".format(social_network))
error = data.get(social_network).get("errorMsg") exists = "illegal"
# Checks if the error message is in the HTML else:
if not error in r.text: r, error_type = make_request(url=url, headers=headers, error_type=error_type, social_network=social_network, verbose=verbose, tor=tor, unique_tor=unique_tor)
print("\033[37;1m[\033[92;1m+\033[37;1m]\033[92;1m {}:\033[0m".format(social_network), url)
write_to_file(url, fname) # Attempt to get request information
try:
else: http_status = r.status_code
print("\033[37;1m[\033[91;1m-\033[37;1m]\033[92;1m {}:\033[93;1m Not Found!".format(social_network)) except:
pass
elif error_type == "status_code": try:
# Checks if the status code of the repsonse is 404 response_text = r.text.encode(r.encoding)
if not r.status_code == 404: except:
print("\033[37;1m[\033[92;1m+\033[37;1m]\033[92;1m {}:\033[0m".format(social_network), url) pass
write_to_file(url, fname)
if error_type == "message":
else: error = data.get(social_network).get("errorMsg")
print("\033[37;1m[\033[91;1m-\033[37;1m]\033[92;1m {}:\033[93;1m Not Found!".format(social_network)) # Checks if the error message is in the HTML
if not error in r.text:
elif error_type == "response_url": print("\033[37;1m[\033[92;1m+\033[37;1m]\033[92;1m {}:\033[0m".format(social_network), url)
error = data.get(social_network).get("errorUrl") write_to_file(url, fname)
# Checks if the redirect url is the same as the one defined in data.json exists = "yes"
if not error in r.url: else:
print("\033[37;1m[\033[92;1m+\033[37;1m]\033[92;1m {}:\033[0m".format(social_network), url) print("\033[37;1m[\033[91;1m-\033[37;1m]\033[92;1m {}:\033[93;1m Not Found!".format(social_network))
write_to_file(url, fname) exists = "no"
else:
print("\033[37;1m[\033[91;1m-\033[37;1m]\033[92;1m {}:\033[93;1m Not Found!".format(social_network)) elif error_type == "status_code":
# Checks if the status code of the response is 404
elif error_type == "": if not r.status_code == 404:
print("\033[37;1m[\033[91;1m-\033[37;1m]\033[92;1m {}:\033[93;1m Error!".format(social_network)) print("\033[37;1m[\033[92;1m+\033[37;1m]\033[92;1m {}:\033[0m".format(social_network), url)
write_to_file(url, fname)
exists = "yes"
else:
print("\033[37;1m[\033[91;1m-\033[37;1m]\033[92;1m {}:\033[93;1m Not Found!".format(social_network))
exists = "no"
elif error_type == "response_url":
error = data.get(social_network).get("errorUrl")
# Checks if the redirect url is the same as the one defined in data.json
if not error in r.url:
print("\033[37;1m[\033[92;1m+\033[37;1m]\033[92;1m {}:\033[0m".format(social_network), url)
write_to_file(url, fname)
exists = "yes"
else:
print("\033[37;1m[\033[91;1m-\033[37;1m]\033[92;1m {}:\033[93;1m Not Found!".format(social_network))
exists = "no"
elif error_type == "":
print("\033[37;1m[\033[91;1m-\033[37;1m]\033[92;1m {}:\033[93;1m Error!".format(social_network))
exists = "error"
# Save exists flag
results_site['exists'] = exists
# Save results from request
results_site['http_status'] = http_status
results_site['response_text'] = response_text
# Add this site's results into final dictionary with all of the other results.
results_total[social_network] = results_site
print("\033[1;92m[\033[0m\033[1;77m*\033[0m\033[1;92m] Saved: \033[37;1m{}\033[0m".format(username+".txt")) print("\033[1;92m[\033[0m\033[1;77m*\033[0m\033[1;92m] Saved: \033[37;1m{}\033[0m".format(username+".txt"))
if __name__ == "__main__": return results_total
parser = argparse.ArgumentParser()
parser.add_argument('username', help='check services with given username')
parser.add_argument("-d", '--debug', help="enable debug mode", action="store_true") def main():
version_string = f"%(prog)s {__version__}\n" + \
f"{requests.__description__}: {requests.__version__}\n" + \
f"Python: {platform.python_version()}"
parser = ArgumentParser(formatter_class=RawDescriptionHelpFormatter,
description=f"{module_name} (Version {__version__})"
)
parser.add_argument("--version",
action="version", version=version_string,
help="Display version information and dependencies."
)
parser.add_argument("--verbose", "-v", "-d", "--debug",
action="store_true", dest="verbose", default=False,
help="Display extra debugging information."
)
parser.add_argument("--quiet", "-q",
action="store_false", dest="verbose",
help="Disable debugging information (Default Option)."
)
parser.add_argument("--tor", "-t",
action="store_true", dest="tor", default=False,
help="Make requests over TOR; increases runtime; requires TOR to be installed and in system path.")
parser.add_argument("--unique-tor", "-u",
action="store_true", dest="unique_tor", default=False,
help="Make requests over TOR with new TOR circuit after each request; increases runtime; requires TOR to be installed and in system path.")
parser.add_argument("--csv",
action="store_true", dest="csv", default=False,
help="Create Comma-Separated Values (CSV) File."
)
parser.add_argument("username",
nargs='+', metavar='USERNAMES',
action="store",
help="One or more usernames to check with social networks."
)
args = parser.parse_args() args = parser.parse_args()
if args.debug:
DEBUG = True
if args.username: # Banner
sherlock(args.username) print(
"""\033[37;1m .\"\"\"-.
\033[37;1m / \\
\033[37;1m ____ _ _ _ | _..--'-.
\033[37;1m/ ___|| |__ ___ _ __| | ___ ___| |__ >.`__.-\"\"\;\"`
\033[37;1m\___ \| '_ \ / _ \ '__| |/ _ \ / __| |/ / / /( ^\\
\033[37;1m ___) | | | | __/ | | | (_) | (__| < '-`) =|-.
\033[37;1m|____/|_| |_|\___|_| |_|\___/ \___|_|\_\ /`--.'--' \ .-.
\033[37;1m .'`-._ `.\ | J /
\033[37;1m / `--.| \__/\033[0m""")
if args.tor or args.unique_tor:
print("Warning: some websites might refuse connecting over TOR, so note that using this option might increase connection errors.")
# Run report on all specified users.
for username in args.username:
print()
results = sherlock(username, verbose=args.verbose, tor=args.tor, unique_tor=args.unique_tor)
if args.csv == True:
with open(username + ".csv", "w", newline='') as csv_report:
writer = csv.writer(csv_report)
writer.writerow(['username',
'name',
'url_main',
'url_user',
'exists',
'http_status'
]
)
for site in results:
writer.writerow([username,
site,
results[site]['url_main'],
results[site]['url_user'],
results[site]['exists'],
results[site]['http_status']
]
)
if __name__ == "__main__":
main()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

Loading…
Cancel
Save