Unicode域-深蹲查找器
xn-twist的Python项目详细描述
find unicode域占用
安装
稳定释放
要安装XN Twist,请在终端中运行此命令:
pip install xn-twist
这是安装xn twist的首选方法,因为它总是安装最新的稳定版本。
如果您没有安装pip,这个Python installation guide可以指导您 你完成了整个过程。
来源
xn twist的源代码可以从Github repo下载。
您可以克隆公共存储库:
$ git clone git://github.com/xn-twist/xn-twist
或者下载tarball:
$ curl -OL https://github.com/xn-twist/xn-twist/tarball/master
一旦您有了源代码的副本,就可以使用以下命令安装它:
$ python setup.py install
用法
通过python
您可以在脚本中使用xn twist,如下所示:
fromxn_twistimportXNTwistxn=XNTwist()twist_results=xn.twist('example.com')
可以将以下参数传递到XNTwist对象的初始化中:
- query_dns:指定是否要查询域的dns值。默认为False。请注意,将此值设置为“true”将显著减慢扭曲过程。
- output:指定将算法的json输出写入的输出文件。
调用twist()函数时,有一个可选的limit值,该值限制用作欺骗的字符数。这减少了处理负载,使结果易于管理。示例用法如下所示。
fromxn_twistimportXNTwistxn=XNTwist()twist_results=xn.twist('example.com',limit=2)
调用twist()函数时,有一个可选的simple值,该值只返回更改了一个字符的可能域占用,而不是所有可能的置换(默认值为FALSE)。这减少了处理负载,使结果易于管理。示例用法如下所示。
fromxn_twistimportXNTwistxn=XNTwist()twist_results=xn.twist('example.com',simple=True)
响应将是json,它看起来像:
{"datetime":"2018-04-06 05:33:45.889048","possible_squats":[{"displayed":"\u0430.com","punycode":"xn--80a.com"},{"displayed":"\u0105.com","punycode":"xn--2da.com"},{"displayed":"\u03ac.com","punycode":"xn--hxa.com"},{"displayed":"\u00e1.com","punycode":"xn--1ca.com"},{"displayed":"\u01ce.com","punycode":"xn--tja.com"},{"displayed":"\u1f05.com","punycode":"xn--ing.com"},{"displayed":"\u01df.com","punycode":"xn--bka.com"},{"displayed":"\u1f00.com","punycode":"xn--dng.com"},{"displayed":"\u1f01.com","punycode":"xn--eng.com"},{"displayed":"\u00e4.com","punycode":"xn--4ca.com"}],"count":10,"xn_twist_version":"1.2.0"}
通过命令行
您可以在命令行中使用xn twist,如下所示:
xntwist example.com
xn twist命令行格式的用法如下:
XN Twist. Usage: xntwist <domain> [--limit=LIMIT] [--dns] [--output=OUTPUT] xntwist (-h | --help) xntwist --version Options: -h --help Show this screen. --version Show version. -l=LIMIT --limit=LIMIT Limit the number of characters used as spoofs [default: 5]. -d --dns Query DNS for each domain. -o=OUTPUT --output=OUTPUT Specify an output file.
运行测试
克隆repo后,可以使用此存储库的基本目录中的以下命令对其进行测试:
make test
数据,数据,无处不在…
这个项目依赖于一个数据集。更多关于如何访问数据集,甚至如何帮助我们建立它的细节即将到来!
学分
这个包是用Cookiecutter和fhightower/python-project-template项目模板创建的。