弦类增强
alphabet的Python项目详细描述
alphabet是python字符串类的增强。
安装
安装包的最简单方法是通过pip:
$ pip install alphabet
用法
混淆
fromalphabetimportalphabetkey="foobar"s=alphabet.alphabet("python")print(s)>pythont=s.obfuscate(key)print(bytes(t,'utf-8'))>b'\x16\x16\x1b\n\x0e\x1c'print(t.obfuscate(key))>python
标识字符串
fromalphabetimportalphabetalphabet('%!').identify()>'PostScript document text'alphabet('import os').identify()>'Python'alphabet('<div>foobar</div>').identify()>'XML'alphabet('Привет').identify()>'ru'