From a380e4805752db308c32ec2a646e6376759b2cba Mon Sep 17 00:00:00 2001 From: cclauss Date: Tue, 22 Jan 2019 18:55:03 +0100 Subject: [PATCH] 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