From 41ad090ebf40575146e9c64ad53be9b61d87489d Mon Sep 17 00:00:00 2001 From: "xu.jimmy.wrk" Date: Tue, 26 Oct 2010 13:59:36 +0000 Subject: [PATCH] don't need to decode here --- checkRules.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/checkRules.py b/checkRules.py index 1aa61b2..d3e2159 100755 --- a/checkRules.py +++ b/checkRules.py @@ -43,11 +43,6 @@ expect = {IP: 28, TLS: 35, URL: 56, INVALID: 0} def getUrl(rule): global offset - rule = unquote(rule.encode()) - try: - rule = rule.decode('utf-8', 'strict') - except UnicodeDecodeError: - rule = rule.decode('gbk', 'ignore') if rule.startswith('||'): return ('http://' + rule[2:], IP) if rule.startswith('|https'): return (rule[1:], TLS) if rule.startswith('|http://'):