Multilingual OSINT analysis in a single call: language detection, IOC extraction, entity recognition, and risk scoring. By Muhammed Shazin Sadhik Kunhi Parambath.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file osintlens-0.1.1.tar.gz.
File metadata
- Download URL: osintlens-0.1.1.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45e6ed8b25b3fcd7428668d6d79295317f18e1f6548255055b29742d146e4573
|
|
| MD5 |
43a01b939acaf899b8c420b808cced21
|
|
| BLAKE2b-256 |
71568ea3e32fd499a0dd4e83ae1bf47e0ba0c93dc1524dbf003e8e2dd72b01d5
|
Provenance
The following attestation bundles were made for osintlens-0.1.1.tar.gz:
Publisher:
publish-packages.yml on shaz-in-dev/intel-platform
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
osintlens-0.1.1.tar.gz -
Subject digest:
45e6ed8b25b3fcd7428668d6d79295317f18e1f6548255055b29742d146e4573 - Sigstore transparency entry: 2166697271
- Sigstore integration time:
-
Permalink:
shaz-in-dev/intel-platform@1f166346a4699e8cefe690faf866614b702d538c -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/shaz-in-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-packages.yml@1f166346a4699e8cefe690faf866614b702d538c -
Trigger Event:
push
-
Statement type:
File details
Details for the file osintlens-0.1.1-py3-none-any.whl.
File metadata
- Download URL: osintlens-0.1.1-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e624b7da83e35e0c75de48c3cb60943f4824a831c2faf1fe44960df6917c15b5
|
|
| MD5 |
ebba3ce5b17a3d92385e0d14f1151ca3
|
|
| BLAKE2b-256 |
43d524d7bda1dd908d80e1a97a8ab1c2e708c4456b7d7ca57a00c9fa687e591f
|
Provenance
The following attestation bundles were made for osintlens-0.1.1-py3-none-any.whl:
Publisher:
publish-packages.yml on shaz-in-dev/intel-platform
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
osintlens-0.1.1-py3-none-any.whl -
Subject digest:
e624b7da83e35e0c75de48c3cb60943f4824a831c2faf1fe44960df6917c15b5 - Sigstore transparency entry: 2166697282
- Sigstore integration time:
-
Permalink:
shaz-in-dev/intel-platform@1f166346a4699e8cefe690faf866614b702d538c -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/shaz-in-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-packages.yml@1f166346a4699e8cefe690faf866614b702d538c -
Trigger Event:
push
-
Statement type: