1
mirror of https://github.com/carlospolop/PEASS-ng synced 2024-11-24 01:26:22 +01:00

Fixed empty "Active Ports" output, when ss is used

This commit is contained in:
Patrick Walker 2021-01-06 23:48:17 +01:00 committed by GitHub
parent 2a81943af1
commit 856614c78f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1438,7 +1438,7 @@ if [ "`echo $CHECKS | grep Net`" ]; then
#-- NI) Ports
printf $Y"[+] "$GREEN"Active Ports\n"$NC
printf $B"[i] "$Y"https://book.hacktricks.xyz/linux-unix/privilege-escalation#open-ports\n"$NC
(netstat -punta || ss --ntpu || (netstat -a -p tcp && netstat -a -p udp) | grep -i listen) 2>/dev/null | sed -E "s,127.0.[0-9]+.[0-9]+,${C}[1;31m&${C}[0m,"
(netstat -punta || ss -ntpu || (netstat -a -p tcp && netstat -a -p udp) | grep -i listen) 2>/dev/null | sed -E "s,127.0.[0-9]+.[0-9]+,${C}[1;31m&${C}[0m,"
echo ""
#-- NI) tcpdump