bah cara valeu mesmo estava precisando disso... otimo script
Fiz este script para manter os exploits atualizados.
Este, checa o site http://www.exploit-db.com e verifica qual foi a última atualização do arquivo:
archive.tar.bz2, e gera um hash md5.
Para maiores informações sobre hash,
Você pode ler o excelente artigo publicado pelo meu amigo @Bhior.
http://remote-execution.blogspot.com...ue-e-hash.html
Vamos ao script ...
Escolha o editor de sua preferência e crie o arquivo update.sh dentro da pasta /pentest/exploits/exploitdb
O arquivo deve ter o seguinte conteúdo:Code:# cd /pentest/exploits/exploitdb # vim update.sh
Salve o arquivo, adicione permissão de execução e execute o scriptCode:#!/bin/bash # spawn # Exploit-db script update - 04/05/2011 - 13:50 update() { local=$(cat revision) remote=$(curl --silent --head http://www.exploit-db.com/archive.tar.bz2 | grep "Last-Modified" | md5sum | cut -f1 -d' ') echo "Checking http://www.exploit-db.com for newest version" if [ "$local" == "$remote" ]; then echo "No updates available" else echo "New update available, Downloading . . ." ; mv archive.tar.bz2 archive-old.tar.bz2 ; wget http://www.exploit-db.com/archive.tar.bz2; tar jxf archive.tar.bz2 ; echo "$remote" > revision echo "Exploits are updated" exit 0 fi } if [ -f "revision" ] ; then update else touch revision ; update fi exit 0
Lembrando que este script deve ser executado dentro da pasta exploitdb. Sinta-se a vontade para melhorá-loCode:# chmod +x update.sh # ./update.sh
Regards,
spawn
Last edited by spawn; 04-05-2011 at 04:56 PM.
"If you aim the gun at your foot and pull the trigger, it's
UNIX's job to ensure reliable delivery of the bullet to
where you aimed the gun (in this case, Mr. Foot)."
bah cara valeu mesmo estava precisando disso... otimo script
Parabéns!
Comentei aqui -> http://www.backtrack-linux.org/forum...db-update.html
Onde vi seu código e do firebits, o seu e mais complexo
Abraços :*
Olá caro @Bhior,
É bem simples o meu código, o que ele faz é verificar no site a última atualizacão do arquivo "archive.tar.bz2" não fazendo o download DESNECESSÁRIO.
Grande abraço
![]()
"If you aim the gun at your foot and pull the trigger, it's
UNIX's job to ensure reliable delivery of the bullet to
where you aimed the gun (in this case, Mr. Foot)."