This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#create a new chain named SHADOWSOCKS | |
iptables -t nat -N SHADOWSOCKS | |
# Ignore your shadowsocks server's addresses | |
# It's very IMPORTANT, just be careful. | |
iptables -t nat -A SHADOWSOCKS -d 163.44.132.189/32 -j RETURN | |
iptables -t nat -A SHADOWSOCKS -d 0.0.0.0/8 -j RETURN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#用正则简单过滤html的<>标签 | |
import re | |
str = "<img /><a>srcd</a>hello</br><br/>" | |
str = re.sub(r'</?\w+[^>]*>','',str) | |
print str |