From a5ae75f6fa6fbedcbdf0b428c73ff5c5b753c256 Mon Sep 17 00:00:00 2001 From: bst04 <75524846+brunoooost@users.noreply.github.com> Date: Wed, 30 Oct 2024 09:43:30 +0100 Subject: [PATCH 1/2] Create payload.txt --- .../Execution/CheckBattery-by_bst04/payload.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Windows/Execution/CheckBattery-by_bst04/payload.txt diff --git a/Windows/Execution/CheckBattery-by_bst04/payload.txt b/Windows/Execution/CheckBattery-by_bst04/payload.txt new file mode 100644 index 0000000..0a9125b --- /dev/null +++ b/Windows/Execution/CheckBattery-by_bst04/payload.txt @@ -0,0 +1,17 @@ +REM ======================================= +REM payload by bst04 +REM For Windows Devices +REM ======================================= + +DELAY 1000 +GUI r +DELAY 750 +STRING powershell powercfg /batteryreport +DELAY 750 +ENTER +DELAY 250 +GUI r +DELAY 850 +STRING powershell Start-Process "battery-report.html" +DELAY 750 +ENTER From 59bbc927b1182ccc5916ae5dbbc51ba1cd6ed060 Mon Sep 17 00:00:00 2001 From: bst04 Date: Mon, 11 Nov 2024 10:38:59 +0100 Subject: [PATCH 2/2] readme --- .../Execution/CheckBattery-by_bst04/readme.md | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Windows/Execution/CheckBattery-by_bst04/readme.md diff --git a/Windows/Execution/CheckBattery-by_bst04/readme.md b/Windows/Execution/CheckBattery-by_bst04/readme.md new file mode 100644 index 0000000..2fdc29f --- /dev/null +++ b/Windows/Execution/CheckBattery-by_bst04/readme.md @@ -0,0 +1,35 @@ +# 🔋 CheckBateryWin-FlipZero by bst04 + +## ℹī¸ Description + +This script, created by bst04, is designed to work on Windows devices. It generates a battery report using PowerShell and then opens the report in the default web browser. + +--- + +## Technical Explanation + +1. **Initialization**: + - `DELAY 1000`: Waits for 1 second to ensure the system is ready. + - `GUI r`: Simulates pressing "Windows" + "R" to open the Run dialog. + - `DELAY 750`: Waits for 0.75 seconds to ensure the Run dialog is open. + +2. **Generate Battery Report**: + - `STRING powershell powercfg /batteryreport`: Types a PowerShell command to generate a battery report. + - `DELAY 750`: Waits for 0.75 seconds to ensure the command is fully typed. + - `ENTER`: Executes the PowerShell command to generate the battery report. + +3. **Open Battery Report**: + - `DELAY 250`: Waits for 0.25 seconds to ensure the previous command is processed. + - `GUI r`: Simulates pressing "Windows" + "R" again to open the Run dialog. + - `DELAY 850`: Waits for 0.85 seconds to ensure the Run dialog is open. + - `STRING powershell Start-Process "battery-report.html"`: Types a PowerShell command to open the battery report in the default web browser. + - `DELAY 750`: Waits for 0.75 seconds. + - `ENTER`: Executes the PowerShell command to open the battery report. + +--- + +## Usage + +1. Copy the payload script to your DuckyScript-enabled device. +2. Ensure the device is connected to a Windows system. +3. Execute the payload to generate and open the battery report.