
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
indicator-extractor
Advanced tools
Extract indicators (IP, domain, email, hashes, etc.) from a string or a PDF file
Extract indicators (IP, domain, email, hashes, etc.) from a string or a PDF file written in Rust.
A WebAssembly build is available on npm and can be installed like the following:
npm install indicator-extractor
Then you can use it like this:
import {
extractIndicators,
extractIndicatorsBytes,
parsePdf,
Indicator,
} from "indicator-extractor/indicator_extractor";
// Extract indicators from a string
const indicators: Indicator[] = extractIndicators("https://github.com");
console.log(indicators); // [{"kind":"url","value":"https://github.com"}]
// Or if you prefer bytes
const extractPdf: Indicator[] = extractIndicatorsBytes(new Uint8Array());
// You can also parse a PDF file to get its text
const pdfData: string = parsePdf(new Uint8Array());
// Where you can then use `extractIndicators` on the text
const pdfIndicators: Indicator[] = extractIndicators(pdfData);
The crate is available on crates.io and can be installed like the following:
cargo add indicator-extractor
use indicator_extractor::parser::extract_indicators;
let result = extract_indicators("https://github.com".as_bytes());
println!("{:?}", result); // Ok(([], [Indicator::Url("https://github.com")])
use indicator_extractor::{data::{PdfExtractor, DataExtractor}, parser::extract_indicators};
let pdf_data = std::fs::read("./somewhere/pdf_file_path.pdf").unwrap();
let pdf_string = PdfExtractor.extract(&pdf_data);
let result = extract_indicators(pdf_string.as_bytes());
FAQs
Extract indicators (IP, domain, email, hashes, etc.) from a string or a PDF file
The npm package indicator-extractor receives a total of 1 weekly downloads. As such, indicator-extractor popularity was classified as not popular.
We found that indicator-extractor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.