BadUsbDeveloperAndTester
Test app for Flipper Zero BadUsb
Install / Use
/learn @blod22/BadUsbDeveloperAndTesterREADME
BadUsbInterpreter
Introduction
The BadUsbInterpreter is a C# utility designed to simulate keyboard inputs programmatically. It processes command-like input lines to simulate keystrokes, key combinations, delays, and other keyboard interactions on a Windows system. This tool is particularly useful for scripting automated input sequences, such as those used in penetration testing scenarios where a BadUSB device might be involved.
Table of Contents
- Introduction
- Features
- Installation
- Usage
- Configuration
- Dependencies
- Examples
- Troubleshooting
- Contributors
- License
- Version limitation
Features
- Command-based Input Simulation: Execute commands like
STRING,DELAY,GUI,CTRL,SHIFT,ALT, and more to simulate keyboard actions. - Support for Delays: Set default or specific delays between commands for more controlled input simulation.
- Command Repetition: Repeat the last executed command a specified number of times using the
REPEATcommand. - Key Combinations: Simulate key combinations involving control keys like
CTRL,ALT,SHIFT, etc. - Customizable Input: Easily modify the script to add support for additional keys or commands.
Installation
To use the BadUsbInterpreter, follow these steps:
-
Clone the Repository:
git clone https://github.com/blod22/BadUsbDeveloperAndTester.git -
Build the Project:
Open the project in Visual Studio or use the .NET CLI to build:dotnet build -
Run the Application:
Execute the application with your script file as input.
Usage
You can use BadUsbInterpreter by running a script that contains lines of commands. Each command will be executed sequentially to simulate keyboard inputs.
Example Command Script:
DEFAULT_DELAY 100
STRING Hello, World!
ENTER
DELAY 500
CTRL C
REPEAT 2
Command Reference:
- DEFAULT_DELAY
<ms>: Sets the default delay between commands. - STRING
<text>: Types the provided text. - DELAY
<ms>: Pauses for the specified number of milliseconds. - GUI
<key>: Simulates the Windows key press with the specified key. - CTRL
<key>: Simulates a CTRL +<key>combination. - SHIFT
<key>: Simulates a SHIFT +<key>combination. - ALT
<key>: Simulates an ALT +<key>combination. - REPEAT
<count>: Repeats the last command<count>times.
Configuration
You can configure the interpreter by modifying the default delay and other parameters directly in the source code. The defaultDelay variable controls the pause between commands, and other configurations can be adjusted according to your needs.
Dependencies
The project depends on the following libraries:
- WindowsInput: A library for simulating keyboard and mouse input in .NET applications.
Examples
Example 1: Simple Text Input
STRING Hello, this is a test.
ENTER
Example 2: Using Delays and Repeats
DEFAULT_DELAY 200
STRING First line.
ENTER
REPEAT 3
STRING This will repeat 3 times.
ENTER
Troubleshooting
- Invalid Command: Ensure that each command is spelled correctly and matches the expected syntax.
- Unhandled Key: If the script attempts to use a key that is not supported, you'll need to add support for that key in the source code or modify the script.
Contributors
- blod22 - Initial work
License
This project is licensed under the MIT License - see the LICENSE file for details.
Version Limitation
Current version doesnćt support ALTCHAR, ALTSTRING and ALTCODE commands
Related Skills
node-connect
350.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
350.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
350.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
