diff --git a/sherlock/__init__.py b/sherlock/__init__.py new file mode 100644 index 00000000..b0894c8b --- /dev/null +++ b/sherlock/__init__.py @@ -0,0 +1,5 @@ +"""Sherlock Module + +This module contains the main logic to search for usernames at social +networks. +""" diff --git a/sherlock/__main__.py b/sherlock/__main__.py new file mode 100644 index 00000000..8c2b2e78 --- /dev/null +++ b/sherlock/__main__.py @@ -0,0 +1,14 @@ +#! /usr/bin/env python3 + +""" +Sherlock: Find Usernames Across Social Networks Module + +This module contains the main logic to search for usernames at social +networks. +""" + +import sherlock + + +if __name__ == "__main__": + sherlock.main() diff --git a/load_proxies.py b/sherlock/load_proxies.py similarity index 100% rename from load_proxies.py rename to sherlock/load_proxies.py diff --git a/data.json b/sherlock/resources/data.json similarity index 100% rename from data.json rename to sherlock/resources/data.json diff --git a/sherlock.py b/sherlock/sherlock.py old mode 100755 new mode 100644 similarity index 99% rename from sherlock.py rename to sherlock/sherlock.py index 8797cccd..44adfcdf --- a/sherlock.py +++ b/sherlock/sherlock.py @@ -405,7 +405,7 @@ def main(): help="Make requests over a proxy. e.g. socks5://127.0.0.1:1080" ) parser.add_argument("--json", "-j", metavar="JSON_FILE", - dest="json_file", default="data.json", + dest="json_file", default="resources/data.json", help="Load data from a JSON file or an online, valid, JSON file.") parser.add_argument("--proxy_list", "-pl", metavar='PROXY_LIST', action="store", dest="proxy_list", default=None, diff --git a/tests/__init__.py b/sherlock/tests/__init__.py similarity index 100% rename from tests/__init__.py rename to sherlock/tests/__init__.py diff --git a/tests/all.py b/sherlock/tests/all.py similarity index 100% rename from tests/all.py rename to sherlock/tests/all.py diff --git a/tests/base.py b/sherlock/tests/base.py similarity index 99% rename from tests/base.py rename to sherlock/tests/base.py index ff4c5416..5e8ff5a1 100644 --- a/tests/base.py +++ b/sherlock/tests/base.py @@ -28,7 +28,7 @@ class SherlockBaseTest(unittest.TestCase): warnings.simplefilter("ignore", ResourceWarning) # Load the data file with all site information. - data_file_path = os.path.join(os.path.dirname(os.path.realpath(sherlock.__file__)), "data.json") + data_file_path = os.path.join(os.path.dirname(os.path.realpath(sherlock.__file__)), "resources/data.json") with open(data_file_path, "r", encoding="utf-8") as raw: self.site_data_all = json.load(raw) diff --git a/site_list.py b/site_list.py index 3cc19a3b..d1bd22d7 100644 --- a/site_list.py +++ b/site_list.py @@ -36,7 +36,7 @@ parser.add_argument("--rank","-r", ) args = parser.parse_args() -with open("data.json", "r", encoding="utf-8") as data_file: +with open("sherlock/resources/data.json", "r", encoding="utf-8") as data_file: data = json.load(data_file) with open("sites.md", "w") as site_file: