mirror of
https://github.com/UberGuidoZ/Flipper.git
synced 2024-12-22 14:30:21 +00:00
47 lines
884 B
Plaintext
47 lines
884 B
Plaintext
REM Provides a utility to display/Say useful information on the target system
|
|
REM The current date, time, and battery percentage
|
|
|
|
REM Title: AudioInfo.ducky
|
|
REM Author: Narsty
|
|
REM Target: MacOS
|
|
REM Version: 1.0
|
|
REM Category: GOODUSB
|
|
|
|
|
|
ID 05ac:021e Apple:Keyboard
|
|
DELAY 2000
|
|
GUI SPACE
|
|
DELAY 500
|
|
STRING terminal
|
|
DELAY 500
|
|
ENTER
|
|
DELAY 500
|
|
STRING echo "USB Script Utility"
|
|
ENTER
|
|
DELAY 500
|
|
STRING echo "-------------------"
|
|
ENTER
|
|
DELAY 500
|
|
STRING echo "Current Date:"
|
|
ENTER
|
|
DELAY 500
|
|
STRING date "+%Y-%m-%d" | say
|
|
ENTER
|
|
DELAY 500
|
|
STRING echo "Current Time:"
|
|
ENTER
|
|
DELAY 500
|
|
STRING date "+%H:%M:%S" | say
|
|
ENTER
|
|
DELAY 500
|
|
STRING echo "Battery Percentage:"
|
|
ENTER
|
|
DELAY 500
|
|
STRING ioreg -l | awk '$3~/Capacity/{c[$3]=$5}END{OFMT="%.2f%%";max=c["\"MaxCapacity\""];print(max>0?100*c["\"CurrentCapacity\""]/max:"?")}' | say
|
|
ENTER
|
|
DELAY 500
|
|
STRING echo "-------------------"
|
|
ENTER
|
|
DELAY 2000
|
|
|