Skip to content

About

Hybrid web-based PCAP editor, generator, merger, and hex viewer with complete TCP flow simulation

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DevToolBox πŸ› οΈ

A comprehensive suite of developer tools for data plane analysis, network packet manipulation, and binary file inspection. Built with Flask + Vue.js 3.

🎯 Overview

DevToolBox is a hybrid web-based application featuring 4 powerful utilities:

Tool Purpose Use Case
PCAP Editor Read, analyze, and modify network packet captures Packet forensics, protocol testing, traffic analysis
PCAP Generator Generate synthetic PCAP files with complete TCP flows Test data creation, simulation, stress testing
PCAP Merger Combine multiple PCAP files into one Consolidate captures, merge test data
Hex Viewer View and search binary files in hex/text formats Firmware analysis, file forensics, protocol debugging

✨ Key Features

PCAP Editor

  • Upload and analyze PCAP/PCAPNG files
  • View detailed packet information with protocol breakdown
  • Modify packet types (detect SYN, SYN-ACK, FIN, RST, ACK, PSH-ACK, UDP, ICMP)
  • Edit network fields: MAC addresses, IP addresses, ports, VLAN IDs
  • Modify HTTP Host headers and TLS SNI fields
  • Edit DNS queries with live packet updates
  • Automatic checksum recalculation
  • Download modified captures
  • File statistics and packet counting

PCAP Generator

  • Generate synthetic packets with complete TCP 3-way handshake flows
  • Support multiple protocols: TCP, HTTP, UDP, DNS (UDP/TCP), TLS
  • Incremental destination IP addresses for unique flows
  • VLAN tagging support
  • Custom network configurations (MAC, IP, ports)
  • Full TCP lifecycle: SYN β†’ SYN-ACK β†’ ACK β†’ Data β†’ FIN-ACK
  • Protocol-specific payloads (HTTP requests/responses, DNS queries, TLS Client Hello)

PCAP Merger

  • Merge 2+ PCAP/PCAPNG files into single capture
  • Preserve packet order and timing
  • Custom output filename
  • Automatic packet counting

Hex Viewer

  • Upload any binary file
  • Dual view mode: Human-readable text + Hex dump
  • Auto-detect encoding (UTF-8, ASCII, Latin-1, UTF-16, UTF-32)
  • Format detection (JSON, XML, Plain Text, Binary)
  • Search by hex pattern or ASCII text
  • Pagination for large files
  • Export capabilities (hex dump, text content)
  • Copy to clipboard

πŸ—οΈ Project Structure

devtoolbox/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app.py                  # Flask API server
β”‚   β”œβ”€β”€ pcap_handler.py         # PCAP processing logic
β”‚   β”œβ”€β”€ utils.py                # Utility functions
β”‚   β”œβ”€β”€ requirements.txt         # Python dependencies
β”‚   └── uploads/                # File storage
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ views/
β”‚   β”‚   β”œβ”€β”€ Home.vue            # Landing page
β”‚   β”‚   β”œβ”€β”€ PCAPEditor.vue      # Editor tool
β”‚   β”‚   β”œβ”€β”€ PCAPGenerator.vue   # Generator tool
β”‚   β”‚   β”œβ”€β”€ PCAPMerger.vue      # Merger tool
β”‚   β”‚   └── HexViewer.vue       # Hex viewer tool
β”‚   β”œβ”€β”€ router/
β”‚   β”‚   └── index.js            # Route definitions
β”‚   β”œβ”€β”€ App.vue                 # Root component
β”‚   β”œβ”€β”€ main.js                 # Entry point
β”‚   β”œβ”€β”€ vite.config.js          # Vite configuration
β”‚   β”œβ”€β”€ package.json            # Node dependencies
β”‚   └── index.html              # HTML template
β”œβ”€β”€ docs/                       # GitHub Pages documentation
β”œβ”€β”€ .github/
β”‚   └── copilot-instructions.md # AI agent guide
β”œβ”€β”€ README.md                   # This file
β”œβ”€β”€ QUICKSTART.md               # 5-minute setup
β”œβ”€β”€ RUN.md                      # Running instructions
β”œβ”€β”€ LICENSE                     # MIT License
└── .gitignore                  # Git ignore rules

πŸ› οΈ Tech Stack

Backend: Python 3.8+ with Flask, Scapy
Frontend: Vue.js 3, Vite, Axios
PCAP Processing: Scapy library
Deployment: Docker-ready (Dockerfile included)

πŸ“‹ Requirements

  • Python: 3.8 or higher
  • Node.js: 14.0 or higher
  • npm: 6.0 or higher
  • Git: for version control

πŸš€ Quick Start (5 Minutes)

1. Clone Repository

git clone https://github.com/yourusername/devtoolbox.git
cd devtoolbox

2. Setup Backend (Terminal 1)

python -m venv .venv

# Windows
.venv\Scripts\activate

# macOS/Linux
source .venv/bin/activate

cd backend
pip install -r requirements.txt
python app.py

βœ… Backend running at http://localhost:5000

3. Setup Frontend (Terminal 2)

cd frontend
npm install
npm run dev

βœ… Frontend running at http://localhost:8080

4. Open in Browser

Navigate to http://localhost:8080 πŸŽ‰

πŸ“š Usage Guide

PCAP Editor

  1. Navigate to PCAP Editor tab
  2. Upload a PCAP/PCAPNG file (drag & drop or click)
  3. View packets in the list
  4. Click packet to see details
  5. Modify network fields (MACs, IPs, ports, DNS, HTTP Host, TLS SNI)
  6. Download modified PCAP

PCAP Generator

  1. Go to PCAP Generator tab
  2. Select protocol (TCP, HTTP, UDP, DNS, TLS)
  3. Configure packet count and network settings
  4. Click "Generate PCAP"
  5. Open in Editor or Download

PCAP Merger

  1. Navigate to PCAP Merger tab
  2. Select 2+ PCAP files
  3. Optionally set output filename
  4. Click "Merge PCAPs"
  5. View merged result and download

Hex Viewer

  1. Go to Hex Viewer tab
  2. Upload any binary file
  3. View automatically detected format (text/JSON/XML/binary)
  4. Toggle between Text View and Hex View
  5. Search for patterns
  6. Export as needed

🐳 Docker Deployment

# Build image
docker build -t devtoolbox .

# Run container
docker run -p 5000:5000 -p 8080:8080 devtoolbox

πŸ”§ Troubleshooting

Port Already in Use

Frontend (change in frontend/vite.config.js):

export default {
  server: { port: 8081 }
}

Backend (change in backend/app.py):

if __name__ == '__main__':
    app.run(port=5001)

Module Not Found

# Backend
cd backend
pip install --upgrade pip
pip install -r requirements.txt --force-reinstall

# Frontend
cd frontend
rm -rf node_modules package-lock.json
npm install

Site Can't Be Reached

  • Verify both servers are running
  • Use correct URLs: http://localhost:8080 (not https)
  • Hard refresh: Ctrl+F5 (or Cmd+Shift+R on macOS)
  • Check firewall/antivirus settings

Large File Upload Issues

Edit backend/app.py:

MAX_FILE_SIZE = 500 * 1024 * 1024  # Increase as needed

πŸ“– Documentation

🀝 Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

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

πŸ‘¨β€πŸ’» Author

Built for data plane developers and software engineers who need efficient tools for packet analysis and binary file inspection.

πŸ™‹ Support

For issues, questions, or feature requests, please open an issue on GitHub.


Happy analyzing! πŸš€

About

Hybrid web-based PCAP editor, generator, merger, and hex viewer with complete TCP flow simulation

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages