From 72d9ac55e95baa5ab35b960ce3fcc215898d02ca Mon Sep 17 00:00:00 2001 From: jc Date: Tue, 15 Apr 2025 23:55:04 +0300 Subject: [PATCH] gonna be slightly slower but more efficent --- portradar.sh | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/portradar.sh b/portradar.sh index dd048e1..08a1b7f 100755 --- a/portradar.sh +++ b/portradar.sh @@ -18,7 +18,7 @@ SYNTAX } cl(){ - rm -rf /tmp/tcp_ports; rm -rf /tmp/udp_ports; rm -rf /tmp/ips + rm -rf /tmp/tcp_ports; rm -rf /tmp/ips } pp(){ @@ -66,11 +66,6 @@ tcp_scan(){ [[ $ret == 0 ]] && { echo $c >> /tmp/tcp_ports; cg_color olbg "$c "; } } -udp_scan(){ - ret=$(nc -u -w1 -z $ip $c; echo $?) - [[ $ret == 0 ]] && { echo $c >> /tmp/udp_ports; } -} - fast_ping(){ [[ $FORCE == true ]] && { echo $ip >> /tmp/ips; return; } nn=$(ping -n -w2 -c1 $ip >/dev/null 2>&1; echo $?) @@ -105,15 +100,6 @@ scan_tcp(){ [[ -f /tmp/tcp_ports ]] && { command="nmap -Pn -n -sCV -p $(allports=($(