Skip to main content

Sosmed Scanner

CI

Demo

A small Python command-line tool that checks whether a username exists on public profile pages. It uses only the standard library and reads public information only.

Project Type

This is a standard library only command-line tool, not infrastructure code.

Features

  • Checks 20 platforms: GitHub, GitLab, Reddit, Medium, DEV, PyPI, YouTube, Mastodon, Tumblr, Flickr, SoundCloud, Dribbble, Linktree, Gravatar, Codeberg, SourceHut, Keybase, Chess.com, Docker Hub, and Hugging Face.
  • Three clear statuses: found, not_found, and unknown (for blocked or failed requests).
  • Plain text, JSON, or CSV output.
  • Polite by default: sends a descriptive User-Agent, uses a timeout, and waits between requests.
  • Optional debug logging with --verbose.
  • No third-party runtime dependencies.

Architecture

  • sosmed_scanner/network.py: HTTP request helper. Network errors are returned as data, never raised.
  • sosmed_scanner/scanner.py: platform list, username validation, and the scan loop.
  • sosmed_scanner/cli.py: argument parsing, logging setup, and output formatting.
  • tests/: unit and integration tests that use mocks, so no real network access is needed.

Quick Start (fresh clone)

The tool itself runs on Python 3.8 or newer and has no dependencies. The development toolchain (tests, lint, type checks) is pinned for Python 3.12, which is what CI uses.

git clone https://github.com/Nuzuli/sosmed-scanner.git
cd sosmed-scanner
python -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.lock
pytest

On Windows, activate the environment with .venv\Scripts\activate.

requirements-dev.lock is committed to the repository and checked by CI, so every install uses the same pinned versions. After changing requirements-dev.txt, regenerate the lockfile by running the "Update lockfile" workflow in the Actions tab; CI fails if the two files disagree.

Usage

Run from the repository root:

python -m sosmed_scanner.cli target_username

Options:

  • -p, --platform NAME: scan only this platform (repeatable), for example -p github -p dev
  • --json: print results as JSON
  • --csv: print results as CSV (columns: platform, status, url, detail)
  • --delay SECONDS: pause between requests (default 0.5)
  • -v, --verbose: print debug details to stderr

Example output:

GitHub     found      https://github.com/alice
GitLab     not_found  https://gitlab.com/alice
Reddit     unknown    https://www.reddit.com/user/alice  (HTTP 429)

Logging

Diagnostic messages are emitted at DEBUG level as one JSON object per record. Every record has an event key plus event-specific fields, for example:

{"event": "fetch_done", "status": 200, "url": "https://github.com/octocat"}

Events: scan_start, platform_result, scan_done, fetch_start, fetch_done, fetch_failed.

Exit Codes

  • 0: scan finished
  • 2: invalid input (bad username or unknown platform)

Understanding Results

  • found: the profile page returned HTTP 200.
  • not_found: the profile page returned HTTP 404.
  • unknown: anything else, such as rate limiting, blocking, or a network error. The detail field explains why.

Development

Run the checks locally:

ruff check sosmed_scanner tests
mypy sosmed_scanner
pytest -v --cov=sosmed_scanner --cov-fail-under=80

The same checks, plus a dependency audit, run on every push through GitHub Actions.

Responsible Use

Use this tool only for lawful purposes, such as checking your own username or brand. It reads public pages only. Respect each platform's terms of service and do not use it for harassment or profiling people.

License

MIT License. See LICENSE.

Metadata

Release files for sosmed-scanner 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sosmed-scanner 0.4.0
File Size Uploaded Provenance Actions
sosmed_scanner-0.4.0.tar.gz 13.8 kB With provenance Details for sosmed_scanner-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sosmed-scanner 0.4.0
File Interpreter ABI Platform Actions
sosmed_scanner-0.4.0-py3-none-any.whl Python 3 none any Details for sosmed_scanner-0.4.0-py3-none-any.whl

Total release size: 23.1 kB

Release files / sosmed_scanner-0.4.0.tar.gz

Download URL sosmed_scanner-0.4.0.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0878b1a6365d25f966393796264adae8b6464d17096330067ce03ccd844d2816
BLAKE2b-256 checksum
How to use checksums
d401c12b7d819bc74d60cfbac6f23cc7a1e25f414f4adea11f36bf40de3e5e83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / sosmed_scanner-0.4.0-py3-none-any.whl

Download URL sosmed_scanner-0.4.0-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9d2f184a06ab3fa909a7770fab51544f4896c99894256b804fcb9f9706d0118f
BLAKE2b-256 checksum
How to use checksums
1e8a10c83d705c61ace2b6335a37f5372ddb7c90967b818d621334e0da295862
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Security for sosmed-scanner 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sosmed_scanner-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page