diff options
-rw-r--r-- | aux-files/sherlock/setuppy-support.patch | 236 | ||||
-rw-r--r-- | aux-files/sherlock/sherlock-runner.sh | 2 | ||||
-rw-r--r-- | sherlock.scm | 127 |
3 files changed, 365 insertions, 0 deletions
diff --git a/aux-files/sherlock/setuppy-support.patch b/aux-files/sherlock/setuppy-support.patch new file mode 100644 index 0000000..2815997 --- /dev/null +++ b/aux-files/sherlock/setuppy-support.patch @@ -0,0 +1,236 @@ +From f35b83b34fe87f1bb38c7e2c5914cff64713467d Mon Sep 17 00:00:00 2001 +From: Anonymous <anonymous@example.org> +Date: Tue, 27 Feb 2024 06:29:03 -0600 +Subject: [PATCH] poetry building added + +--- + poetry.lock | 151 +++++++++++++++++++++++++++++++++++++++++++ + pyproject.toml | 24 +++++++ + sherlock/notify.py | 2 +- + sherlock/sherlock.py | 8 +-- + 4 files changed, 180 insertions(+), 5 deletions(-) + create mode 100644 poetry.lock + create mode 100644 pyproject.toml + +diff --git a/poetry.lock b/poetry.lock +new file mode 100644 +index 0000000..6f5a93b +--- /dev/null ++++ b/poetry.lock +@@ -0,0 +1,151 @@ ++[[package]] ++name = "certifi" ++version = "2021.10.8" ++description = "Python package for providing Mozilla's CA Bundle." ++category = "main" ++optional = false ++python-versions = "*" ++ ++[[package]] ++name = "charset-normalizer" ++version = "2.0.10" ++description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." ++category = "main" ++optional = false ++python-versions = ">=3.5.0" ++ ++[package.extras] ++unicode_backport = ["unicodedata2"] ++ ++[[package]] ++name = "colorama" ++version = "0.4.4" ++description = "Cross-platform colored terminal text." ++category = "main" ++optional = false ++python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" ++ ++[[package]] ++name = "idna" ++version = "3.3" ++description = "Internationalized Domain Names in Applications (IDNA)" ++category = "main" ++optional = false ++python-versions = ">=3.5" ++ ++[[package]] ++name = "pysocks" ++version = "1.7.1" ++description = "A Python SOCKS client module. See https://github.com/Anorov/PySocks for more information." ++category = "main" ++optional = false ++python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" ++ ++[[package]] ++name = "requests" ++version = "2.27.1" ++description = "Python HTTP for Humans." ++category = "main" ++optional = false ++python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" ++ ++[package.dependencies] ++certifi = ">=2017.4.17" ++charset-normalizer = {version = ">=2.0.0,<2.1.0", markers = "python_version >= \"3\""} ++idna = {version = ">=2.5,<4", markers = "python_version >= \"3\""} ++urllib3 = ">=1.21.1,<1.27" ++ ++[package.extras] ++socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"] ++use_chardet_on_py3 = ["chardet (>=3.0.2,<5)"] ++ ++[[package]] ++name = "requests-futures" ++version = "1.0.0" ++description = "Asynchronous Python HTTP for Humans." ++category = "main" ++optional = false ++python-versions = "*" ++ ++[package.dependencies] ++requests = ">=1.2.0" ++ ++[[package]] ++name = "stem" ++version = "1.8.0" ++description = "Stem is a Python controller library that allows applications to interact with Tor (https://www.torproject.org/)." ++category = "main" ++optional = false ++python-versions = "*" ++ ++[[package]] ++name = "torrequest" ++version = "0.1.0" ++description = "A simple interface for HTTP(s) requests over Tor" ++category = "main" ++optional = false ++python-versions = "*" ++ ++[package.dependencies] ++PySocks = ">=1.5.7" ++requests = ">=2.11.0" ++stem = ">=1.4.0" ++ ++[[package]] ++name = "urllib3" ++version = "1.26.8" ++description = "HTTP library with thread-safe connection pooling, file post, and more." ++category = "main" ++optional = false ++python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" ++ ++[package.extras] ++brotli = ["brotlipy (>=0.6.0)"] ++secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] ++socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] ++ ++[metadata] ++lock-version = "1.1" ++python-versions = "^3.10" ++content-hash = "7677d60204dd2319c94db878cd68badc34bdf921b4b5ac7f3c439d9c3686a1aa" ++ ++[metadata.files] ++certifi = [ ++ {file = "certifi-2021.10.8-py2.py3-none-any.whl", hash = "sha256:d62a0163eb4c2344ac042ab2bdf75399a71a2d8c7d47eac2e2ee91b9d6339569"}, ++ {file = "certifi-2021.10.8.tar.gz", hash = "sha256:78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872"}, ++] ++charset-normalizer = [ ++ {file = "charset-normalizer-2.0.10.tar.gz", hash = "sha256:876d180e9d7432c5d1dfd4c5d26b72f099d503e8fcc0feb7532c9289be60fcbd"}, ++ {file = "charset_normalizer-2.0.10-py3-none-any.whl", hash = "sha256:cb957888737fc0bbcd78e3df769addb41fd1ff8cf950dc9e7ad7793f1bf44455"}, ++] ++colorama = [ ++ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, ++ {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, ++] ++idna = [ ++ {file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"}, ++ {file = "idna-3.3.tar.gz", hash = "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"}, ++] ++pysocks = [ ++ {file = "PySocks-1.7.1-py27-none-any.whl", hash = "sha256:08e69f092cc6dbe92a0fdd16eeb9b9ffbc13cadfe5ca4c7bd92ffb078b293299"}, ++ {file = "PySocks-1.7.1-py3-none-any.whl", hash = "sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5"}, ++ {file = "PySocks-1.7.1.tar.gz", hash = "sha256:3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0"}, ++] ++requests = [ ++ {file = "requests-2.27.1-py2.py3-none-any.whl", hash = "sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d"}, ++ {file = "requests-2.27.1.tar.gz", hash = "sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61"}, ++] ++requests-futures = [ ++ {file = "requests-futures-1.0.0.tar.gz", hash = "sha256:35547502bf1958044716a03a2f47092a89efe8f9789ab0c4c528d9c9c30bc148"}, ++ {file = "requests_futures-1.0.0-py2.py3-none-any.whl", hash = "sha256:633804c773b960cef009efe2a5585483443c6eac3c39cc64beba2884013bcdd9"}, ++] ++stem = [ ++ {file = "stem-1.8.0.tar.gz", hash = "sha256:a0b48ea6224e95f22aa34c0bc3415f0eb4667ddeae3dfb5e32a6920c185568c2"}, ++] ++torrequest = [ ++ {file = "torrequest-0.1.0.tar.gz", hash = "sha256:3745d4ea3ffda98d7a034363c787adb37aab77bdab40094a4d937392cd4dae82"}, ++] ++urllib3 = [ ++ {file = "urllib3-1.26.8-py2.py3-none-any.whl", hash = "sha256:000ca7f471a233c2251c6c7023ee85305721bfdf18621ebff4fd17a8653427ed"}, ++ {file = "urllib3-1.26.8.tar.gz", hash = "sha256:0e7c33d9a63e7ddfcb86780aac87befc2fbddf46c58dbb487e0855f7ceec283c"}, ++] +diff --git a/pyproject.toml b/pyproject.toml +new file mode 100644 +index 0000000..6842b68 +--- /dev/null ++++ b/pyproject.toml +@@ -0,0 +1,24 @@ ++[tool.poetry] ++name = "sherlock" ++version = "0.1.0" ++description = "" ++authors = ["Your Name <you@example.com>"] ++ ++[tool.poetry.dependencies] ++python = "^3.10" ++certifi = ">=2019.6.16" ++colorama = ">=0.4.1" ++PySocks = ">=1.7.0" ++requests = ">=2.22.0" ++requests-futures = ">=1.0.0" ++stem = ">=1.8.0" ++torrequest = ">=0.1.0" ++ ++[tool.poetry.dev-dependencies] ++ ++[build-system] ++requires = ["poetry-core>=1.0.0"] ++build-backend = "poetry.core.masonry.api" ++ ++[tool.poetry.scripts] ++sherlock = "sherlock.sherlock:main" +diff --git a/sherlock/notify.py b/sherlock/notify.py +index 87bfa0b..b3533ff 100644 +--- a/sherlock/notify.py ++++ b/sherlock/notify.py +@@ -3,7 +3,7 @@ + This module defines the objects for notifying the caller about the + results of queries. + """ +-from result import QueryStatus ++from .result import QueryStatus + from colorama import Fore, Style + import webbrowser + +diff --git a/sherlock/sherlock.py b/sherlock/sherlock.py +index a8760f2..746b736 100644 +--- a/sherlock/sherlock.py ++++ b/sherlock/sherlock.py +@@ -21,10 +21,10 @@ import requests + + from requests_futures.sessions import FuturesSession + from torrequest import TorRequest +-from result import QueryStatus +-from result import QueryResult +-from notify import QueryNotifyPrint +-from sites import SitesInformation ++from .result import QueryStatus ++from .result import QueryResult ++from .notify import QueryNotifyPrint ++from .sites import SitesInformation + from colorama import init + from argparse import ArgumentTypeError + +-- +2.41.0 + diff --git a/aux-files/sherlock/sherlock-runner.sh b/aux-files/sherlock/sherlock-runner.sh new file mode 100644 index 0000000..47b3d1b --- /dev/null +++ b/aux-files/sherlock/sherlock-runner.sh @@ -0,0 +1,2 @@ +#!/bin/sh +python3 sherlock.py diff --git a/sherlock.scm b/sherlock.scm new file mode 100644 index 0000000..d084d14 --- /dev/null +++ b/sherlock.scm @@ -0,0 +1,127 @@ +(define-module (sherlock) + #:use-module (gnu packages python) + #:use-module (gnu packages python-xyz) + #:use-module (gnu packages compression) + #:use-module (guix build-system python) + #:use-module (guix build-system pyproject) + #:use-module (guix build utils) + #:use-module (guix git-download) + #:use-module (guix packages) + #:use-module (guix gexp) + #:use-module (gnu packages) + #:use-module (gnu packages python-crypto) + #:use-module (gnu packages python-science) + #:use-module (gnu packages python-web) + #:use-module (gnu packages check) + #:use-module (gnu packages certs) + #:use-module (guix download) + #:use-module (guix licenses) + ) +(define-public python-requests-futures + (package + (name "python-requests-futures") + (version "1.0.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "requests-futures" version)) + (sha256 + (base32 "0wv3cwmqw56zim6khd7xjddz5sps5cyi4wqygn78bqkh03w4wnpm")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases #~(modify-phases %standard-phases (delete 'check)))) + (propagated-inputs (list python-requests)) + (native-inputs (list python-black + python-isort + python-pyflakes + python-pytest + python-pytest-cov + ;python-pytest-network + python-readme-renderer + python-twine)) + (home-page "https://github.com/ross/requests-futures") + (synopsis "Asynchronous Python HTTP for Humans.") + (description "Asynchronous Python HTTP for Humans.") + (license asl2.0))) + +(define-public python-exrex + (package + (name "python-exrex") + (version "0.11.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "exrex" version)) + (sha256 + (base32 "1284g3p3lz6wq1vqw5gx80b7zq4zr8vkr5hdn5k5jyjn6h12z4ar")))) + (build-system pyproject-build-system) + (home-page "https://github.com/asciimoo/exrex") + (synopsis "Irregular methods for regular expressions") + (description "Irregular methods for regular expressions") + (license agpl3))) + +(define-public python-torrequest + (package + (name "python-torrequest") + (version "0.1.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "torrequest" version)) + (sha256 + (base32 "10mf9p6r4wwk9m50jh5bpmvsnymkmn3wfqs30dx8vagx7zmd8i9p")))) + (build-system pyproject-build-system) + (propagated-inputs (list python-pysocks python-requests python-stem)) + (home-page "http://github.com/erdiaker/torrequest") + (synopsis "A simple interface for HTTP(s) requests over Tor") + (description + "This package provides a simple interface for HTTP(s) requests over Tor") + (license expat))) + +(define-public python-sherlock + (package + (name "sherlock") + (version "e3a09f8bf185d62bad8781e36fb64fa9637ba3d0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/sherlock-project/sherlock.git") + (commit version) + )) + (sha256 + (base32 "1jaz8a7lw45ky750gs6j4srczpij5xivrggcqjph92rr280whq2m")) + (modules '((guix build utils))) + (patches + (search-patches "aux-files/sherlock/setuppy-support.patch")) + (snippet + '(begin + (delete-file-recursively "images") #t)) + )) + (build-system pyproject-build-system) + (arguments + (list + #:tests? #f + #:phases #~(modify-phases %standard-phases + (delete 'sanity-check) ;we're going crazy, since sanity crashes. + ))) + (native-inputs (list + poetry + )) + (propagated-inputs (list python-certifi + python-pandas + python-colorama + python-pysocks + python-requests + python-exrex + python-torrequest + python-requests + python-requests-futures + python-stem)) + (home-page "https://sherlock-project.github.io/") + (synopsis + "Hunt down social media accounts by username across social networks.") + (description + "Hunt down social media accounts by username across social networks.") + (license expat))) |