Overview
The extraction module (extraction.js) provides two main capabilities:
- Metadata Extraction: Extracts meta tags from profile HTML
- Pattern Extraction: Finds specific patterns like emails, phones, and links
Metadata Extraction
Metadata extraction parses HTML meta tags to collect information about profiles, including social graph data, descriptions, images, and other structured information.How It Works
Fromextraction.js:6-58, the metadata extractor:
Filtered Meta Tags
The extractor filters out technical meta tags using regex patterns:Supported Meta Tag Types
The extractor handles three types of meta tags:-
Property-based (Open Graph, Facebook)
-
Name-based (Twitter, standard meta)
-
Itemprop-based (Schema.org)
Duplicate Handling
Fromextraction.js:34-45, the extractor combines duplicate metadata:
Usage
Example Output
Metadata extraction only occurs for profiles with “good” status to reduce processing time and focus on confirmed matches.
Pattern Extraction
Pattern extraction uses regular expressions to find specific information patterns within profile HTML source code.How It Works
Fromextraction.js:60-87, the pattern extractor:
Pattern Types
Each website in the detection database can define custom extraction patterns:- Email addresses
- Phone numbers
- Social media links
- Website URLs
- User IDs
- Custom patterns
Configuration Format
Patterns are configured per website insites.json:
URL Decoding
Links are automatically URL-decoded to make them human-readable:Usage
Example Output
Integration with Detection Modes
Extraction features work with both fast and slow detection modes.Fast Mode Integration
Fromfast-scan.js:162-177:
Slow Mode Integration
Fromslow-scan.js:136-151, slow mode uses the same extraction logic:
Extraction only occurs after a profile is confirmed with “good” status to optimize performance.
Common Metadata Fields
Open Graph (Facebook)
og:title- Profile or page titleog:description- Profile bio or descriptionog:image- Profile picture URLog:url- Canonical profile URLog:type- Content type (profile, article, etc.)og:site_name- Platform name
Twitter Cards
twitter:card- Card type (summary, player, etc.)twitter:site- Site’s Twitter handletwitter:creator- Content creator’s handletwitter:title- Content titletwitter:description- Content descriptiontwitter:image- Image URL
Schema.org
name- Person or organization namedescription- Profile descriptionimage- Profile imageurl- Website URL
Performance Considerations
Memory Usage
Metadata extraction is memory-efficient as it:- Filters out unnecessary meta tags
- Combines duplicates
- Only processes confirmed profiles
Processing Time
Extraction adds minimal overhead:- Metadata: ~10-50ms per profile
- Patterns: Depends on regex complexity and source size
- Total: Usually less than 100ms additional per profile
Optimization Tips
- Use with filtering: Combine with
--filter goodto extract only from confirmed profiles - Limit websites: Use
--websitesor--topto reduce the number of profiles processed - Choose wisely: Only enable extraction when you need the additional intelligence
Practical Applications
OSINT Investigations
- Build comprehensive profiles across platforms
- Find hidden connections between accounts
- Identify real names and contact information
- Map social networks and relationships
Data Correlation
- Shared email addresses
- Common profile pictures
- Consistent bio information
- Cross-platform links
Security Research
- Identify information leakage
- Find exposed personal data
- Map digital footprints
- Assess privacy exposure