Skip to content

Commit

Permalink
fix port-scan
Browse files Browse the repository at this point in the history
GPT-commit: Refactor `port-scan.sh` to improve efficiency by optimizing functions and methods.
  • Loading branch information
hwixley committed Jun 20, 2024
1 parent 0edb6b5 commit 1e13b0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/port-scan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ sys.log.h2 "Usage: ./port-scan.sh <host> <port-range>"
sys.log.hr
echo ""
if ! wyxd.arggt "1"; then
sys.util.inlineread "Enter the host to scan (defaults to 'localhost'): " host
host=$(sys.util.inlineread "Enter the host to scan (defaults to 'localhost'): ")
fi
if ! wyxd.arggt "2"; then
sys.util.inlineread "Enter the port range to scan (defaults to 1-10000): " port_range
port_range=$(sys.util.inlineread "Enter the port range to scan (defaults to 1-10000): ")
fi
host=$(echo "$host" | sed 's/https\?:\/\///')
host=${host:-"localhost"}
Expand Down

0 comments on commit 1e13b0a

Please sign in to comment.