Script para softwares de rede

Publicado por Mauricio Paim (ķltima atualizaÁ„o em 11/07/2018)

[ Hits: 433 ]

Homepage: https://www.facebook.com/mauricio.paim.58

Download 6850.




Esse é meu primeiro Bash script, espero que gostem.

Softwares abordados: IPTraf, NMAP, NSLookUP, Nikto, Golismero, MasScan

  



Esconder cůdigo-fonte

#!/bin/bash
#################################
#
# Autor: Maurício Paim - paim.mauricio@gmail.com
# Versão: 1.0
# Data: 29/05/2018
# Script Rede
# Ao usar o script você assume
# TODA a responsabilidade por seu uso
#
##################################
Principal ()
{
†††clear
†††echo
†††echo†††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† 
††††echo
††††echo "††††††___†††††††† ___†††††††††††††††††††††† ___††††††††††††††††††††___†††††††††† ___†††††††††† ___†††††††††††††††††††††† ___††††††††††††††††"
††††echo "†††† /††/\†††††† /††/\††††††††___††††††††††/__/\††††††††††††††††††/††/\†††††††† /††/\†††††††† /††/\††††††††___††††††††††/††/\††††††††___††††"
††††echo "††††/††/::\†††† /††/::\††††††/††/\††††††††|††|::\††††††††††††††††/††/:/_†††††† /††/:/††††††††/††/::\††††††/††/\††††††††/††/::\††††††/††/\†† "
††††echo "†† /††/:/\:\†† /††/:/\:\††††/††/:/††††††††|††|:|:\††††††††††††††/††/:/ /\†††† /††/:/††††††††/††/:/\:\††††/††/:/†††††† /††/:/\:\††††/††/:/†† "
††††echo "††/††/:/~/:/††/††/:/~/::\††/__/::\††††††__|__|:|\:\††††††††††††/††/:/ /::\†† /††/:/††___†† /††/:/~/:/†† /__/::\††††††/††/:/~/:/†† /††/:/††††"
††††echo " /__/:/ /:/††/__/:/ /:/\:\ \__\/\:\__††/__/::::| \:\††††††††††/__/:/ /:/\:\ /__/:/††/††/\ /__/:/ /:/___ \__\/\:\__††/__/:/ /:/†† /††/::\††††"
††††echo " \††\:\/:/†† \††\:\/:/__\/††††\††\:\/\ \††\:\~~\__\/††††††††††\††\:\/:/~/:/ \††\:\ /††/:/ \††\:\/:::::/††††\††\:\/\ \††\:\/:/†† /__/:/\:\†† "
††††echo "††\††\::/†††† \††\::/††††††††††\__\::/††\††\:\†††††††††††††††† \††\::/ /:/†† \††\:\††/:/†† \††\::/~~~~††††††\__\::/††\††\::/††††\__\/††\:\††"
††††echo "†† \††\:\††††††\††\:\††††††††††/__/:/††††\††\:\†††††††††††††††† \__\/ /:/†††† \††\:\/:/†††† \††\:\††††††††††/__/:/††††\††\:\†††††††† \††\:\ "
††††echo "††††\††\:\††††††\††\:\†††††††† \__\/††††††\††\:\††††††††††††††††††/__/:/†††††† \††\::/†††††† \††\:\†††††††† \__\/††††††\††\:\†††††††† \__\/ "
††††echo "†††† \__\/†††††† \__\/†††††††††††††††††††† \__\/††††††††††††††††††\__\/†††††††† \__\/†††††††† \__\/†††††††††††††††††††† \__\/†††††††††††††† "
†††echo
†††echo
†††echo
†††echo
†††echo "-----------------------------------------------------"
†††echo "††††††1 - IPTraf"
†††echo "††††††2 - NMAP"
†††echo "††††††3 - NSLookUP"
†††echo "††††††4 - Nikto"
†††echo "††††††5 - Golismero"
†††echo "††††††6 - MasScan"
†††echo "††††††7 - Softwares"
†††echo "††††††8 - Sair"
†††echo "-----------------------------------------------------"
†††echo -n "Escolha uma das opções: "
†††read OPCAO
†††case $OPCAO in
††††††1 ) IPTraf;;
††††††2 ) NMAP;;
††††††3 ) NSLookUP;;
††††††4 ) Nikto;;
††††††5 ) Golismero;;
††††††6 ) MasScan;;
††††††7 ) Software;;
††††††8 ) echo; echo; echo ".........Bye Bye........."; sleep 2; clear; exit 0;;
††††††* ) echo; echo; echo "Opção inválida"; sleep 3; Principal;;
†††esac
}††††††††††††††††††
#†† 1
IPTraf ()
{†††clear†††
†††echo "------------------------------------------ "
†††echo "Escolha a placa de rede"
†††echo "------------------------------------------ "
†††echo
†††echo
†††echo "------------------------------------------ "
†††echo
†††ip addr show
†††echo
†††echo "------------------------------------------ "
†††echo
†††echo "------------------------------------------"
†††echo "1 - Placa nº 1 - Com log"
†††echo "2 - Placa nº 2 - Com log"
†††echo "3 - Placa nº 1"
†††echo "4 - Placa nº 2"
†††echo "5 - Mostrar placas de redes"
†††echo "6 - Menu NMAP"
†††echo "7 - Menu Principal"
†††echo "------------------------------------------ "
†††echo
†††echo "Escolha uma Opção: "
†††read PLACA
†††echo
†††case $PLACA in
††††††1 ) clear
††††††††††echo
††††††††††echo "Digite um nome para o arquivo de log: "
††††††††††read LOG;
††††††††††echo
††††††††††touch $HOME/$LOG.log;
††††††††††PLACA1=$(ip addr show | grep '1: ' | cut -d : -f2);
†††††††††echo
†††††††††echo "------------------------------------------ "
†††††††††echo "Placa escolida foi :"$PLACA1;
†††††††††echo "------------------------------------------ "
†††††††††echo
†††††††††echo "------------------------------------------ "
†††††††††echo "Criando arquivo de log....."
†††††††††echo "------------------------------------------ "
†††††††††echo
†††††††††sudo iptraf-ng -i $PLACA1 -L $HOME/$LOG.log;
†††††††††echo
†††††††††echo "------------------------------------------ "
†††††††††echo "Arquivo de log criado com sucesso....."
†††††††††echo "------------------------------------------ "
†††††††††echo
†††††††††echo "------------------------------------------ "
†††††††††echo "Deseja ver o arquivo de log?"
†††††††††echo "†† Digite s ou n"
†††††††††echo "------------------------------------------ "
†††††††††read RESP
†††††††††while [ "$RESP" != "s" -a "$RESP" != "n" ]; do
†††††††††††††††echo††††††
††††††††† †††echo "Opção inválida. Digite s ou n"
††††††††† †††read RESP
††††††††† †††done
††††††††† †††if [ "$RESP" = "s" ]; then
††††††††† †††††††sudo cat $HOME/$LOG.log |less
††††††††††††††††echo
††††††††††††††††echo†††††††††
††††††††††††††††echo "Aperte o ENTER pra continuar"
†††††††††††††††††read
†††††††††††††††††IPTraf;
†††††††††††††fi
†††††††††††††if [ "$RESP" = "n" ]; then
††††††††††††††††††††echo†††††††††
††††††††††††††††††††echo "Voltando para o menu do IPTraf"
††††††††††††††††echo
††††††††††††††††echo "Aperte o ENTER pra continuar"
†††††††††††††††††read
†††††††††††††††††IPTraf;
†††††††††††††fi;;
††††††2 ) clear
††††††††††echo
††††††††††echo "Digite um nome para o arquivo de log: "
††††††††††read LOG;
††††††††††touch $HOME/$LOG.log;
††††††††††PLACA2=$(ip addr show | grep '2: ' | cut -d : -f2);
†††††††††echo
†††††††††echo "------------------------------------------ "
†††††††††echo "Placa escolida foi :"$PLACA2;
†††††††††echo "------------------------------------------ "
†††††††††echo
†††††††††echo "------------------------------------------ "
†††††††††echo "Criando arquivo de log....."
†††††††††echo "------------------------------------------ "
†††††††††echo
†††††††††sudo iptraf-ng -i $PLACA2 -L $HOME/$LOG.log;
†††††††††echo
†††††††††echo "------------------------------------------ "
†††††††††echo "Arquivo de log criado com sucesso....."
†††††††††echo "------------------------------------------ "
†††††††††echo
†††††††††echo "Deseja ver o arquivo de log?"
†††††††††echo "†† Digite S ou N"
†††††††††while [ "$RESP" != "s" -a "$RESP" != "n" ]; do
†††††††††††††††echo††††††
††††††††† †††echo "Opção inválida. Digite s ou n"
††††††††† †††read RESP
††††††††† †††done
††††††††† †††if [ "$RESP" = "s" ]; then
††††††††† †††††††sudo cat $HOME/$LOG.log |less
††††††††††††††††echo
††††††††††††††††echo†††††††††
††††††††††††††††echo "Aperte o ENTER pra continuar"
†††††††††††††††††read
†††††††††††††††††IPTraf;
†††††††††††††fi
†††††††††††††if [ "$RESP" = "n" ]; then
††††††††††††††††††††echo†††††††††
††††††††††††††††††††echo "Voltando para o menu do IPTraf"
††††††††††††††††echo
††††††††††††††††echo "Aperte o ENTER pra continuar"
†††††††††††††††††read
†††††††††††††††††IPTraf;
†††††††††††††fi;;
†††††††††
††††††3 ) clear
††††††††††echo
††††††††††PLACA1=$(ip addr show | grep '1: ' | cut -d : -f2);
†††††††††echo "------------------------------------------ "
†††††††††echo
†††††††††echo "Placa escolida foi :"$PLACA1;
†††††††††echo
†††††††††echo "------------------------------------------ "
†††††††††echo
†††††††††sudo iptraf-ng -i $PLACA1;
†††††††††echo
†††††††††echo "Aperte o ENTER pra continuar";
†††††††††††read 
†††††††††††IPTraf;;
††††††4 ) clear
††††††††††echo
††††††††††PLACA2=$(ip addr show | grep '2: ' | cut -d : -f2);
†††††††††echo
†††††††††echo "------------------------------------------ "
†††††††††echo
†††††††††echo "Placa escolida foi :"$PLACA2;
†††††††††echo
†††††††††echo "------------------------------------------ "
†††††††††echo
†††††††††sudo iptraf-ng -i $PLACA2;
†††††††††sleep 3; IPTraf;;
††††††5 ) clear
††††††††††ip addr show;
††††††††††echo "Aperte o ENTER pra continuar";
†††††††††††read 
†††††††††††IPTraf;;
††††††6 ) NMAP;;
††††††7 ) Principal;;
††††††* ) echo "Opção inválida"; sleep 3; IPTraf;;
†††esac
}
#†† 2
NMAP ()
{
†††clear
†††echo "------------------------------------------- "
†††echo "††††††††††††††††††††NMAP††††††††††††††††††††"
†††echo "------------------------------------------- "
†††echo
†††echo
†††echo "------------------------------------------ "
†††echo "1 - IPV 4 - Padrão"
†††echo "2 - IPV 4 - Completo"
†††echo "3 - IPV 4 - Verifica se host está UP"
†††echo "4 - Ler arquivo de coleta"
†††echo "5 - Menu Principal"
†††echo "------------------------------------------ "
†††echo
†††read NUM
†††case $NUM in
††††††1 ) clear
††††††††††echo
††††††††††echo "------------------------------------------ "
††††††††††echo
††††††††††echo "†††††††††† Padrão†††††††††††††† "
††††††††††echo "Digite o IP ou site de destino: "
††††††††††echo
††††††††††echo "------------------------------------------ "
††††††††††echo
†††††††††read DESTINO;
†††††††††echo
†††††††††if [ ! -d "$HOME/nmap_LOG" ]; then
††††††††††††††††echo "------------------------------------------ "
††††††††††††††††echo " Diretório não existe e será criado††††††††"
††††††††††††††††echo "------------------------------------------ "
††††††††††††††††echo
††††††††††††††††echo "------------------------------------------ "
††††††††††††††††echo " Criando diretório†††††††††††††††††††††††† "
††††††††††††††††echo "------------------------------------------ "
††††††††††††††††echo
†††††††††††††mkdir -p $HOME/nmap_LOG
†††††††††fi;
††††††††††††echo
††††††††††††echo "------------------------------------------ "
†††††††††echo "O arquivo de coleta é: "$HOME/nmap_LOG/$(date +%d-%m-%Y)_padrao.txt;
†††††††††echo "------------------------------------------ "
†††††††††echo
†††††††††sudo nmap -v -R -T4 $DESTINO >> $HOME/nmap_LOG/$(date +%d-%m-%Y)_padrao.txt;
†††††††††echo
†††††††††echo "Aperte o ENTER pra continuar";
†††††††††echo
†††††††††††read 
†††††††††††NMAP;;
††††††2 ) clear
††††††††††echo
††††††††††echo "------------------------------------------ "
††††††††††echo
††††††††††echo "††††††††††Completo"
††††††††††echo "Digite o IP ou site de destino: "
††††††††††echo
††††††††††echo "------------------------------------------ "
††††††††††echo
†††††††††read DESTINO;
†††††††††echo
†††††††††if [ ! -d "$HOME/nmap_LOG" ]; then
††††††††††††††††echo "------------------------------------------ "
††††††††††††††††echo " Diretório não existe e será criado††††††††"
††††††††††††††††echo "------------------------------------------ "
††††††††††††††††echo
††††††††††††††††echo "------------------------------------------ "
††††††††††††††††echo " Criando diretório†††††††††††††††††††††††† "
††††††††††††††††echo "------------------------------------------ "
††††††††††††††††echo
†††††††††††††mkdir -p $HOME/nmap_LOG
†††††††††††††echo
†††††††††fi;
††††††††††††echo
†††††††††echo "O arquivo de coleta é: "$HOME/nmap_LOG/$(date +%d-%m-%Y)_completo.txt;
†††††††††echo
†††††††††sudo nmap -A -R -T4 $DESTINO >> $HOME/nmap_LOG/$(date +%d-%m-%Y)_completo.txt;
†††††††††echo
†††††††††echo "Aperte o ENTER pra continuar";
†††††††††echo
†††††††††††read
†††††††††††NMAP;;
††††††3 )†††clear
††††††††††echo
††††††††††echo "------------------------------------------ "
††††††††††echo
††††††††††echo "††††††††††††HOST UP "
††††††††††echo "Digite o IP ou site de destino: ";
††††††††††echo
††††††††††echo "------------------------------------------ "
††††††††††echo
†††††††††read DESTINO;
†††††††††echo
†††††††††if [ ! -d "$HOME/nmap_LOG" ]; then
††††††††††††††††echo "------------------------------------------ "
††††††††††††††††echo " Diretório não existe e será criado††††††††"
††††††††††††††††echo "------------------------------------------ "
††††††††††††††††echo
††††††††††††††††echo "------------------------------------------ "
††††††††††††††††echo " Criando diretório†††††††††††††††††††††††† "
††††††††††††††††echo "------------------------------------------ "
††††††††††††††††echo
†††††††††††††mkdir -p $HOME/nmap_LOG
†††††††††fi;
†††††††††echo
†††††††††echo "O arquivo de coleta é: "$HOME/nmap_LOG/$(date +%d-%m-%Y)_UP.txt;
†††††††††echo
†††††††††sudo nmap -sP -R -T4 $DESTINO >> $HOME/nmap_LOG/$(date +%d-%m-%Y)_UP.txt;
†††††††††echo
†††††††††echo "Aperte o ENTER pra continuar";
†††††††††echo
†††††††††††read
†††††††††††NMAP;;
††††††††4 ) clear
††††††††††echo
††††††††††echo "------------------------------------------ "
††††††††††echo
††††††††††echo " Ler arquivos coletados"
††††††††††echo
††††††††††echo "------------------------------------------ "
††††††††††echo
††††††††††echo "------------------------------------------ "
††††††††††echo " 1 - Padrão"
††††††††††echo " 2 - Completo"
††††††††††echo " 3 - Host UP"
††††††††††echo " 4 - Menu NMAP"
††††††††††echo "------------------------------------------ "
††††††††††echo
††††††††††read NUM
††††††††††if [ $NUM -eq "1" ]; then
†††††††††††††† echo
†††††††††††† echo "------------------------------------------ "
†††††††††††† echo "†††††††††††††††††† Padrão††††††††††††††††††"
†††††††††††† echo "------------------------------------------ "
†††††††††††† echo
††††††††††† cat $HOME/nmap_LOG/$(date +%d-%m-%Y)_padrao.txt
†††††††††††† echo
††††††††††† echo
††††††††††† echo "------------------------------------------ "†††††††††
††††††††††† echo "Aperte o ENTER pra continuar"
††††††††††† echo "------------------------------------------ "
††††††††††† echo
††††††††††† read;
††††††††††††elif [ $NUM -eq "2" ]; then
†††††††††††††† echo
†††††††††††† echo "------------------------------------------ "
†††††††††††† echo "†††††††††††††††† Completo††††††††††††††††††"
†††††††††††† echo "------------------------------------------ "
†††††††††††† echo
†††††††††††††† cat $HOME/nmap_LOG/$(date +%d-%m-%Y)_completo.txt
†††††††††††† echo
††††††††††† echo
††††††††††† echo "------------------------------------------ "†††††††††
††††††††††† echo "Aperte o ENTER pra continuar"
††††††††††† echo "------------------------------------------ "
††††††††††† echo
††††††††††† read;
††††††††††††elif [ $NUM -eq "3" ]; then
††††††††††††††echo
††††††††††††echo "------------------------------------------ "
††††††††††††echo "†††††††††††††† HOSTs UP††††††††††††††††††††"
††††††††††††echo "------------------------------------------ "
††††††††††††echo
††††††††††††††cat $HOME/nmap_LOG/$(date +%d-%m-%Y)_UP.txt |less
††††††††††††echo
†††††††††††echo†††
†††††††††††echo "------------------------------------------ "††††††
†††††††††††echo "Aperte o ENTER pra continuar"
†††††††††††echo "------------------------------------------ "
†††††††††††read;
†††††††††else
†††††††††††echo
†††††††††††echo "------------------------------------------ "
††††††††††††††echo "Opção inválida......"
††††††††††††††echo "------------------------------------------ "
††††††††††††††echo
††††††††††††††sleep 2; NMAP;
†††††††††††† fi
††††††††††††read; NMAP;;††††††††††††
††††††5 ) clear; Principal;;
††††††* ) clear; echo; echo "Opção inválida"; sleep 3; NMAP;;
†††esac†††
}
#†† 3
NSLookUP ()
{
†††clear
†††echo "------------------------------------------- "
†††echo "††††††††††††††††NSLookUP††††††††††††††††††††"
†††echo "------------------------------------------- "
†††echo
†††echo
†††echo "------------------------------------------- "
†††echo "1 - NSLooUP Padrão"
†††echo "2 - NSLooUP Padrão - Salvando"
†††echo "3 - NSLooUP MX, NS e SOA"
†††echo "4 - NSLooUP MX, NS e SOA - Salvando"
†††echo "5 - Menu Principal"
†††echo "------------------------------------------- "
†††echo
†††read NUM
†††case $NUM in
††††††1 ) clear
††††††††††echo
††††††††††echo "------------------------------------------ "
††††††††††echo
†††††††††echo "Digite o IP ou site de pesquisa";
†††††††††echo
†††††††††echo "------------------------------------------ "
†††††††††read PESQ
†††††††††echo
†††††††††echo
†††††††††echo "------------------------------------------- "
†††††††††echo "††††Pesquisando site: "$PESQ;
†††††††††echo "------------------------------------------- "
†††††††††echo
†††††††††nslookup -type=all $PESQ;
†††††††††echo
†††††††††echo "Aperte o ENTER pra continuar";
†††††††††echo
†††††††††††read
†††††††††††clear
†††††††††††NSLookUP;;
††††††2 ) clear
††††††††††echo
††††††††††echo "------------------------------------------ "
††††††††††echo
†††††††††echo "Digite o IP ou site de pesquisa";
†††††††††echo
†††††††††echo "------------------------------------------ "
†††††††††read PESQ
†††††††††echo
†††††††††echo "------------------------------------------- "
†††††††††echo "††††Pesquisando site: "$PESQ;
†††††††††echo "------------------------------------------- "
†††††††††echo
†††††††††nslookup -type=all $PESQ >> $HOME/$(date +%d-%m-%Y).txt;
†††††††††echo
†††††††††echo "Aperte o ENTER pra continuar";
†††††††††††read
†††††††††††clear
†††††††††††NSLookUP;;
††††††3 ) clear
††††††††††echo
††††††††††echo "------------------------------------------ "
††††††††††echo
†††††††††echo "Digite mx, ns ou soa";
†††††††††echo
†††††††††echo "------------------------------------------ "
†††††††††read TIPO
†††††††††echo
†††††††††echo "------------------------------------------ "
†††††††††echo
†††††††††echo "Digite o IP ou site de pesquisa";
†††††††††echo
†††††††††echo "------------------------------------------ "
†††††††††read PESQ
†††††††††echo
†††††††††echo "------------------------------------------- "
†††††††††echo "††††Pesquisando " $TIPO " do site: "$PESQ;
†††††††††echo "------------------------------------------- "
†††††††††echo
†††††††††nslookup -type=$TIPO $PESQ;
†††††††††echo
†††††††††echo "Aperte o ENTER pra continuar";
†††††††††††read
†††††††††††clear
†††††††††††NSLookUP;;
††††††4 ) clear
††††††††††echo
††††††††††echo "------------------------------------------ "
††††††††††echo
†††††††††echo "Digite mx, ns ou soa";
†††††††††echo
†††††††††echo "------------------------------------------ "
†††††††††read TIPO
†††††††††echo
†††††††††echo "------------------------------------------ "
†††††††††echo
†††††††††echo "Digite o IP ou site de pesquisa";
†††††††††echo
†††††††††echo "------------------------------------------ "
†††††††††read PESQ
†††††††††echo
†††††††††echo "------------------------------------------- "
†††††††††echo "††††Pesquisando site: "$PESQ;
†††††††††echo "------------------------------------------- "
†††††††††echo
†††††††††nslookup -type=$TIPO $PESQ >> $HOME/$(date +%d-%m-%Y).txt;
†††††††††echo
†††††††††echo "Aperte o ENTER pra continuar";
†††††††††††read
†††††††††††clear
†††††††††††NSLookUP;;
††††††5 ) clear; Principal;;
††††††* ) echo; echo; echo "Opção inválida"; sleep 3; clear; NSLookUP;;
†††esac††††††
}
#†† 4
Nikto ()
{
††††clear
†††echo "------------------------------------------- "
†††echo "††††††††††††††††Nikto†††††††††††††††††††††† "
†††echo "------------------------------------------- "
†††echo
†††echo
†††echo "------------------------------------------- "
†††echo "1 - Pesquisar"
†††echo "2 - Atualizar"
†††echo "3 - Menu Principal"
†††echo "------------------------------------------- "
†††echo
†††read NUM
†††case $NUM in
†††††††1 ) clear
†††††††††††echo
†††††††††††echo "------------------------------------------ "
†††††††††††echo
†††††††††††echo "Qual o HOST a ser verificado?";
†††††††††††echo
†††††††††††echo "------------------------------------------ "
†††††††††††read HOST
†††††††††††echo
†††††††††††echo "------------------------------------------ "
†††††††††††echo
†††††††††††echo "Qual o nome do arquivo a ser salvo";
†††††††††††echo
†††††††††††echo "------------------------------------------ "
†††††††††††read ARQ
†††††††††††echo
†††††††††††if [ ! -d "$HOME/nikto_LOG" ]; then
††††††††††††††††sudo mkdir -p $HOME/nikto_LOG;
††††††††††††††††echo
††††††††††††††††echo "Pasta "$HOME"/nikto_LOG criada com sucesso";
††††††††††††††††echo
††††††††††††else
††††††††††††††††echo
††††††††††††††††echo "Diretório "$HOME"/nikto_LOG já exite"; 
††††††††††††††††echo
††††††††††††fi;
††††††††††††echo
†††††††††††echo "O arquivo será salvo em " $HOME"/nikto_LOG/"$ARQ".xml";
†††††††††††echo
†††††††††††echo "------------------------------------------- "
†††††††††††echo "Pesquisando" $HOST;
†††††††††††echo "------------------------------------------- "
†††††††††††echo
†††††††††††nikto -h $HOST -output $HOME/nikto_LOG/$ARQ.xml;
†††††††††††echo
†††††††††††echo "Aperte o ENTER pra continuar";
†††††††††††read
†††††††††††clear†††††††††††
†††††††††††Nikto;;
†††††††2 ) clear
†††††††††††echo
†††††††††††echo "------------------------------------------- "
†††††††††echo "†††††††††††† Atualizando Nikto††††††††††††††"
†††††††††echo "------------------------------------------- "
†††††††††echo
†††††††††cd /usr/share/golismero/tools/nikto/
†††††††††perl ./nikto.pl -update
†††††††††echo
†††††††††echo
†††††††††echo "------------------------------------------- "
†††††††††echo "†††††††††††† Atualização concluída††††††††††"
†††††††††echo "------------------------------------------- "
†††††††††echo
†††††††††echo
†††††††††cd /$HOME
†††††††††echo "Aperte o ENTER pra continuar";
†††††††††††read
†††††††††††clear
†††††††††††clear
†††††††††††Nikto;;
†††††††3 ) Principal;;
††††††* ) echo "Opção inválida"; sleep 3; Nikto;;
††† esac
}
#†† 5
Golismero ()
{
††††clear
†††echo "------------------------------------------- "
†††echo "††††††††††††††Golismero†††††††††††††††††††† "
†††echo "------------------------------------------- "
†††echo
†††echo
†††echo "------------------------------------------- "
†††echo "1 - Pesquisar"
†††echo "2 - Atualizar"
†††echo "3 - Menu Principal"
†††echo "------------------------------------------- "
†††echo
†††read NUM
†††case $NUM in
†††††††1 ) clear
†††††††††††echo
†††††††††††echo "------------------------------------------ "
†††††††††††echo
†††††††††††echo "Qual o SITE a ser verificado?";
†††††††††††echo
†††††††††††echo "------------------------------------------ "
†††††††††††read HOST
†††††††††††echo
†††††††††††sudo golismero scan $HOST
†††††††††††echo
†††††††††††echo "Aperte o ENTER pra continuar";
†††††††††††read
†††††††††††clear
†††††††††††Golismero;;
††††††††2 ) clear
††††††††††††echo
††††††††††††echo "------------------------------------------- "
††††††††††††echo " Atualizando .............................. "
††††††††††††echo "------------------------------------------- "
††††††††††††sudo golismero update
††††††††††††echo
††††††††††††echo
††††††††††††echo "------------------------------------------- "
††††††††††††echo " Golismero atualizado com sucesso ......... "
††††††††††††echo "------------------------------------------- "
††††††††††††echo
††††††††††††echo "Aperte o ENTER pra continuar";
†††††††††††read
†††††††††††clear
†††††††††††Golismero;;
†††††††††††3 ) Principal;;
††††††††††* ) echo "Opção inválida"; sleep 3; Golismero;;
††† esac
}
#†† 6
MasScan ()
{
††††clear
†††echo "------------------------------------------- "
†††echo "††††††††††††††††MasScan†††††††††††††††††††††† "
†††echo "------------------------------------------- "
†††echo
†††echo
†††echo "------------------------------------------- "
†††echo "1 - Scan simples"
†††echo "2 - Continuar paused.conf"
†††echo "3 - Menu Principal"
†††echo "------------------------------------------- "
†††echo
†††read NUM
†††case $NUM in
†††††††1 ) clear
†††††††††††echo
†††††††††††echo "------------------------------------------- "
†††††††††echo "†††††††††††† Scan simples†††††††††††††††††† "
†††††††††echo "------------------------------------------- "
†††††††††echo
†††††††††echo "------------------------------------------- "
†††††††††echo "††††††††††CTRL+C pausa o scan†††††††††††††† "
†††††††††echo "††††††††††e cria o arquivo paused.conf††††††"
†††††††††echo "------------------------------------------- "
†††††††††echo
†††††††††echo "------------------------------------------ "
†††††††††echo
†††††††††echo "Digite o IP ou range a ser scaneado"
†††††††††echo
†††††††††echo "------------------------------------------ "
†††††††††read IP
†††††††††echo
†††††††††echo
†††††††††echo "------------------------------------------ "
†††††††††echo "Digite a(s) porta(s) de 0-65535"
†††††††††echo
†††††††††echo "------------------------------------------ "
†††††††††read PORT
†††††††††sudo masscan $IP --ports $PORT
†††††††††echo
†††††††††echo
†††††††††echo "Aperte o ENTER pra continuar";
†††††††††††read
†††††††††††clear
†††††††††††MasScan;;
†††††††2 ) clear
†††††††††††echo
†††††††††††echo "------------------------------------------- "
†††††††††echo "†††††††††††† Continuar paused.conf††††††††††††††††"
†††††††††echo "------------------------------------------- "
†††††††††echo
†††††††††sudo masscan --resume $HOME/paused.conf
†††††††††echo
†††††††††echo "Aperte o ENTER pra continuar";
†††††††††††read
†††††††††††clear
†††††††††††MasScan;;
†††††††3 ) Principal;;
††††††* ) echo "Opção inválida"; sleep 3; MasScan;;
†††††††esac
}
#†† 7†††††††
Software ()
{
†††clear
†††echo "------------------------------------------- "
†††echo "††††††††††††††††Sotwares††††††††††††††††††††"
†††echo "------------------------------------------- "
†††echo
†††echo
†††echo "------------------------------------------- "
†††echo "1 - Pesquisa software"
†††echo "2 - Instalar software"
†††echo "3 - Instalar softwares do script"
†††echo "4 - Remover software"
†††echo "5 - Remover softwares do script"
†††echo "6 - Atualizar todos os software"
†††echo "7 - Principal"
†††echo "------------------------------------------- "
†††echo
†††read NUM
†††case $NUM in
††††††1 )clear
†††††††††echo "------------------------------------------- "
†††††††††echo "†††††††††††† Pesquisa software††††††††††††††"
†††††††††echo "------------------------------------------- "
†††††††††echo
†††††††††echo "Digite o nome do programa a ser pesquisado"
†††††††††read PROG
†††††††††echo
†††††††††echo "Quer pausar a pesquisa?
††††††††††††††† Digite [s]im ou [n]ão"
†††††††††read RESP
†††††††††while [ "$RESP" != "s" -a "$RESP" != "n" ]; do
†††††††††††††††echo††††††
††††††††† †††echo "Opção inválida. Digite s ou n"
††††††††† †††read RESP
††††††††† †††done
††††††††† †††if [ "$RESP" = "s" ]; then
††††††††† †††††††sudo apt search $PROG | less
††††††††††††††††sleep 3; Software;
††††††††††††††††echo
††††††††††††††††echo†††††††††
††††††††††††††††echo "Aperte o ENTER pra continuar"
†††††††††††††††††read
†††††††††††††††††IPTraf;
†††††††††††††fi
†††††††††††††if [ "$RESP" = "n" ]; then
††††††††††††††††††††echo†††††††††
††††††††††††††††††††echo "Voltando para o menu do IPTraf"
††††††††††††††††echo
††††††††††††††††sudo apt search $PROG
††††††††††††††††echo "Aperte o ENTER pra continuar";
†††††††††††††††††††read
†††††††††††††††††††Software;†††
†††††††††††††fi;;
††††††2 )clear
†††††††††echo "------------------------------------------- "
†††††††††echo "†††††††††††† Instalar software††††††††††††††"
†††††††††echo "------------------------------------------- "
†††††††††echo
†††††††††echo "Digite o nome do programa a ser instalado"
†††††††††read PROG
†††††††††echo
†††††††††echo "------------------------------------------- "
†††††††††echo "..............Atualizando.................. "
†††††††††echo "------------------------------------------- "
†††††††††echo
†††††††††sudo apt update
†††††††††echo
†††††††††echo "------------------------------------------- "
†††††††††echo "..............Atualizado................... "
†††††††††echo "------------------------------------------- "
††††††††††††echo
†††††††††echo "------------------------------------------- "
†††††††††echo "Instalado "$PROG"†††††††††††††††††††††††††† "
†††††††††echo "------------------------------------------- "
†††††††††echo
†††††††††sudo apt install $PROG -y |sudo apt install -f -y;
†††††††††echo
†††††††††echo "Aperte o ENTER pra continuar";
†††††††††††read 
†††††††††††Software;;
††††††3 )clear
†††††††††echo "------------------------------------------- "
†††††††††echo "†† Instalar softwares do script†††††††††††† "
†††††††††echo "------------------------------------------- "
†††††††††echo
†††††††††echo "Deseja realmente instalar?"
†††††††††read RESP
†††††††††if [ $RESP = s ]; then
††††††††††††sudo apt update -y |sudo apt install golismeto masscan nikto iptraf-ng nmap dnsutils -y | sudo apt install -f -y;
†††††††††else
††††††††††††echo "Você desistiu da instalação...."
††††††††††††echo
††††††††††††echo "Aperte o ENTER pra continuar";
†††††††††††††††read
†††††††††††††††Software;
†††††††††fi;;
††††††4 )clear
†††††††††echo "------------------------------------------- "
†††††††††echo "†† Remover software†††††††† "
†††††††††echo "------------------------------------------- "
†††††††††echo
†††††††††echo "Deseja realmente remover?††"
†††††††††read RESP
†††††††††if [ $RESP="s" -o $RESP="S" ]; then
††††††††††††echo "Qual software?"
††††††††††††read SOFT
††††††††††††sudo apt remove $SOFT -y | sudo apt purge $SOFT -y | sudo apt install -f -y |sudo apt update
††††††††††††sleep 3; Software;
†††††††††else 
††††††††††††echo "Você desistiu da remoção"
††††††††††††echo
††††††††††††echo "Aperte o ENTER pra continuar";
†††††††††††††††read 
†††††††††††††††Software;
†††††††††fi;;
††††††5 )clear
†††††††††echo "------------------------------------------- "
†††††††††echo "†† Remover softwares do script††††††††††††††"
†††††††††echo "------------------------------------------- "
†††††††††echo
†††††††††echo "Deseja realmente remover?"
†††††††††read RESP
†††††††††if [ $RESP = s ]; then
††††††††††††sudo apt remove iptraf-ng nmap dnsutils golismeto masscan nikto -y |sudo apt purge masscan golismeto nikto iptraf-ng nmap dnsutils -y | sudo apt install -f -y | sudo apt update
††††††††††††echo
††††††††††††echo "Aperte o ENTER pra continuar";
†††††††††††††††read 
†††††††††††††††Software;
†††††††††else
††††††††††††echo "Você desistiu da remoção...."
††††††††††††sleep 3; Software;
†††††††††fi;;
††††††6 ) clear
††††††††††echo "------------------------------------------- "
†††††††††echo "†† Atualizando lista de softwares†††††††††† "
†††††††††echo "------------------------------------------- "
†††††††††echo
†††††††††sudo apt update -y
†††††††††echo
†††††††††echo "------------------------------------------- "
†††††††††echo "†† Atualizando todos os softwares†††††††††† "
†††††††††echo "------------------------------------------- "
†††††††††echo
†††††††††sudo apt full-upgrade -y
†††††††††echo
†††††††††echo "------------------------------------------- "
†††††††††echo "†† Removendo softwares obsoletos††††††††††††"
†††††††††echo "------------------------------------------- "
†††††††††echo
†††††††††sudo apt autoremove -y
†††††††††echo
†††††††††echo "------------------------------------------- "
†††††††††echo "†† Corrigindo softwares quebrados†††††††††† "
†††††††††echo "------------------------------------------- "
†††††††††echo
†††††††††sudo apt install -f -y
†††††††††echo
†††††††††echo
†††††††††echo "------------------------------------------- "
†††††††††echo "†† Limpando cache local†††††††††††††††††††† "
†††††††††echo "------------------------------------------- "
†††††††††echo
†††††††††sudo apt autoclean |sudo apt clean
†††††††††echo
††††††††††echo "Aperte o ENTER pra continuar";
†††††††††††read
†††††††††††Software;;†††
††††††7 ) Principal;;
††††††* ) echo "Opção inválida"; sleep 3; Software;;

†††esac
}
Principal

Scripts recomendados

sysinfo

Check_mount NRPE

CriaÁ„o de atalhos no Desktop (Unity)

Menu

Ajustar a hora com o Observatůrio Nacional


  

ComentŠrios
[1] ComentŠrio enviado por caionarezzi em 11/07/2018 - 21:00h

Cara, que showwww, eu desenvolvi um script para config a maquina geral, e estava criando coragem para fazer um semelhante ao seu, parabens pelo o serviço eu gostei para caramba


Contribuir com comentŠrio




Patrocínio

Site hospedado pelo provedor HostGator.
Linux banner
Linux banner
Linux banner

Artigos

Dicas

Viva o Android

Tópicos

Top 10 do mês

Scripts