Created
April 26, 2020 04:51
-
-
Save 196Ikuchil/ba6a431fc3ab93992d42a5b6819bf66c to your computer and use it in GitHub Desktop.
houseplantctf recursive zip extracting tar gz zip v1 v2 with bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
name=$1 | |
gzip -cd $name > out | |
./selector.sh out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
123456 | |
password | |
12345678 | |
qwerty | |
123456789 | |
12345 | |
1234 | |
111111 | |
1234567 | |
dragon | |
123123 | |
baseball | |
abc123 | |
football | |
monkey | |
letmein | |
696969 | |
shadow | |
master | |
666666 | |
qwertyuiop | |
123321 | |
mustang | |
1234567890 | |
michael | |
654321 | |
pussy | |
superman | |
1qaz2wsx | |
7777777 | |
fuckyou | |
121212 | |
000000 | |
qazwsx | |
123qwe | |
killer | |
trustno1 | |
jordan | |
jennifer | |
zxcvbnm | |
asdfgh | |
hunter | |
buster | |
soccer | |
harley | |
batman | |
andrew | |
tigger | |
sunshine | |
iloveyou | |
fuckme | |
2000 | |
charlie | |
robert | |
thomas | |
hockey | |
ranger | |
daniel | |
starwars | |
klaster | |
112233 | |
george | |
asshole | |
computer | |
michelle | |
jessica | |
pepper | |
1111 | |
zxcvbn | |
555555 | |
11111111 | |
131313 | |
freedom | |
777777 | |
pass | |
fuck | |
maggie | |
159753 | |
aaaaaa | |
ginger | |
princess | |
joshua | |
cheese | |
amanda | |
summer | |
love | |
ashley | |
6969 | |
nicole | |
chelsea | |
biteme | |
matthew | |
access | |
yankees | |
987654321 | |
dallas | |
austin | |
thunder | |
taylor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
name=$1 | |
echo "challenge ${name}" | |
if [[ ${name} =~ ^.*gz$ ]]; then | |
./gzipper.sh ${name} | |
elif [[ ${name} =~ ^.*tar$ ]]; then | |
./tapper.sh ${name} | |
elif [[ ${name} =~ ^.*zip$ || ${name} =~ ^.*Zip$ ]]; then | |
./zipper.sh ${name} | |
else | |
echo ${name}false | |
read aa <<< $(awk -F' ' '{print $2}' <<< `file out`) | |
if [[ ${aa} =~ ^gzip$ ]]; then | |
mv out out.gz | |
echo "gzip" | |
./gzipper.sh out.gz | |
elif [[ ${aa} =~ ^Zip$ || ${aa} =~ ^*zip$ ]]; then | |
./zipper.sh ${name} | |
elif [[ ${aa} =~ ^POSIX$ ]]; then | |
./tapper.sh ${name} | |
else | |
echo "${aa}sorry" | |
fi | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
name=$1 | |
tar -xvf $name | awk -F' ' '{print $1}' | xargs -I@ ./selector.sh @ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
name=$1 | |
echo zipname$name | |
file $name | grep -F v2.0 | |
if [ $? == 0 ];then | |
fcrackzip -v -u -D -p ./list.txt $name | grep pw | awk -F' ' '{print $5}' | xargs -I@ unzip -P @ $name | grep inflating | awk -F' ' '{print $2}' | xargs -I@ ./selector.sh @ | |
else | |
fcrackzip -v -u -D -p ./list.txt $name | grep pw | awk -F' ' '{print $5}' | xargs -I@ unzip -P @ $name | grep extracting | awk -F' ' '{print $2}' | xargs -I@ ./selector.sh @ | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment