2 Star 7 Fork 5

nico / domain-crawling

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 2.08 KB
一键复制 编辑 原始数据 按行查看 历史
nico 提交于 2018-06-14 17:34 . 更新Readme

作用

闲来无事,写个脚本,用来爬取[a-z0-9]范围内指定长度的域名的注册信息,将未注册的域名信息写入指定文件中,供兄弟们自己分析!

语言

作为一名javaer,这个脚本使用py开发。

使用

先将domain-crawling拉到本地

git clone https://gitee.com/ainilili/domain-crawling.git

进入目录中执行py脚本

cd domain-crawling

通过--help参数查看帮助

shell>> py domain-crawling.py -h
usage: domain-crawling.py [-h] [-p PATH] [-l LENGTH] [-o {y,n}] [-d DELAYED]

Nico domain name crawler script

optional arguments:
  -h, --help            show this help message and exit
  -p PATH, --path PATH  The available domain name storage path after
                        detection.
  -l LENGTH, --length LENGTH
                        The length of the domain you want to detect is all
                        combinations of a-z0-9.
  -o {y,n}, --openproxy {y,n}
                        Open the IP proxy mode.
  -d DELAYED, --delayed DELAYED
                        The interval between each climb, Unit s
  -s SUFFIX, --suffix SUFFIX
                       Domain suffix

直接启动脚本:

shell>> py domain-crawling.py

指定域名长度启动脚本:

shell>> py domain-crawling.py --length 4

这时爬取的域名长度是4(默认也是4),例如:

aaaa.com
bbbb.com
cccc.com

指定爬取的域名(例如cn)后缀:

shell>> py domain-crawling.py --suffix cn

如果要开启代理(默认关闭):

shell>> py domain-crawling.py--openproxy y

如果更改数据保存文件(默认是时间戳.txt):

shell>> py domain-crawling.py --path data1

设置爬取间隔时间(默认是0.1s)为0.5s:

shell>> py domain-crawling.py --delayed 0.5

注意

笔者使用的是data5u的爬虫代理,如果您哟啊开启代理模式,脚本中自带的orderId很可能早已失效,请自行注册然后使用,如果您有更好的代理,可以更改源码替换之。

Python
1
https://gitee.com/ainilili/domain-crawling.git
git@gitee.com:ainilili/domain-crawling.git
ainilili
domain-crawling
domain-crawling
master

搜索帮助