Skip to content

Instantly share code, notes, and snippets.

View sudo-gecko's full-sized avatar
:shipit:
“If not us, who? If not now, when?” -John F. Kennedy

KeonWoo PARK sudo-gecko

:shipit:
“If not us, who? If not now, when?” -John F. Kennedy
  • Seoul, Republic of Korea
  • 16:20 (UTC +09:00)
View GitHub Profile
@sudo-gecko
sudo-gecko / Only-Cloudflare.sh
Last active October 6, 2024 19:11
Allow 80, 443 Port Cloudflare only.
#!/bin/bash
if [ $(whoami) != "root" ]
then
echo "Please run as root"
exit
fi
#ipv4
for i in `curl -s https://www.cloudflare.com/ips-v4`
do
/sbin/iptables -I INPUT -p tcp -s $i --dport 80 -j ACCEPT
@sudo-gecko
sudo-gecko / Scanner-drop.py
Last active January 23, 2025 20:46
Block Shodan, Censys scanner Python code for Linux server.
#Block Shodan.io, Censys.io scanner. (2025-01-24 updated)
import os
# https://www.ipfire.org/docs/configuration/firewall/blockshodan
shodan_ips = ['208.180.20.97','198.20.69.74','198.20.69.98','198.20.70.114','198.20.99.130','93.120.27.62','66.240.236.119','71.6.135.131','66.240.192.138','71.6.167.142','82.221.105.6','82.221.105.7','71.6.165.200','188.138.9.50','85.25.103.50','85.25.43.94','71.6.146.185','71.6.158.166','198.20.87.98','66.240.219.146','209.126.110.38','104.236.198.48','104.131.0.69','162.159.244.38','93.174.95.106','94.102.49.193','80.82.77.139','94.102.49.190','185.163.109.66','89.248.172.16','71.6.146.186','89.248.167.131','159.203.176.62','185.181.102.18','80.82.77.33','216.117.2.180','98.143.148.107','155.94.254.133','155.94.254.143','155.94.222.12','98.143.148.135','165.227.62.247','165.227.55.4','195.144.21.56','185.165.190.17','207.90.244.0/24','185.142.236.36','185.142.236.40','185.142.236.41','185.142.236.43','185.142.239.16','198.20.69.96/29','198.20.70.112/29','198.20.87.96/29','19