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
# 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()
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
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
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 stealthmon-3.1.1.tar.gz.
File metadata
- Download URL: stealthmon-3.1.1.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e8d35d2aa820a1c4d5a01711417d27030ace94b52a4b88e8571f12c598c1e30
|
|
| MD5 |
13b87709c8702641fee4ee95b2ab4452
|
|
| BLAKE2b-256 |
164953558fe4b5a0555f00acb2a6bda10c55ebe16b9e916f19dcea958a6adc88
|
File details
Details for the file stealthmon-3.1.1-py3-none-any.whl.
File metadata
- Download URL: stealthmon-3.1.1-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79e038ea47f63f4fb043e509e72b6e56439e573c77951091346843980aa14d88
|
|
| MD5 |
e89f05c98d544d458bb8dce10b2e379d
|
|
| BLAKE2b-256 |
c7c7898c9955f424bc2e47847f7ae1d0130736878de175b5b0fe9dcc5a29b34b
|