Bluetooth2 (#477)

* Bluetooth2

Bluetooth2 is a program that can use multiple triggers instead of waiting for just one and run different things depending on that trigger. Anyone willing to update it would be appreciated as it probably looks... not great.

* Update payload.txt

* Update payload.txt

* Update README.md
This commit is contained in:
JustaProgrammer9
2021-12-16 12:48:02 -05:00
committed by GitHub
parent 54505507b9
commit 72d424232a
2 changed files with 99 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
# BlueTooth2
BlueTooth2 is a program that scans for two bluetooth devices and depending on what one it finds it runs whatever.
## What it Does and How its Different
Unlike the standard WAIT_FOR_PRESENT that scans for one device and doesnt allow code after it to run until found.
This will do a scan and then check for two different devices names allowing for multiple remote triggers that
can do different things.
## Note
I imagine your looking at this code and wondering what idiot wrote it and I would very cool if you would
make it more efficient or even pretty. It worked when I tested it (I use BLE Tool)
## LED
| COLOR | DESCRIPTION |
|---------|-------------|
| White | Scan |
| Yellow | Checking |
| Green | Attack1 |
| Blue | Attack2 |

View File

@@ -0,0 +1,76 @@
#!/bin/bash
#
# Title: BlueTooth2
# Description: multiple remote triggers
# Author: JustaProgrammer9
# Category: General
# Target: Windows
# Attackmodes: HID
# Suggestion: Use BLE Tool if triggers take to long
#
#--// Function \\--#
WAIT_FOR_BLUETOOTH() {
stty -F /dev/ttyS1 speed 115200 cs8 -cstopb -parenb -echo -ixon -icanon -opost
stty -F /dev/ttyS1 speed 115200 cs8 -cstopb -parenb -echo -ixon -icanon -opost
sleep 1
echo -n -e "AT+ROLE=2" > /dev/ttyS1
echo -n -e "AT+RESET" > /dev/ttyS1
timeout 5s cat /dev/ttyS1 > /tmp/bt_observation
}
#------------------#
#--// Setup/Config \\--#
ATTACKMODE HID
device="notepad"
otherdevice="attack"
#----------------------#
#--// Check for devices \\--#
while true; do
LED W
WAIT_FOR_BLUETOOTH
LED Y
if grep -qao $device /tmp/bt_observation; then
if1="true"
break
sleep 1
elif grep -qao $otherdevice /tmp/bt_observation; then
if2="true"
break
sleep 1
#add more if's for more bluetooth devices to look for
fi
done
#---------------------------#
#--// Your attacks \\--#
if [ $if1 = "true" ]; then
LED G
Q GUI r
Q DELAY 100
Q STRING "notepad"
Q ENTER
Q DELAY 200
Q STRING "Hak5 rules"
Q ENTER
elif [ $if2 = "true" ]; then
LED B
# do something cool here
else
LED R
fi