monitex

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2025 License: MIT Imports: 5 Imported by: 0

README

Monitex

JavaScript Monitoring Tool for Pentesting

Monitex is a powerful command-line tool designed for penetration testers and security researchers to monitor JavaScript files on web applications, detect changes, and track modifications over time.

Features

  • Automatic JS Discovery: Extracts all JavaScript files from target URLs
  • Dynamic Analysis: Uses headless Chrome to capture dynamically loaded JS files
  • Static Analysis: Fast regex-based extraction for quick scans
  • Change Detection: Uses SHA256 hashing to detect file modifications
  • Continuous Monitoring: Automated periodic checks with customizable intervals
  • Diff Generation: Saves detailed diffs when changes are detected
  • Multi-URL Support: Monitor multiple targets simultaneously
  • Flexible Parsing: Choose between static (fast) or dynamic (accurate) analysis
  • Fast & Efficient: Concurrent processing with retry mechanism
  • Flexible Output: Verbose, normal, and silent modes

Table of Contents

Installation

go install github.com/Adler-KZ/monitex@latest
Build from Source
# Clone the repository
git clone https://github.com/Adler-KZ/monitex.git
cd monitex

# Download dependencies
go mod download

# Build for your platform
make build

# Or build for all platforms
make build-all

# Install to /usr/local/bin (Linux/macOS)
make install
Platform-Specific Builds
# Linux
make build-linux

# Windows
make build-windows

# macOS
make build-darwin

See Makefile for more build options.

Usage

monitex [options]

INPUT:
  -u,  --url <string>          Target URL to monitor (comma-separated for multiple)
  -f,  --urls-file <file>      File containing URLs (one per line)

MONITORING:
  -m,  --monitor               Enable continuous monitoring mode
  -U,  --update                Check for updates/changes once
  -i,  --interval <minutes>    Monitoring check interval (default: 60)

PARSING:
       --dynamic               Use dynamic analysis with headless browser (chromedp)
       --dynamic-wait <sec>    Wait time for dynamic content loading (default: 10)
       --no-headless           Show browser window (for debugging)

OUTPUT:
  -l,  --list                  List all monitored JS files
  -d,  --diff <url>            Show diff for specific JS file URL
  -v,  --verbose               Enable verbose output
  -s,  --silent                Silent mode (minimal output)

CONFIGURATION:
       --data-file <file>      Custom data file path (default: monitex_data.json)
       --changes-file <file>   Custom changes log file (default: monitex_changes.log)
  -t,  --timeout <seconds>     HTTP request timeout (default: 30)

GENERAL:
  -h,  --help                  Show this help message
  -V,  --version               Show version information

Examples

Basic Scanning
# Scan a single URL
monitex -u https://example.com

# Scan multiple URLs
monitex -u "https://example.com,https://test.com"

# Load URLs from file
monitex -f targets.txt
Monitoring
# Start continuous monitoring (checks every 60 minutes)
monitex -m

# Monitor with custom interval (30 minutes)
monitex -m -i 30

# Check for updates once
monitex -U
Viewing Results
# List all monitored JS files
monitex -l

# Show content of specific JS file
monitex -d "https://example.com/app.js"

# Verbose output
monitex -u https://example.com -v
Advanced Usage
# Custom configuration files
monitex -u https://example.com --data-file my_data.json --changes-file my_changes.log

# Silent mode for automation
monitex -U -s

# Custom timeout (60 seconds)
monitex -u https://example.com -t 60

Integration Examples

Cron Job (Linux/macOS)
# Check for updates every hour
0 * * * * /path/to/monitex -U -s >> /var/log/monitex.log 2>&1
Windows Task Scheduler
# Create scheduled task
schtasks /create /tn "Monitex Update" /tr "C:\path\to\monitex.exe -U -s" /sc hourly
CI/CD Pipeline
# .github/workflows/monitor.yml
name: Monitor JS Changes
on:
  schedule:
    - cron: "0 */6 * * *" # Every 6 hours
jobs:
  monitor:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Run Monitex
        run: |
          ./monitex -U
          if [ -s monitex_changes.log ]; then
            # Send notification if changes detected
            echo "Changes detected!"
          fi

Made with ❤️ for the security community

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL