Created
February 20, 2012 20:14
-
-
Save sourcerebels/1871137 to your computer and use it in GitHub Desktop.
Download all Phrack Magazine Issues
This file contains hidden or 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/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 |
I slightly modified @shekkbuilder script to concatenate the issues into single txt files and then convert those into PDF files. Nice if you have something like a reader tablet and you want to read them on it like what I am doing.
(P.S I am using libreoffice since I already had it installed but I believe there are countless other utilities for conversion out there)
#!/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
for (( i=1; i<=LATEST; i++ ))
do
cat ./phrack${i}/*.txt >> ./phrack${i}/phrack${i}.txt
libreoffice --convert-to "pdf" ./phrack${i}/phrack${i}.txt
done
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No need to remember issue numbers at all: