Skip to main content

A Python module for detecting Incognito mode and monitoring browser search queries

Project description

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

from stealthmon import StealthMonitor

# Initialize the monitor
monitor = StealthMonitor()

# Check for incognito mode
incognito_browsers = monitor.check_incognito()
for browser, is_incognito in incognito_browsers.items():
    print(f"{browser}: {'Incognito Mode' if is_incognito else 'Normal Mode'}")

# Start monitoring with a callback function
def handle_detection(event_type, browser, details):
    if event_type == "incognito":
        print(f"Incognito detected: {browser}")
    elif event_type == "query":
        print(f"Search query detected: {details['query']} on {details['engine']}")

# Start continuous monitoring
monitor.start_monitoring(callback=handle_detection)

# To stop monitoring
# monitor.stop_monitoring()

Advanced Usage

Tracking Specific Search Queries

# Track specific search queries
monitor = StealthMonitor()

def query_callback(browser, query, engine):
    if "python tutorial" in query.lower():
        print(f"Educational search detected: {query}")

monitor.start_query_tracking(callback=query_callback)

Customizing Detection Behavior

# Custom configuration
config = {
    "browsers_to_monitor": ["chrome", "firefox", "edge"],
    "check_interval": 3,  # seconds
    "search_engines": {
        "google": r"google\.com\/search\?.*q=([^&]+)",
        "bing": r"bing\.com\/search\?.*q=([^&]+)"
    }
}

monitor = StealthMonitor(config=config)
monitor.start_monitoring()

UI Components for Alerts

from stealthmon import StealthMonitor, create_alert_window

monitor = StealthMonitor()

def show_alert(event_type, browser, details):
    if event_type == "query" and "sensitive" in details['query'].lower():
        create_alert_window(
            title="Search Alert",
            message=f"Sensitive search detected: {details['query']}",
            duration=10  # seconds
        )

monitor.start_monitoring(callback=show_alert)

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stealthmon-0.1.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stealthmon-0.1.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file stealthmon-0.1.0.tar.gz.

File metadata

  • Download URL: stealthmon-0.1.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for stealthmon-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4d617712d92053916878670b87b6bc5eb04319460467f2fef4c36ac2d0182f94
MD5 0bca0dd7c936040f07ca4271f930a2b4
BLAKE2b-256 a6e4db495ba8eb344eac90c25a2bec4b203b360a4391564894d3baee82df9e96

See more details on using hashes here.

File details

Details for the file stealthmon-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: stealthmon-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for stealthmon-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58f29b849eb5092b3e66cb6621eaf4489dd685e84dfc832434e3212acc60224c
MD5 53554b94f5e0ebf6dc39002629aaebfb
BLAKE2b-256 26a730996a662e3c05d9c2e2c0c0045299ec53aa2ae0bdea70e942df08ba927e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page