Skip to content

Commit

Permalink
fix: need to output as JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
Esya authored and flaupretre committed Jun 14, 2023
1 parent bcadfcf commit e5b039a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion get-open-port.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
comm -23 <(seq 1 65535 | sort) <(ss -Htan | awk '{print $4}' | cut -d':' -f2 | sort -u) | shuf | head -n 1
port=$(comm -23 <(seq 1 65535 | sort) <(ss -Htan | awk '{print $4}' | cut -d':' -f2 | sort -u) | shuf | head -n 1)
echo "{\"port\": \"$port\"}"

0 comments on commit e5b039a

Please sign in to comment.