Skip to content

jdubansky/ScriptRunner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

CTF ScriptRunner

๐Ÿš€ A powerful GTK-based terminal application designed for Capture The Flag (CTF) competitions and penetration testing workflows.

CTF ScriptRunner Demo

๐Ÿ“‹ Overview

CTF ScriptRunner is a comprehensive toolkit that streamlines your penetration testing and CTF workflow by providing quick access to commonly used commands and scripts. Built with Python and GTK, it features an intuitive interface with organized script categories, customizable variables, and advanced functionality like long-press support for tablet users.

โœจ Key Features

๐ŸŽฏ Comprehensive Script Library

  • 70+ pre-configured CTF scripts covering the entire attack lifecycle
  • 9 organized categories: Recon, Web, LinuxPrivEsc, WinPrivEsc, SMB, Listeners, Payloads, Crypto, BruteForce
  • Modern tools integration: Nmap, Rustscan, Gobuster, LinPEAS, WinPEAS, Hydra, and more

๐Ÿ–ฅ๏ธ Advanced Terminal Interface

  • Multi-tab terminal support with closeable tabs
  • Right-click context menus for enhanced functionality
  • Tablet-friendly long-press support (500ms hold) for touch devices
  • Visual feedback with CSS styling and animations

โš™๏ธ Smart Variable System

  • Dynamic variable substitution (<$IP>, <$HOST>, <$Username>, etc.)
  • Persistent variable storage across sessions
  • Easy variable editing through the GUI interface

๐Ÿ“ Script Management

  • Add custom scripts through intuitive dialog boxes
  • Import/Export functionality for sharing script collections
  • Run in current tab or create new tab for parallel operations
  • Template-based command execution with variable replacement

๐Ÿ› ๏ธ Installation & Setup

Prerequisites

# Install required packages on Kali Linux
sudo apt update
sudo apt install python3 python3-gi gir1.2-gtk-3.0 gir1.2-vte-2.91

# Optional: Install common CTF tools
sudo apt install nmap gobuster nikto hydra john hashcat sqlmap

Quick Start

# Clone the repository
git clone https://github.com/yourusername/ScriptRunner.git
cd ScriptRunner

# Run the application
python3 pyterminal.py

๐Ÿ“š Script Categories

๐Ÿ” Reconnaissance

  • Network Discovery: Nmap variants, Rustscan, Masscan
  • DNS Enumeration: dig, dnsenum, subdomain discovery
  • Service Detection: Port scanning, version detection, vulnerability scripts

๐ŸŒ Web Application Testing

  • Directory Discovery: Gobuster, ffuf, dirb
  • Vulnerability Scanning: Nikto, SQLMap, whatweb
  • Subdomain Enumeration: DNS brute-forcing, virtual host discovery

๐Ÿง Linux Privilege Escalation

  • Automated Tools: LinPEAS, LinEnum, Linux Smart Enumeration
  • Manual Enumeration: SUID/SGID files, capabilities, cron jobs
  • System Analysis: Process monitoring, network connections

๐ŸชŸ Windows Privilege Escalation

  • PowerShell Tools: WinPEAS, PowerUp
  • System Information: whoami, systeminfo, installed software
  • Network Analysis: ipconfig, network configuration

๐Ÿ”ง Exploitation & Payloads

  • Reverse Shells: Bash, Python, PHP, PowerShell variants
  • MSFVenom Payloads: Linux, Windows, PHP payload generation
  • Listeners: Netcat, HTTP servers, SMB shares

๐Ÿ” Cryptography & Encoding

  • Encoding/Decoding: Base64, URL encoding, ROT13
  • Hash Functions: MD5, SHA256 generation
  • Password Cracking: John the Ripper, Hashcat integration

๐ŸŽฎ Usage Examples

Basic Workflow

  1. Set Variables: Update IP, HOST, Username, Password in the left panel
  2. Choose Category: Expand the desired script category (e.g., "Recon")
  3. Run Scripts:
    • Single click: Run in current tab
    • Long press (500ms): Choose "Run in Current Tab" or "Run in New Tab"

Advanced Features

  • Custom Scripts: Click "Add Script" to create your own commands
  • Import/Export: Share script collections via JSON files
  • Multi-tasking: Use "Run in New Tab" for parallel operations
  • Tablet Support: Long-press any script button for context menu

๐Ÿ–ฑ๏ธ Tablet & Touch Support

CTF ScriptRunner includes comprehensive tablet support:

  • Long-press detection: Hold any script button for 500ms
  • Visual feedback: Buttons briefly highlight green when long-press is detected
  • Context menus: Access "Run in Current Tab" / "Run in New Tab" options
  • Terminal long-press: Access Copy/Paste/Close Tab options in terminals

๐Ÿ“ File Structure

ScriptRunner/
โ”œโ”€โ”€ pyterminal.py          # Main application
โ”œโ”€โ”€ ctf_templates.json     # Script definitions
โ”œโ”€โ”€ ctf_variables.json     # User variables
โ”œโ”€โ”€ peekvideo.gif         # Demo video
โ””โ”€โ”€ README.md             # This file

๐Ÿ”ง Configuration

Adding Custom Variables

Edit ctf_variables.json or use the GUI:

{
  "IP": "10.10.11.35",
  "HOST": "target.htb",
  "LocalIP": "10.10.14.15",
  "Username": "admin",
  "Password": "password123"
}

Adding Custom Scripts

Use the "Add Script" button or manually edit ctf_templates.json:

{
  "label": "Custom Nmap",
  "command": "nmap -sC -sV <$IP>",
  "category": "Custom"
}

๐Ÿš€ Advanced Tips

Keyboard Shortcuts

  • Ctrl+Shift+C: Copy in terminal
  • Ctrl+Shift+V: Paste in terminal
  • Ctrl+W: Close current tab

Efficient CTF Workflow

  1. Recon Phase: Start with "Nmap All Ports" โ†’ "Nmap Basic"
  2. Web Testing: Use "Gobuster Dir" โ†’ "Nikto" โ†’ "SQLMap"
  3. Exploitation: Set up "Netcat Listener" โ†’ Generate payloads
  4. Privilege Escalation: Run "LinPEAS" or "WinPEAS" โ†’ Manual enumeration

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit pull requests with:

  • New script templates
  • Bug fixes
  • Feature enhancements
  • Documentation improvements

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ”— Acknowledgments

  • SecLists - Comprehensive wordlists for discovery
  • PEASS-ng - Privilege escalation enumeration suite
  • GTK - Cross-platform GUI toolkit
  • VTE - Virtual Terminal Emulator widget

๐Ÿ“ž Support

For issues, feature requests, or questions:

  • Open an issue on GitHub
  • Check existing documentation
  • Review the demo GIF for usage examples

Made with โค๏ธ for the CTF and penetration testing community

About

runs script templates

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages