Skip to content

Instantly share code, notes, and snippets.

@sourcerebels
Created February 20, 2012 20:14
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save sourcerebels/1871137 to your computer and use it in GitHub Desktop.
Save sourcerebels/1871137 to your computer and use it in GitHub Desktop.
Download all Phrack Magazine Issues
#!/bin/sh
for i in {1..67}
do
FILE="phrack${i}.tar.gz"
wget http://phrack.org/archives/tgz/${FILE}
tar xvzf ${FILE}
rm ${FILE}
done
@jay206
Copy link

jay206 commented Dec 3, 2015

Simple but helpful script.. thanks man

@ivipuls
Copy link

ivipuls commented Aug 31, 2016

for i in 'seq 1 69` worked for me

@iamahuman
Copy link

iamahuman commented Oct 17, 2016

That sequence expression is Bash-specific, so you should rather use "#!/bin/bash" as the shebang.
Or alternatively, you could use this as well:

#!/bin/bash
i=1; while wget -O- http://phrack.org/archives/tgz/phrack$((i++)).tar.gz | tar zvx; do :; done

Also, there have been two new releases since then. Check them out!

@shekkbuilder
Copy link

shekkbuilder commented Feb 11, 2017

I updated it to get the latest issue number and check if directory exists before making it.

#!/bin/bash
LATEST=$(lynx --source  http://phrack.org/archives/tgz/|grep -oP '(?<=phrack)[0-9]{2}'|sort -n|tail -1)  
for (( i=1; i<=LATEST; i++ ))  
do  
        FILE="phrack${i}.tar.gz"  
        wget http://phrack.org/archives/tgz/${FILE}  
        if [ ! -d phrack${i} ]; then  
                mkdir -p phrack${i};  
        fi  
        tar xvzf ${FILE} -C ./phrack${i}/  
        rm ${FILE}  
done

@dvdesolve
Copy link

No need to remember issue numbers at all:

wget -r -nH --no-parent --reject="index.html*" -e robots=off http://www.phrack.org/archives/tgz/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment