Skip to content

Instantly share code, notes, and snippets.

@kanazux
Created October 9, 2014 16:42
Show Gist options
  • Save kanazux/25f40c33a6f938abcea2 to your computer and use it in GitHub Desktop.
Save kanazux/25f40c33a6f938abcea2 to your computer and use it in GitHub Desktop.
remove tag html, chack ip on blacklist
#!/usr/local/bin/python
import sys, re
from urllib2 import urlopen
print ''.join([ re.sub(r'<[^>]+>','',x) for x in urlopen('http://spamcop.net/w3m?action=checkblock&ip={}'.format(sys.argv[1])).read().split('\n') if re.match(r'^{}.*'.format(sys.argv[1]),re.sub(r'<[^>]+>','',x))])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment