From a380e4805752db308c32ec2a646e6376759b2cba Mon Sep 17 00:00:00 2001 From: cclauss Date: Tue, 22 Jan 2019 18:55:03 +0100 Subject: [PATCH 1/2] Make BANNER an r'string' and move it up front Sherlock has a cool logo so this PR moves it to the top of sherlock.py to show it off when potential contributors read our source. It also makes a BANNER an __r'string'__ so we do not need backslashes to escape characters and the ascii art is more what-you-see-is-what-you-get. This also suppresses [a bunch of flake8 complaints](https://travis-ci.com/TheYahya/sherlock/jobs/172028552#L490-L503) about _invalid escape sequences_. Finally this PR runs isort on the imports for readability. Standard Lib imports come first, etc. --- sherlock.py | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/sherlock.py b/sherlock.py index e7fef9d7..0672df97 100644 --- a/sherlock.py +++ b/sherlock.py @@ -10,15 +10,16 @@ networks. import csv import json import os -import sys import platform import re +import sys +from argparse import ArgumentParser, RawDescriptionHelpFormatter +from concurrent.futures import ThreadPoolExecutor from time import time import requests -from argparse import ArgumentParser, RawDescriptionHelpFormatter -from concurrent.futures import ThreadPoolExecutor from colorama import Fore, Style, init + from requests_futures.sessions import FuturesSession from torrequest import TorRequest @@ -26,6 +27,17 @@ module_name = "Sherlock: Find Usernames Across Social Networks" __version__ = "0.3.0" amount = 0 +BANNER = r""" + ."'"-. + / \ + ____ _ _ _ | _..--'-. +/ ___|| |__ ___ _ __| | ___ ___| |__ >.`__.-""\;"` +\___ \| '_ \ / _ \ '__| |/ _ \ / __| |/ / / /( ^\ + ___) | | | | __/ | | | (_) | (__| < '-`) =|-. +|____/|_| |_|\___|_| |_|\___/ \___|_|\_\ /`--.'--' \ .-. + .'`-._ `.\ | J / + / `--.| \__/""" + # TODO: fix tumblr @@ -380,17 +392,7 @@ def main(): args = parser.parse_args() - # Banner - print(Fore.WHITE + Style.BRIGHT + - """ .\"\"\"-. - / \\ - ____ _ _ _ | _..--'-. -/ ___|| |__ ___ _ __| | ___ ___| |__ >.`__.-\"\"\;\"` -\___ \| '_ \ / _ \ '__| |/ _ \ / __| |/ / / /( ^\\ - ___) | | | | __/ | | | (_) | (__| < '-`) =|-. -|____/|_| |_|\___|_| |_|\___/ \___|_|\_\ /`--.'--' \ .-. - .'`-._ `.\ | J / - / `--.| \__/""") + print(Fore.WHITE + Style.BRIGHT + BANNER) # Argument check # TODO regex check on args.proxy From 0b3c5f2ba034af7aca90365d1f32fdf948a0eec2 Mon Sep 17 00:00:00 2001 From: cclauss Date: Tue, 22 Jan 2019 20:15:13 +0100 Subject: [PATCH 2/2] Fix the top of the deerstalker https://en.m.wikipedia.org/wiki/Deerstalker --- sherlock.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sherlock.py b/sherlock.py index 0672df97..69512da1 100644 --- a/sherlock.py +++ b/sherlock.py @@ -27,8 +27,8 @@ module_name = "Sherlock: Find Usernames Across Social Networks" __version__ = "0.3.0" amount = 0 -BANNER = r""" - ."'"-. +BANNER = r''' + ."""-. / \ ____ _ _ _ | _..--'-. / ___|| |__ ___ _ __| | ___ ___| |__ >.`__.-""\;"` @@ -36,7 +36,7 @@ BANNER = r""" ___) | | | | __/ | | | (_) | (__| < '-`) =|-. |____/|_| |_|\___|_| |_|\___/ \___|_|\_\ /`--.'--' \ .-. .'`-._ `.\ | J / - / `--.| \__/""" + / `--.| \__/'''[1:] # TODO: fix tumblr