first commit
This commit is contained in:
22
.local/bin/obsh
Executable file
22
.local/bin/obsh
Executable file
@ -0,0 +1,22 @@
|
||||
#! /bin/bash
|
||||
broadcast=$(ip a | awk '$1 == "inet" && $4 !~ /^127/ { print $4"/24" }' | uniq)
|
||||
|
||||
RED='\033[0;31m'
|
||||
GRAY='\033[0;37m'
|
||||
GREEN='\033[0;32m'
|
||||
NC='\033[0m'
|
||||
|
||||
clear
|
||||
printf "${GRAY}Executing nmap on the subnets: ${RED}\n$broadcast\n"
|
||||
candidates=$(
|
||||
for brdip in ${broadcast}; do
|
||||
nmap -sP $brdip | awk '$2 == "scan" { print $5 }'
|
||||
done)
|
||||
printf "${GRAY}\nFound the following candidates: ${GREEN}\n$candidates\n"
|
||||
for ip in ${candidates}; do
|
||||
printf "${GRAY}\nProbing $ip...\n${NC}"
|
||||
ssh -q root@$ip
|
||||
done
|
||||
clear
|
||||
echo "Nothing found"
|
||||
|
Reference in New Issue
Block a user