Skip to content

Instantly share code, notes, and snippets.

@tuantmb
Created June 12, 2021 03:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuantmb/6e7d63c9c676c982d24236188bb4ec54 to your computer and use it in GitHub Desktop.
Save tuantmb/6e7d63c9c676c982d24236188bb4ec54 to your computer and use it in GitHub Desktop.
CTF extract nested zip (zip in zip)
#!/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