This allows me to rename a "inject*.bin" to "inject.bin" for Hak5 Rubber Ducky
This repository contains a bash script designed to manage inject*.bin files within a specified directory. The script handles the renaming and deletion of these files following specific logic.
Clone the repository to your local machine:
git clone https://github.com/yourusername/your-repo-name.git
cd your-repo-nameEnsure you have the necessary permissions to execute scripts:
chmod +x script.shRun the script in the directory containing the inject*.bin files:
./script.shThe script operates with the following logic:
- Directory Navigation: It navigates to the specified directory where the
inject*.binfiles are located. - File Counting: It counts and checks the presence of files matching the pattern
inject*.bin. - Existence Check: It specifically checks if
inject.binexists in the directory. - Conditional Actions:
- If only
inject.binexists, no action is taken. - If there are multiple
inject*.binfiles:- Deletes
inject.binif it exists. - Renames one of the
inject*.binfiles toinject.bin.
- Deletes
- If no
inject*.binfiles are found, a message is displayed indicating no files to rename.
- If only
We welcome contributions! Please fork the repository and submit a pull request with proposed changes.
This project is licensed under the MIT License - see the LICENSE file for details.