Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/exclusions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
Expand All @@ -25,6 +25,7 @@ jobs:

- name: Install dependencies
run: |
poetry self add poetry-dynamic-versioning
poetry install --no-interaction --with dev

- name: Run false positive tests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-site-list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ jobs:
steps:
# Check out the code at the specified pull request head commit
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

# Install Python 3
- name: Install Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.x'

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/validate_modified_targets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
# Checkout the base branch but fetch all history to avoid a second fetch call
ref: ${{ github.base_ref }}
Expand All @@ -33,6 +33,7 @@ jobs:

- name: Install dependencies
run: |
poetry self add poetry-dynamic-versioning
poetry install --no-interaction --with dev

- name: Prepare JSON versions for comparison
Expand Down
86 changes: 49 additions & 37 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,38 @@
[build-system]
requires = [ "poetry-core>=1.2.0" ]
build-backend = "poetry.core.masonry.api"
# poetry-core 1.8 not available in .fc39. Can upgrade to 1.8.0 at .fc39 EOL
requires = ["pdm-backend>=2.4.8"]
build-backend = "pdm.backend"

[tool.poetry-version-plugin]
source = "init"
[tool.pdm.version]
path = "sherlock_project/__init__.py"

[tool.poetry]
packages = [ { include = "sherlock_project"} ]
version = "0.0.0"

[tool.poetry.requires-plugins]
poetry-dynamic-versioning = { version = ">=1.0.0,<2.0.0", extras = ["plugin"] }

[tool.poetry-dynamic-versioning]
enable = true

[tool.poetry-dynamic-versioning.from-file]
source = "sherlock_project/__init__.py"
pattern = '__version__ = "(.+)"'

[project]
name = "sherlock-project"
version = "0.16.0"
dynamic = ["version"]
description = "Hunt down social media accounts by username across social networks"
license = "MIT"
license = {text="MIT"}
authors = [
"Siddharth Dushantha <siddharth.dushantha@gmail.com>"
{ name="Siddharth Dushantha", email="siddharth.dushantha@gmail.com" }
]
maintainers = [
"Paul Pfeister <code@pfeister.dev>",
"Matheus Felipe <matheusfelipeog@protonmail.com>",
"Sondre Karlsen Dyrnes <sondre@villdyr.no>"
{ name="Paul Pfeister", email="code@pfeister.dev" },
{ name="Matheus Felipe", email="matheusfelipeog@protonmail.com" },
{ name="Sondre Karlsen Dyrnes", email="sondre@villdyr.no" }
]
readme = "docs/pyproject/README.md"
packages = [ { include = "sherlock_project"} ]
keywords = [ "osint", "reconnaissance", "information gathering" ]
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand All @@ -33,36 +45,36 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Security"
]
requires-python = ">=3.9"
dependencies = [
"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",
"pandas >=2.2.1",
"openpyxl >=3.0.10",
]

[project.urls]
homepage = "https://sherlockproject.xyz/"
repository = "https://github.com/sherlock-project/sherlock"


[tool.poetry.urls]
"Bug Tracker" = "https://github.com/sherlock-project/sherlock/issues"

[tool.poetry.dependencies]
python = "^3.9"
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"
pandas = "^2.2.1"
openpyxl = "^3.0.10"
tomli = "^2.2.1"

[tool.poetry.group.dev.dependencies]
jsonschema = "^4.0.0"
rstr = "^3.2.2"
pytest = "^8.4.2"
pytest-xdist = "^3.8.0"


[tool.poetry.group.ci.dependencies]
defusedxml = "^0.7.1"
[dependency-groups]
dev = [
"jsonschema >=4.0.0",
"rstr >=3.2.2",
"pytest >=8.4.2",
"pytest-xdist >=3.8.0"
]
ci = [
"defusedxml >=0.7.1"
]

[tool.poetry.scripts]
[project.scripts]
sherlock = 'sherlock_project.sherlock:main'
23 changes: 4 additions & 19 deletions sherlock_project/__init__.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,15 @@
""" Sherlock Module
"""Sherlock Module

This module contains the main logic to search for usernames at social
networks.

"""

from importlib.metadata import version as pkg_version, PackageNotFoundError
import pathlib
import tomli


def get_version() -> str:
"""Fetch the version number of the installed package."""
try:
return pkg_version("sherlock_project")
except PackageNotFoundError:
pyproject_path: pathlib.Path = pathlib.Path(__file__).resolve().parent.parent / "pyproject.toml"
with pyproject_path.open("rb") as f:
pyproject_data = tomli.load(f)
return pyproject_data["tool"]["poetry"]["version"]

# This variable is only used to check for ImportErrors induced by users running as script rather than as module or package
import_error_test_var = None

__shortname__ = "Sherlock"
__longname__ = "Sherlock: Find Usernames Across Social Networks"
__version__ = get_version()
__shortname__ = "Sherlock"
__longname__ = "Sherlock: Find Usernames Across Social Networks"
__version__ = "0.16.0"

forge_api_latest_release = "https://api.github.com/repos/sherlock-project/sherlock/releases/latest"
Loading