Update-exploitdb script similar to update-milw0rm, but for the new exploit repository at offsec. Replace hxxp with http before using.
Code:
#!/bin/bash
# update-exploitdb script
# by nick <nick [-at-] executionflow.org>
archive_file='archive.tar.bz2'
archive_url="http://exploits.offensive-security.com/${archive_file}"
db_directory='exploitdb'
echo "Backing up old"
mv -vf ${archive_file} ${archive_file}.old
wget ${archive_url}
if [ ${?} -eq 0 ] && [ -e ${archive_file} ]; then
echo "Backing up old directory"
mv -vf ${db_directory} ${db_directory}.old
echo "Unarchiving to ${db_directory}"
mkdir ${db_directory}
cd ${db_directory} && tar jxf ../${archive_file}
if [ ${?} -eq 0 ]; then
echo "Removing ${archive_file}.old and ${db_directory}.old"
cd .. && rm -rf ${archive_file}.old ${db_directory}.old
fi
fi