Skip to main content

StealthMon 🕵️‍♂️🔍

Detect Incognito Mode & Monitor Browser Search Queries

Overview

StealthMon is a Python module that helps detect whether a browser is running in Incognito/Private mode and monitors search queries from the system. It is designed for privacy monitoring, parental control, cybersecurity research, and system audits.

Features

✅ Detect Incognito Mode – Identify when browsers like Chrome, Firefox, Edge, Brave, or Opera are running in private mode. ✅ Monitor Search Queries – Track user searches made on Google, Bing, DuckDuckGo, and more. ✅ Alert System – Configurable alerts when specific queries are detected. ✅ Multi-Threading Support – Efficient monitoring with background threads. ✅ Visual Notifications – Optional UI components for alerts and notifications. ✅ Cross-Platform – Works on Windows & Linux (Mac support coming soon). ✅ Lightweight & Easy to Use – Simple Python module with clear API.

Use Cases

🔹 Parental Control – Keep track of Incognito browsing on a child's system. 🔹 Cybersecurity & Monitoring – Detect stealth browsing behavior in workplaces or shared systems. 🔹 Forensics & Investigations – Useful for analyzing browser activity on compromised systems.

Installation

pip install stealthmon

Or install from source:

git clone https://github.com/yourusername/stealthmon
cd stealthmon
pip install -e .

Dependencies

StealthMon requires the following dependencies:

  • Python 3.7+
  • psutil
  • pywin32 (Windows only)
  • tkinter (for UI components)
  • pygame (for sound alerts)

Quick Start

# You can use either StealthMon or StealthMonitor (they're the same)
from stealthmon import StealthMon
# or
from stealthmon import StealthMonitor

# Initialize the monitor
monitor = StealthMon()

# Check for incognito mode for a specific browser
is_chrome_incognito = monitor.check_browser("chrome")
print(f"Chrome: {'Incognito Mode' if is_chrome_incognito else 'Normal Mode'}")

# Check all browsers
for browser in ["chrome", "firefox", "edge", "opera"]:
    try:
        is_incognito = monitor.check_browser(browser)
        print(f"{browser}: {'Incognito Mode' if is_incognito else 'Normal Mode'}")
    except Exception as e:
        print(f"{browser}: Error - {str(e)}")

# Start monitoring with a callback function
def handle_results(results, queries):
    # results = dict of browser -> incognito status
    for browser, is_incognito in results.items():
        if is_incognito:
            print(f"Incognito detected: {browser}")
    
    # queries = dict of browser -> query data
    for browser, data in queries.items():
        for query_data in data.get('queries', []):
            query = query_data.get('query', '')
            engine = query_data.get('engine', '')
            print(f"Search query detected: {query} on {engine}")

# Start continuous monitoring with 1 second interval
monitor.start(interval=1.0, callback=handle_results)

# To stop monitoring
# monitor.stop()

Using Simplified API

# You can also use the simplified API functions
from stealthmon import create_monitor, stop_monitoring

# Start monitoring with default settings (checks all browsers every 1 second)
results = create_monitor()

# Or customize the monitoring
def handle_results(results, queries):
    # Process monitoring results
    pass

results = create_monitor(browser="chrome", interval=2.0, callback=handle_results)

# Later, stop the monitoring
stop_monitoring()

Advanced Usage

Tracking Specific Search Queries

from stealthmon import StealthMon

# Initialize with configuration
monitor = StealthMon()

# Define a callback function that filters specific queries
def handle_results(results, queries):
    for browser, data in queries.items():
        for query_data in data.get('queries', []):
            query = query_data.get('query', '').lower()
            if "python tutorial" in query:
                print(f"Educational search detected: {query}")

# Start monitoring with the callback
monitor.start(callback=handle_results)

Customizing Detection Behavior

from stealthmon import StealthMon

# Custom configuration
config = {
    "browsers_to_monitor": ["chrome", "firefox", "edge"],
    "check_interval": 3,  # seconds
    "search_engines": {
        "google": {
            "domain_patterns": ["google.com"],
            "title_pattern": r"(.+) - Google Search"
        },
        "bing": {
            "domain_patterns": ["bing.com"],
            "title_pattern": r"(.+) - Bing"
        }
    }
}

# Initialize with custom config
monitor = StealthMon(config=config)

# Start monitoring
monitor.start()

Command Line Interface

StealthMon also includes a command-line interface:

# Check all browsers once
stealthmon --once

# Monitor specific browser continuously
stealthmon --browser chrome

# Set custom interval
stealthmon --interval 2.5

# Quiet mode (no continuous display)
stealthmon --quiet

Error Handling

StealthMon includes robust error handling for various scenarios:

  • Browser detection failures
  • Privilege or permission issues
  • Missing dependencies
  • Platform compatibility issues

Contributing

We welcome contributions! If you want to enhance the project, feel free to submit issues and pull requests.

License

MIT License - See LICENSE file for details

Metadata

Release files for stealthmon 3.2.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 stealthmon 3.2.1
File Size Uploaded
stealthmon-3.2.1.tar.gz 12.3 kB Details

Built distribution (wheel)

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

Total release size: 22.8 kB

Release files / stealthmon-3.2.1.tar.gz

Download URL stealthmon-3.2.1.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0b59697849c6e6a95f4ee751123a542efb2a096841533eeb55f4240d83879cbb
BLAKE2b-256 checksum
How to use checksums
e3974a450313a029dc6bd7e42671af0737b098d7b55dd4f0ccf0a511ea9c3bc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / stealthmon-3.2.1-py3-none-any.whl

Download URL stealthmon-3.2.1-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad6dbd6c479a8f90db40cc434b7abffbf7b79c2a4f9931fab033c019ba634969
BLAKE2b-256 checksum
How to use checksums
a74e72be8ee00096c38140d4b4261190cc885440920b66592d304759439d55ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

3.2.1 This release

2 release files

3.1.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

0.1.0

2 release files

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