Skip to content

Commit

Permalink
Switch to Poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
ppfeister committed May 16, 2024
1 parent b27ca92 commit be917e3
Show file tree
Hide file tree
Showing 8 changed files with 234 additions and 45 deletions.
147 changes: 147 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
<p align=center>
<br>
<a href="https://sherlock-project.github.io/" target="_blank"><img src="https://user-images.githubusercontent.com/27065646/53551960-ae4dff80-3b3a-11e9-9075-cef786c69364.png"/></a>
<br>
<span>Hunt down social media accounts by username across <a href="https://github.com/sherlock-project/sherlock/blob/master/sites.md">400+ social networks</a></span>
<br>
</p>

<p align="center">
<a href="https://github.com/sherlock-project/sherlock#installation">Installation</a>
&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
<a href="https://github.com/sherlock-project/sherlock#usage">Usage</a>
&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
<a href="https://github.com/ppfeister/sherlock/blob/feature/docu/docs/install.md#docker">Docker</a>
&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
<a href="https://github.com/ppfeister/sherlock/blob/feature/docu/docs/CONTRIBUTING.md">Contributing</a>
</p>

<p align="center">
<img width="70%" height="70%" src="https://user-images.githubusercontent.com/27065646/219638267-a5e11090-aa6e-4e77-87f7-0e95f6ad5978.png"/>
</a>
</p>


## Installation

[![PyPI - Version](https://img.shields.io/pypi/v/sherlock-project?logo=PyPi&label=PyPI&color=darkgreen)][ext_pypi] [![Docker Image Version](https://img.shields.io/docker/v/sherlock/sherlock?sort=semver&logo=docker&label=Docker&color=darkgreen)][docs_docker] [![homebrew version](https://img.shields.io/homebrew/v/sherlock?logo=Homebrew&color=darkgreen)][ext_brew]


| | Command | Notes |
| - | - | - |
| PyPI | `pipx install sherlock-project` | `pip` may be used in place of `pipx` |
| Homebrew | `brew install sherlock` | Homebrew-supported |
| Docker | `docker pull sherlock/sherlock` | |

### Alternative guides and methods

- [See all alternative guides][docs_install]
- [Python package][docs_py]
- [Docker container][docs_docker]



## Usage

```console
$ sherlock --help
usage: sherlock [-h] [--version] [--verbose] [--folderoutput FOLDEROUTPUT]
[--output OUTPUT] [--tor] [--unique-tor] [--csv] [--xlsx]
[--site SITE_NAME] [--proxy PROXY_URL] [--json JSON_FILE]
[--timeout TIMEOUT] [--print-all] [--print-found] [--no-color]
[--browse] [--local] [--nsfw]
USERNAMES [USERNAMES ...]

Sherlock: Find Usernames Across Social Networks (Version 0.14.3)

positional arguments:
USERNAMES One or more usernames to check with social networks.
Check similar usernames using {?} (replace to '_', '-', '.').

optional arguments:
-h, --help show this help message and exit
--version Display version information and dependencies.
--verbose, -v, -d, --debug
Display extra debugging information and metrics.
--folderoutput FOLDEROUTPUT, -fo FOLDEROUTPUT
If using multiple usernames, the output of the results will be
saved to this folder.
--output OUTPUT, -o OUTPUT
If using single username, the output of the result will be saved
to this file.
--tor, -t Make requests over Tor; increases runtime; requires Tor to be
installed and in system path.
--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.
--csv Create Comma-Separated Values (CSV) File.
--xlsx Create the standard file for the modern Microsoft Excel
spreadsheet (xlsx).
--site SITE_NAME Limit analysis to just the listed sites. Add multiple options to
specify more than one site.
--proxy PROXY_URL, -p PROXY_URL
Make requests over a proxy. e.g. socks5://127.0.0.1:1080
--json JSON_FILE, -j JSON_FILE
Load data from a JSON file or an online, valid, JSON file.
--timeout TIMEOUT Time (in seconds) to wait for response to requests (Default: 60)
--print-all Output sites where the username was not found.
--print-found Output sites where the username was found.
--no-color Don't color terminal output
--browse, -b Browse to all results on default browser.
--local, -l Force the use of the local data.json file.
--nsfw Include checking of NSFW sites from default list.
```

To search for only one user:
```bash
sherlock user123
```

To search for more than one user:
```bash
sherlock user1 user2 user3
```

Accounts found will be stored in an individual text file with the corresponding username (e.g ```user123.txt```).


## How to contribute to Sherlock

We would love to have you help us with the development of Sherlock. Each and every contribution is greatly valued!

Here are some things we would appreciate your help on:
- [Adding targets][docs_contrib_adding_targets]
- [Cleaning up existing targets][docs_contrib_removing_targets]
- [Restoring previously removed targets][docs_contrib_restoring_targets]

Head over to our __[Contributing][docs_contrib]__ page for additional info.

## Star History

<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=sherlock-project/sherlock&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=sherlock-project/sherlock&type=Date" />
<img alt="Sherlock Project Star History Chart" src="https://api.star-history.com/svg?repos=sherlock-project/sherlock&type=Date" />
</picture>

## License

MIT © Sherlock Project<br/>
Original Creator - [Siddharth Dushantha](https://github.com/sdushantha)

<!-- Reference Links -->

[docs_install]: /docs/install.md
[docs_docker]: /docs/install.md#docker
[docs_docker_dockerhub]: /docs/install.md#docker
[docs_docker_compose]: /docs/install.md#using-compose
[docs_docker_source]: /docs/install.md#build-image-from-source-useful-for-contributors
[docs_py]: /docs/install.md#python
[docs_py_build]: /docs/install.md#build-python-package-from-source-useful-for-contributors
[docs_contrib]: /docs/CONTRIBUTING.md
[docs_contrib_adding_targets]: /docs/CONTRIBUTING.md#adding-targets
[docs_contrib_removing_targets]: /docs/CONTRIBUTING.md#removing-targets
[docs_contrib_restoring_targets]: /docs/CONTRIBUTING.md#restoring-targets
[ext_pypi]: https://pypi.org/project/sherlock-project/
[ext_brew]: https://formulae.brew.sh/formula/sherlock

43 changes: 43 additions & 0 deletions docs/pyproj/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!-- This README should be a mini version at all times for use on pypi -->

<p align=center>
<br>
<a href="https://sherlock-project.github.io/" target="_blank"><img src="https://www.kali.org/tools/sherlock/images/sherlock-logo.svg" width="25%"/></a>
<br>
<strong>
<span>Hunt down social media accounts by username across <a href="https://github.com/sherlock-project/sherlock/blob/master/sites.md">400+ social networks</a></span>
</strong>
<br>
<span>Additional documentation can be found on our <a href="https://github.com/sherlock-project/sherlock/">GitHub repository</a></span>
<br>
</p>

## Basic usage

```console
$ sherlock --help
usage: sherlock [-h] [--version] [--verbose] [--folderoutput FOLDEROUTPUT]
[--output OUTPUT] [--tor] [--unique-tor] [--csv] [--xlsx]
[--site SITE_NAME] [--proxy PROXY_URL] [--json JSON_FILE]
[--timeout TIMEOUT] [--print-all] [--print-found] [--no-color]
[--browse] [--local] [--nsfw]
USERNAMES [USERNAMES ...]
```

To search for only one user:
```bash
$ sherlock user123
```

To search for more than one user:
```bash
$ sherlock user1 user2 user3
```
<br>
<hr>
<br>

<p align="center">
<img width="70%" height="70%" src="https://user-images.githubusercontent.com/27065646/219638267-a5e11090-aa6e-4e77-87f7-0e95f6ad5978.png"/>
</a>
</p>
62 changes: 36 additions & 26 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
[build-system]
requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"
requires = [ "poetry-core>=1.8.0", "poetry-dynamic-versioning>1.0.0,<2.0.0" ]
build-backend = "poetry_dynamic_versioning.backend"

[project.scripts]
sherlock = "sherlock:main"
[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"

[project.urls]
Homepage = "http://sherlock-project.github.io/"
Repository = "https://github.com/sherlock-project/sherlock.git"
Issues = "https://github.com/sherlock-project/sherlock/issues"

[project]
name = "Sherlock"
[tool.poetry]
name = "sherlock-project"
version = "0.0.0"
description = "Hunt down social media accounts by username across social networks"
license = "MIT"
authors = [
{ name = "Sherlock Project" }
"Siddharth Dushantha"
]
maintainers = [
{ name = "Siddharth Dushantha" },
{ name = "Matheus Felipe" },
{ name = "Sondreal" },
{ name = "Paul Pfeister" }
"Paul Pfeister",
"Matheus Felipe",
"Sondre Karlsen Dyrnes"
]
description = "Hunt down social media accounts by username across social networks"
readme = "README.md"
license = {file = "LICENSE"}
dynamic = ["dependencies", "version"]
readme = "docs/pyproj/README.md"
packages = [ { include = "sherlock" } ]
keywords = [ "osint", "reconnaissance", "information gathering" ]
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand All @@ -34,13 +30,27 @@ classifiers = [
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Topic :: Communications",
"Topic :: Security"
]

[tool.setuptools.dynamic]
dependencies = { file = [ "requirements.txt" ] }
version = { attr = "sherlock.__version__" }

[tool.setuptools]
package-dir = {"" = "sherlock"}
[tool.poetry.urls]
Homepage = "http://sherlock-project.github.io/"
Repository = "https://github.com/sherlock-project/sherlock.git"
Issues = "https://github.com/sherlock-project/sherlock/issues"

[tool.poetry.dependencies]
python = "^3.8"
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"
pandas = ">1.0.0"
openpyxl = "^3.0.10"
exrex = "^0.11.0"

[tool.poetry.scripts]
sherlock = 'sherlock.sherlock:main'
10 changes: 0 additions & 10 deletions requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion sherlock/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This module defines the objects for notifying the caller about the
results of queries.
"""
from result import QueryStatus
from sherlock.result import QueryStatus
from colorama import Fore, Style
import webbrowser

Expand Down
8 changes: 4 additions & 4 deletions sherlock/sherlock.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

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 sherlock.result import QueryStatus
from sherlock.result import QueryResult
from sherlock.notify import QueryNotifyPrint
from sherlock.sites import SitesInformation
from colorama import init
from argparse import ArgumentTypeError

Expand Down
6 changes: 3 additions & 3 deletions sherlock/tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import os.path
import unittest
import sherlock
from result import QueryStatus
from notify import QueryNotify
from sites import SitesInformation
from sherlock.result import QueryStatus
from sherlock.notify import QueryNotify
from sherlock.sites import SitesInformation
import warnings


Expand Down
1 change: 0 additions & 1 deletion sherlock/tests/test_multiple_usernames.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import importlib
import unittest
import sys
sys.path.append('../')
Expand Down

0 comments on commit be917e3

Please sign in to comment.