Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9b2790
commit 2d721dd
Showing
15 changed files
with
169 additions
and
73 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
*.pyc | ||
.coverage | ||
.ve | ||
_cache | ||
credentials.ini | ||
dist |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import urllib | ||
import base64 | ||
import sys | ||
import re | ||
|
||
|
||
def is_third(): | ||
return sys.version_info >= (3, 0) | ||
|
||
|
||
def urlencode(s): | ||
if hasattr(urllib, 'urlencode'): | ||
return urllib.urlencode(s) | ||
elif hasattr(urllib, 'parse'): | ||
return urllib.parse.urlencode(s) | ||
else: | ||
raise Exception("No urlencode") | ||
|
||
|
||
def iterator(thing): | ||
return thing.iteritems() if hasattr(thing, 'iteritems') else iter(thing.items()) | ||
|
||
|
||
def base64encode(s): | ||
if is_third(): | ||
return str(base64.b64encode(bytes(s, 'utf8')), 'utf8') | ||
else: | ||
return base64.b64encode(s) | ||
|
||
|
||
def tostr(s): | ||
if is_third(): | ||
return str(s, 'utf8') | ||
else: | ||
return str(s) | ||
|
||
|
||
def clean_decrypted(s): | ||
if is_third(): | ||
return re.sub(r"[\u0001-\u0010]", '', s).strip() | ||
else: | ||
return s.replace('\x05', '') |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.