A modern web interface for managing and interacting with USBArmyKnife devices. This is a client-only application designed to be hosted on GitHub Pages.
- Device Management Dashboard - Monitor device status, capabilities, and system information
- File Management - Upload, download, and delete files on the device SD card
- Script Execution - Run DuckyScript files with helpful command reference
- Display Control - Show images and text on the device TFT display
- LED Control - Control RGB LED colors
- Agent Management - Execute commands via installed agent
- Real-time Logs - View device logs and error messages
- Swagger API Documentation - Complete API reference at
/docs - Configurable Device URL - Set and save your device IP address
- Node.js 18+ and pnpm
pnpm install-
Configure proxy for CORS (recommended):
cp .env.example .env
Edit
.envand set your device URL:VITE_USE_PROXY=true VITE_PROXY_TARGET=http://192.168.1.27:8080 -
Start development server:
pnpm dev
The app will be available at http://localhost:5173
The device API doesn't support CORS, which causes errors when developing locally. We provide two solutions:
Set up a proxy in development to avoid CORS issues:
- Copy
.env.exampleto.env - Set
VITE_USE_PROXY=true - Set
VITE_PROXY_TARGETto your device URL (e.g.,http://http://192.168.1.27:8080) - Restart the dev server
With proxy enabled, all API calls are routed through the Vite dev server:
Browser -> http://localhost:5173/api-proxy/data.json
-> Vite Proxy
-> http://http://192.168.1.27:8080/data.json
If you don't enable the proxy, the app makes direct calls to the device URL. You'll see CORS errors in the console, but the requests may still work. The device responds successfully even though the browser blocks the response.
To ignore CORS during development, you can:
- Use a CORS browser extension
- Use the proxy (Option 1)
- Access the app from the device's own web interface
Create a .env file in the project root (see .env.example):
| Variable | Default | Description |
|---|---|---|
VITE_USE_PROXY |
false |
Enable proxy in development to avoid CORS |
VITE_PROXY_PREFIX |
/api-proxy |
URL prefix for proxy routes |
VITE_PROXY_TARGET |
http://http://192.168.1.27:8080 |
Device URL to proxy to |
pnpm build- Build the project:
pnpm build - Push the
distfolder contents to thegh-pagesbranch - Enable GitHub Pages in repository settings pointing to
gh-pagesbranch
Or use GitHub Actions for automatic deployment (see .github/workflows/deploy.yml)
- Configure Device URL: Click the settings icon in the top right and enter your device URL (default:
http://4.3.2.1:8080) - View Device Status: The dashboard shows real-time device information
- Manage Files: Upload, download, or delete files from the device SD card
- Run Scripts: Execute DuckyScript files or individual commands
- Control Display: Show images or text on the device screen
- View API Docs: Navigate to
/docsfor complete API documentation
The device can be accessed in two modes:
- AP Mode: Device creates its own WiFi network (default:
http://4.3.2.1:8080) - Station Mode: Device connects to your WiFi network (configure IP in settings)
CORS Errors in Development:
- Enable the proxy by setting
VITE_USE_PROXY=truein.env - Make sure
VITE_PROXY_TARGETmatches your device URL - Restart the dev server after changing
.env
Connection Test Fails:
- Verify the device is powered on and connected to your network
- Check that the device URL is correct in Settings
- Try accessing the device URL directly in your browser
- Ensure no firewall is blocking the connection
Proxy Not Working:
- Check that
.envfile exists in the project root - Verify
VITE_USE_PROXY=true(not"true"with quotes) - Restart the dev server - env changes require a restart
- Check console for proxy logs:
[Proxy] GET /data.json -> ...
Full API documentation is available at /docs when running the application, or see swagger.yaml for the OpenAPI specification.
- React 18 + TypeScript
- Vite
- React Router
- Tailwind CSS
- Swagger UI
See LICENSE file for details.