Skip to main content

osintlens

Multilingual OSINT analysis in a single call — by Muhammed Shazin Sadhik Kunhi Parambath. Point it at a block of text — a forum post, a paste, a scraped page — and get back the language, the indicators of compromise, the named entities, and an explainable risk verdict.

import osintlens as ol

result = ol.analyze("Leaked db_pass for admin@corp.example, C2 at 45.13.2.11")

result.risk.label          # 'CRITICAL'
result.risk.confidence     # 95
result.language.code       # 'en'
result.iocs["email"]       # ['admin@corp.example']
result.iocs["ipv4"]        # ['45.13.2.11']
result.matched_keywords    # {'critical': ['db_pass', ...], 'high': ['c2'], ...}

Most OSINT tooling on PyPI does one of these things — iocextract pulls indicators, a separate library detects language, another scores risk. osintlens runs the whole triage pipeline in one call, and it does it across English, Russian, Chinese, and German text, not just English.

Install

The base install is pure Python with zero dependencies — rule-based risk scoring and IOC extraction work out of the box:

pip install osintlens

Add optional backends only when you need them:

pip install "osintlens[multilingual]"   # fine-grained langdetect + spaCy NER
pip install "osintlens[ml]"             # scikit-learn risk model
pip install "osintlens[all]"            # everything

Everything degrades gracefully. Without [multilingual], language detection falls back to a Unicode-script heuristic (still distinguishes ru/zh from Latin) and entity extraction returns an empty list — IOCs act as a dependency-free entity floor. Without [ml], risk scoring uses the rule engine. Nothing crashes because an extra is missing.

For spaCy NER you also need the language models, e.g.:

python -m spacy download en_core_web_sm

What you get back

analyze() returns an AnalysisResult:

Field Description
language code, name, confidence, supported
risk label (LOW/MEDIUM/HIGH/CRITICAL), score, confidence, backend
iocs dict of ipv4, email, url, md5, sha1, sha256, cve, btc
entities list of {text, type, start, end, language} (needs [multilingual])
matched_keywords risk keywords found, grouped by tier
text_sha256 content hash for dedup / provenance

result.to_json() serializes the whole thing.

Build a knowledge graph

Every result can emit graph-ready nodes and edges, so you can knit many documents into a shared Neo4j (or any property-graph) view — the same entity seen in two documents becomes one shared node:

graph = result.graph(document_id="post-42")
# {"nodes": [{"id": "Document"...}, {"id": "email:admin@corp.example"...}],
#  "edges": [{"from": "post-42", "to": "email:...", "type": "CONTAINS"}]}

Command line

osintlens scan report.txt                 # analyze a file, print JSON
cat paste.txt | osintlens scan -           # read stdin
osintlens scan report.txt --graph post-42  # emit graph nodes/edges
osintlens scan report.txt --ml-model risk_model.joblib

Train your own risk model

from osintlens.ml import train

train(labeled_cases, output_path="risk_model.joblib")
# labeled_cases: [{"text": ..., "entities": [...], "expected_label": "HIGH"}, ...]

The model learns over the 12-element feature vector from osintlens.featurize, so it's a drop-in replacement for the rule engine via Analyzer(ml_model_path="risk_model.joblib").

Responsible use

osintlens analyzes text you already have. It does not fetch, scrape, or route traffic, and it is intended for defensive threat intelligence, security research, and authorized OSINT. Respect the terms of service and applicable law for any source you collect from, and don't use it to profile or target private individuals.

Author

Created and maintained by Muhammed Shazin Sadhik Kunhi Parambath.

License

MIT

Metadata

Release files for osintlens 0.1.1

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

Source distribution (sdist)

Source distribution for osintlens 0.1.1
File Size Uploaded Provenance Actions
osintlens-0.1.1.tar.gz 15.5 kB With provenance Details for osintlens-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for osintlens 0.1.1
File Interpreter ABI Platform Actions
osintlens-0.1.1-py3-none-any.whl Python 3 none any Details for osintlens-0.1.1-py3-none-any.whl

Total release size: 31.7 kB

Release files / osintlens-0.1.1.tar.gz

Download URL osintlens-0.1.1.tar.gz
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
45e6ed8b25b3fcd7428668d6d79295317f18e1f6548255055b29742d146e4573
BLAKE2b-256 checksum
How to use checksums
71568ea3e32fd499a0dd4e83ae1bf47e0ba0c93dc1524dbf003e8e2dd72b01d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 14, 2026.

Transparency log

Release files / osintlens-0.1.1-py3-none-any.whl

Download URL osintlens-0.1.1-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e624b7da83e35e0c75de48c3cb60943f4824a831c2faf1fe44960df6917c15b5
BLAKE2b-256 checksum
How to use checksums
43d524d7bda1dd908d80e1a97a8ab1c2e708c4456b7d7ca57a00c9fa687e591f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 14, 2026.

Transparency log

Security for osintlens 0.1.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for osintlens-0.1.1.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 Jul 14, 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.1.1 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