mirror of
https://github.com/byReqz/conn.git
synced 2024-11-01 01:03:14 +00:00
initial release
This commit is contained in:
parent
5b58b39e22
commit
d4823429a2
31
conn.sh
Normal file
31
conn.sh
Normal file
@ -0,0 +1,31 @@
|
||||
#! /bin/bash
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Usage: conn [ip] (y/n)"
|
||||
exit
|
||||
elif [[ -n "$1" ]]; then
|
||||
echo "checking connection status for $1"
|
||||
echo "-----------------------------------------"
|
||||
fping $1
|
||||
echo "-----------------------------------------"
|
||||
fi
|
||||
if [[ -z "$2" ]]; then
|
||||
echo "portscan? (y/n)"
|
||||
read portscan
|
||||
if [[ "$portscan" = "y" ]]; then
|
||||
echo "-------------------Portscan---------------------"
|
||||
nmap -Pn $1
|
||||
fping -c 4 -A $1
|
||||
echo "------------------------------------------------"
|
||||
exit
|
||||
elif [[ "$portscan" = "n" ]]; then
|
||||
exit
|
||||
fi
|
||||
elif [[ "$2" = "y" ]]; then
|
||||
echo "-------------------Portscan---------------------"
|
||||
nmap -Pn $1
|
||||
fping -c 4 -A $1
|
||||
echo "------------------------------------------------"
|
||||
exit
|
||||
elif [[ "$2" = "n" ]]; then
|
||||
exit
|
||||
fi
|
Loading…
Reference in New Issue
Block a user