Skip to content

Instantly share code, notes, and snippets.

View yhvhnl's full-sized avatar

elim yhvhnl

  • nec
  • Hokkaido, Furano, Japan
View GitHub Profile
@yhvhnl
yhvhnl / scan_isp_blocklist.sh
Created April 11, 2024 12:27 — forked from vfreex/scan_isp_blocklist.sh
Test which TCP ports are blocked by my ISP
#!/bin/bash
for port in {1..9999}; do
echo -n "TCP $port: "
result=$(nc "$1" "$port" -w 1 2>&1 < /dev/null)
if [ "$?" -eq 0 ]; then
echo "Open"
continue
fi
if [[ "$result" == *refused* ]]; then