Created
June 12, 2021 03:37
-
-
Save tuantmb/6e7d63c9c676c982d24236188bb4ec54 to your computer and use it in GitHub Desktop.
CTF extract nested zip (zip in zip)
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 | |
function extract(){ | |
#unzip $1 -d ${1/.zip/} && eval $2 && cd ${1/.zip/} | |
unzip $1 && eval $2 | |
for zip in $(find . -maxdepth 1 -name "*.zip"); do | |
extract $zip 'rm $1' | |
done | |
} | |
extract 'flag.zip' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment