osint_regex
Stdlib-only regular expression helpers for extracting common OSINT artifacts from text.
What it does
osint_regex is a registry-driven package for finding common OSINT artifacts from text.
The extractors fall into two groups:
- Broad heuristic helpers that favor recall on messy text, such as
website,phone,price,latlon, andlong_string. - Standardized or format-based helpers that target known syntaxes, such as
email,twitter_handle,domain,ipv4,ipv6,cidr,uuid,phone_e164, the wallet/hash categories,transaction_hash,onion_address, andsolana_wallet.
All helpers are regex-based. Heuristic helpers cast a wider net on noisy text. The narrower helpers are still pattern matchers, not checksum validators or protocol parsers.
The preferred import style is:
import osint_regex as osreg
Quick Start
python -m pip install -e .
import osint_regex as osreg
text = """
Contact info@example.com, call +1 (555) 123-4567,
visit https://www.example.com, mention @openai,
and send 1BoatSLRHtKNngkdXEeobR76b53LETtpyT.
"""
print(osreg.website(text))
print(osreg.email(text))
print(osreg.phone(text))
print(osreg.twitter_handle(text))
print(osreg.find(text, "btc_wallet"))
print(osreg.latlon("Coords 51.5074, -0.1278"))
print(osreg.scan(text))
Core API
Canonical helpers are grouped by matching style:
Broad heuristic helpers:
website(text)phone(text)price(text)latlon(text)long_string(text)
Format-based helpers:
email(text)twitter_handle(text)domain(text)ipv4(text)ipv6(text)cidr(text)uuid(text)phone_e164(text)btc_wallet(text)eth_wallet(text)monero_wallet(text)dash_wallet(text)cardano_wallet(text)cardano_stake_address(text)doge_wallet(text)litecoin_wallet(text)ripple_wallet(text)stellar_wallet(text)transaction_hash(text)onion_address(text)bitcoin_cash_wallet(text)tron_wallet(text)solana_wallet(text)
Dynamic lookup:
find(text, kind)scan(text)
Compatibility:
- Legacy plural aliases, compatibility aliases, and
find_*aliases remain available for the original helpers, including forms such asemails,phones,btc_wallets,url,hostname,bch_wallet,cardano_payment_address,tel, andfind_phone_numbers. OSINTRegexis still provided for older call sites.
Behavior
findaccepts canonical kinds such as"phone"and legacy aliases such as"find_phone_numbers".scanreturns a stable dictionary with every canonical category included.- Match lists are normalized from
re.finditer, so capture groups do not leak into results. phoneis the broad phone helper.phone_e164is the stricter E.164-style helper, andtelremains available as a compatibility alias for it.urlis a compatibility alias forwebsite, andhostnameis a compatibility alias fordomain.website,phone,price,latlon, andlong_stringare broad heuristic helpers. They are designed for useful recall on noisy text, not strict validation.email,twitter_handle,domain,ipv4,ipv6,cidr,uuid,phone_e164,onion_address,bitcoin_cash_wallet,cardano_stake_address,tron_wallet,solana_wallet, the wallet/hash extractors, andtransaction_hashare narrower format helpers. Most still rely on regex patterns plus local validation and do not perform network calls.latlonworks best on standalone coordinate text.- The package expects decoded
strinput. Decodebytesbefore calling the API.
Documentation
See the full reference in the repository: https://github.com/thomasjjj/OSINT_REGEX/blob/master/docs/reference.md
Development
python -m pip install -r requirements-dev.txt
python -m pytest -q
python -m ruff check .
python -m ruff format --check .
python -m mypy osint_regex tests
python -m build
python -m pre_commit run --all-files
Metadata
Release files for osint-regex 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| osint_regex-0.2.1.tar.gz | 12.8 kB | Without provenance | Details for osint_regex-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| osint_regex-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for osint_regex-0.2.1-py3-none-any.whl |
Total release size: 21.6 kB
Release files / osint_regex-0.2.1.tar.gz
| Download URL | osint_regex-0.2.1.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f13d0ea447691be1aeb0ca540c306a7536483200e80510ce4c0689a19a959a1
|
|
BLAKE2b-256 checksum How to use checksums |
d989c2936ff8f3ced472321f043c5e582480c3b4af4cfed730c7fe6fee07ad4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Release files / osint_regex-0.2.1-py3-none-any.whl
| Download URL | osint_regex-0.2.1-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1edb93a271a04a0b5e63eb9968b72957338eafe4f8ebb6647bcb72a7b32a549f
|
|
BLAKE2b-256 checksum How to use checksums |
4a3dd959e035f14a6a941629123442800e6641a8b9fded3dbb553abe2c6aa6da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Security for osint-regex 0.2.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.