#!/bin/sh # # By Kris Katterjohn 11/19/2006 # # Download newest files from Packet Storm # # If the file all ready exists in the destination directory, the file # isn't downloaded again. # # Useful as a cron job # # $DESTDIR is the destination directory # $NUMFILES must (currently) be 20, 50, or 100 DESTDIR="." NUMFILES=20 echo .:Downloading newest files from Packet Storm:. wget -q -O - http://packetstormsecurity.org/whatsnew$NUMFILES.xml | awk ' // { inlist = 1 } /.*<\/link>/ && inlist { gsub(/<\/?link>/, "") print }' | wget -P $DESTDIR -q -nc -i -