forked from wgpsec/ENScan_GO
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
13 changed files
with
218 additions
and
81 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,47 +1,50 @@ | ||
|
||
# ENScan_GO | ||
|
||
ENScanGo 是现有开源项目 [ENScan](https://github.com/wgpsec/ENScan) 的GO升级版本 | ||
|
||
**仅用于学习参考,请勿遵守相关法律规定** | ||
|
||
![](https://shields.io/badge/Go-1.17-green?logo=go) | ||
|
||
|
||
|
||
<p align="center"> | ||
<a href="https://github.com/wgpsec/ENScan_GO"> | ||
<img src="README/logo.png" alt="Logo" width="80" height="80"> | ||
</a> | ||
|
||
<h3 align="center">ENScan的Go版本实现</h3> | ||
<h3 align="center">ENScan Go</h3> | ||
<p align="center"> | ||
解决遇到的各种针对国内企业信息收集难题 | ||
<br /> | ||
<a href="https://github.com/wgpsec/ENScan_GO"><strong>探索更多Tricks »</strong></a> | ||
剑指HW/SRC,解决在HW/SRC场景下遇到的各种针对国内企业信息收集难题 | ||
<br /> | ||
<br /> | ||
<a href="https://github.com/wgpsec/ENScan_GO/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/wgpsec/ENScan_GO"/></a> | ||
<a href="https://github.com/wgpsec/ENScan_GO/releases"><img alt="GitHub releases" src="https://img.shields.io/github/release/wgpsec/ENScan_GO"/></a> | ||
<a href="https://github.com/wgpsec/ENScan_GO/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"/></a> | ||
<a href="https://github.com/wgpsec/ENScan_GO/releases"><img alt="Downloads" src="https://img.shields.io/github/downloads/wgpsec/ENScan_GO/total?color=brightgreen"/></a> | ||
<a href="https://goreportcard.com/report/github.com/wgpsec/ENScan_GO"><img alt="Go Report Card" src="https://goreportcard.com/badge/github.com/wgpsec/ENScan_GO"/></a> | ||
<a href="https://twitter.com/wgpsec"><img alt="Twitter" src="https://img.shields.io/twitter/follow/wgpsec?label=Followers&style=social" /></a> | ||
<br> | ||
<br> | ||
<a href="https://github.com/wgpsec/ENScan_GO/discussions"><strong>探索更多Tricks »</strong></a> | ||
<br/> | ||
<br /> | ||
<a href="https://github.com/wgpsec/ENScan_GO/releases">下载可执行文件</a> | ||
· | ||
<a href="https://github.com/wgpsec/ENScan_GO/issues">反馈Bug</a> | ||
· | ||
<a href="https://github.com/wgpsec/ENScan_GO/issues">提交需求</a> | ||
<a href="https://github.com/wgpsec/ENScan_GO/discussions">提交需求</a> | ||
</p> | ||
|
||
**使用本程序可能导致账号被封,请谨慎操作** | ||
|
||
|
||
## 功能列表 | ||
|
||
**使用程序可能导致账号被封,仅用于信息收集用途,请勿用于非法用途** | ||
|
||
### 功能列表 | ||
![ENScanGo](README/ENScanGo.png) | ||
|
||
- 使用支持以下API,并支持合并数据导出 | ||
- 爱企查 | ||
- 爱企查 (未登陆信息带*) | ||
- 天眼查 | ||
- 阿拉丁 | ||
- 酷安 | ||
- 酷安市场 | ||
- 七麦数据 | ||
|
||
- 站长之家 | ||
- veryvp | ||
- 查询信息 | ||
- ICP备案 | ||
- APP | ||
|
@@ -55,119 +58,253 @@ ENScanGo 是现有开源项目 [ENScan](https://github.com/wgpsec/ENScan) 的GO | |
- ... | ||
- 通过APK市场收集使用信息 | ||
|
||
### 使用指南 | ||
|
||
命令行参数如下 | ||
|
||
## 使用指南 | ||
|
||
ENScanGo在第一次使用时需要使用 -v 命令 生成配置文件信息 | ||
|
||
Cookie信息请勿直接 `document.cookie`,可能因为http-only 选项无法复制全导致登陆失败 | ||
|
||
![image-20221028223835307](README/image-20221028223835307.png) | ||
|
||
### 快速使用 | ||
|
||
**默认公司信息** (网站备案, 微博, 微信公众号, app) | ||
|
||
``` | ||
-branch 查询分支机构(分公司)信息 | ||
-delay int 每个请求延迟(S)-1为随机延迟1-5S (default 1) | ||
-f string 包含公司关键词的文件一行一个 | ||
-field string 获取字段信息 eg website | ||
-i string 公司ID(根据你查询的type不同ID不同) | ||
-invest int 投资比例 eg 100 | ||
-invest-rd 投资比例不明确(可能不是完全控股) | ||
-is-branch 查询分支机构(分公司)详细信息ICP备案APP等 | ||
-is-debug 是否显示debug详细信息 | ||
-is-group 查询集团信息 | ||
-is-merge 是否合并导出 | ||
-is-pid 批量查询文件是否为PID | ||
-n string 公司名称关键词 eg 小米 | ||
-o string 结果输出的文件夹位置(可选) | ||
-type string 收集渠道信息(默认爱企查)eg qcc (default "aqc") all为收集全部 | ||
-v 版本信息 | ||
./enscan -n 小米 | ||
``` | ||
|
||
字段支持: | ||
**对外投资占股100%的公司 获取孙公司(深度2)** | ||
|
||
``` | ||
"icp", "weibo", "wechat", "app", "weibo", "job", "wp", "copyright" | ||
v0.0.4 开始 website已改为icp!!! | ||
./enscan -n 小米 -invest 100 -deep 2 | ||
``` | ||
|
||
#### 快速使用 | ||
**组合筛选** | ||
|
||
首先需要生成配置文件,在目录下会生成 `config.yaml` 的配置文件 | ||
大于51%控股公司、供应商、分支机构,只要ICP备案信息,并且批量获取邮箱信息 | ||
|
||
```shell | ||
./ENScanPublic_amd64_linux -v | ||
``` | ||
./enscan -n 小米 -field icp --hold --supplier --branch --email | ||
``` | ||
|
||
配置信息如下 | ||
**使用不同渠道** | ||
|
||
```yaml | ||
version: 0.1 # 请勿修改版本号! | ||
common: | ||
output: "" # 导出文件位置 | ||
field: [ ] # 查询字段 如["website"] | ||
cookies: | ||
aiqicha: '' # 爱企查 Cookie | ||
tianyancha: '' # 天眼查 Cookie | ||
qcc: '' # 企查查 Cookie | ||
aldzs: '' # 阿拉神灯 Token | ||
xlb: '' # 小蓝本 Token | ||
使用天眼查数据源(或可设定为 all 组合多个数据源) | ||
|
||
``` | ||
./enscan -n 小米 -type tyc | ||
``` | ||
|
||
生成配置文件之后即可开始信息收集 | ||
使用多数据源一起收集(暂不支持多渠道+筛选) | ||
|
||
Eg:快速收集小米相关信息 默认收集:企业基本信息、微博、ICP备案、APP、微信公众号 | ||
``` | ||
./enscan -n 小米 -type aqc,chinaz,qimai,coolapk | ||
``` | ||
|
||
### 选项说明 | ||
|
||
#### **field 获取字段** | ||
|
||
使用参数 `field`指定需要查询的信息,可指定多参数一起查询,方便快速收集 | ||
|
||
``` | ||
-n 小米 -field icp,app | ||
``` | ||
|
||
支持以下参数 | ||
|
||
```shell | ||
./ENScanPublic_amd64_linux -n 小米 | ||
- `icp` 网站备案信息 | ||
- `weibo` 微博 | ||
- `wechat` 微信公众号 | ||
- `app` 应用信息 | ||
- `job` 招聘信息 | ||
- `wx_app` 微信小程序 | ||
- `copyright` 软件著作权 | ||
- `supplier` 供应商信息(通过招标书确定) | ||
|
||
#### **type 获取字段** | ||
|
||
使用参数 `type`可以指定需要API数据源 | ||
|
||
``` | ||
-n 小米 -type tyc | ||
``` | ||
|
||
![image-20220106220045213](README/image-20220106220045213.png) | ||
- `aqc` 爱企查 | ||
- `tyc` 天眼查 | ||
- `all` 全部查询 | ||
- `aldzs` 阿拉丁 (仅小程序) | ||
- `coolapk` 酷安市场 (仅APP) | ||
- `qimai` 七麦数据(仅APP) | ||
- `chinaz` 站长之家(仅ICP备案) | ||
|
||
#### 完整参数 | ||
|
||
| 参数 | 样例 | 说明 | | ||
| ----------------- | -------------- | -------------------------------------- | | ||
| -n | 小米 | 关键词 | | ||
| -i | 29453261288626 | 公司PID(自动识别类型) | | ||
| -f | file.txt | 批量查询,文本按行分隔(可选PID模式) | | ||
| -type | aqc | API类型 | | ||
| -o | | 结果输出的文件夹位置(可选) | | ||
| -is-merge | | 合并导出 | | ||
| -invest | | 投资比例 | | ||
| -field | icp | 获取字段信息 | | ||
| -deep | 1 | 递归搜索n层公司 | | ||
| -hold | | 是否查询控股公司 | | ||
| -supplier | | 是否查询供应商信息 | | ||
| -branch | | 查询分支机构(分公司)信息 | | ||
| -is-branch | | 深度查询分支机构信息(数量巨大) | | ||
| -api | | 是否API模式 | | ||
| -client | | 客户端模式通道 | | ||
| -debug | | 是否显示debug详细信息 | | ||
| -is-show | | 是否展示信息输出 | | ||
| -uncertain-invest | | 包括未公示投资公司(无法确定占股比例) | | ||
| -is-group | | 查询关键词为集团 | | ||
| -is-pid | | 批量查询文件是否为公司PID | | ||
| -delay | | 每个请求延迟(S)-1为随机延迟1-5S | | ||
| -proxy | | 设置代理 | | ||
| -timeout | | 每个请求默认1(分钟)超时 | | ||
| -no-merge | | 批量查询【取消】合并导出 | | ||
| -v | | 版本信息 | | ||
| -email | | 获取email信息 | | ||
|
||
### API模式 | ||
|
||
ENScanGo可使用API模式进行分布式部署,搭建API服务构建资产处理 | ||
|
||
你可能会遇到如下情况,需要填写Cookie 以爱企查(默认收集源)为例 | ||
使用`rmq`作为任务队列组件,在redis存入任务信息,可分部署部署。数据可存储至mongodb进行调用分析。 | ||
|
||
打开 aiqicha.baidu.com | ||
**api调用效果(前端开发中)** | ||
|
||
![image-20220106220211277](README/image-20220106220211277.png) | ||
![image-20221028231744940](README/image-20221028231744940.png) | ||
|
||
通过滑动验证后可以正常打开网站,在console(控制台)输入 `console.log(document.cookie)` 或其他方式获取全部Cookie并粘贴至配置文件 `''`中 | ||
![image-20221028231815437](README/image-20221028231815437.png) | ||
|
||
![image-20220106220402445](README/image-20220106220402445.png) | ||
![image-20221028231831102](README/image-20221028231831102.png) | ||
|
||
这时候再重复命令即可查看到结果,注意如果信息中含有 `*`,你需要登陆后获取Cookie才能去除`*`信息 | ||
![image-20221028232013627](README/image-20221028232013627.png) | ||
|
||
![image-20220106220603809](README/image-20220106220603809.png) | ||
#### API说明 | ||
|
||
[![asciicast](https://asciinema.org/a/460250.svg)](https://asciinema.org/a/460250) | ||
在获取信息的内容在数据库内不存在时,会自动添加队列任务收集相关信息 | ||
|
||
![image-20220106224656577](README/image-20220106224656577.png) | ||
**状态信息** | ||
|
||
### 场景使用 | ||
返回当前系统状态信息 | ||
|
||
#### 只想获取备案信息 | ||
``` | ||
GET /status | ||
``` | ||
|
||
**获取信息** | ||
|
||
```shell | ||
./ENScanPublic_amd64_linux -n 小米 -field icp | ||
``` | ||
GET /api/info?search=小米&invest=100&branch=true | ||
``` | ||
|
||
| 参数 | 参数 | 说明 | | ||
| --------- | -------------------- | -------------------------- | | ||
| orgname | 文本 | 完整公司名称(二选一) | | ||
| search | 文本 | 模糊匹配公司名称(二选一) | | ||
| type | 文本,与命令参数一致 | 数据源 | | ||
| field | 文本,与命令参数一致 | 筛选指定信息 | | ||
| duplicate | true | 加上参数去重 | | ||
| depth | 数字 | 爬取几层公司 如 2 为孙公司 | | ||
| invest | 数字 | 筛选投资比例 | | ||
| holds | true | 筛选控股公司 | | ||
| supplier | true | 筛选供应商信息 | | ||
| branch | true | 筛选分支信息 | | ||
| output | true | 为true导出excel表格 | | ||
|
||
[![asciicast](https://asciinema.org/a/460252.svg)](https://asciinema.org/a/460252) | ||
**股权穿透** | ||
|
||
#### 获取占股100的子公司下所有ICP备案网站 | ||
返回投资、股东关联信息 | ||
|
||
``` | ||
./ENScanPublic_amd64_linux -n 小米通讯 -invest-num 100 -field icp | ||
GET /api/stockchart | ||
``` | ||
|
||
![image-20220106224603776](README/image-20220106224603776.png) | ||
| 参数 | 参数 | 说明 | | ||
| --------- | ---- | ---------------- | | ||
| orgname | 文本 | 完整公司名称 | | ||
| search | 文本 | 模糊匹配公司信息 | | ||
| duplicate | true | 是否去重 | | ||
|
||
[![asciicast](https://asciinema.org/a/460255.svg)](https://asciinema.org/a/460255) | ||
**添加获取任务** | ||
|
||
#### 使用天眼查数据源 | ||
添加新的任务信息 | ||
|
||
``` | ||
./ENScanPublic_amd64_linux -n 小米 -type tyc | ||
POST /api/info | ||
``` | ||
|
||
| 参数 | 参数 | 说明 | | ||
| --------- | -------------------- | ------------ | | ||
| orgname | 文本 | 完整公司名称 | | ||
| update | true | 是否更新 | | ||
| type | 文本,与命令参数一致 | 数据源 | | ||
| invest_rd | true | 不确定投资 | | ||
| branch | true | 获取分支信息 | | ||
| field | 文本,与命令参数一致 | 筛选字段 | | ||
| invest | 数字 | 投资信息 | | ||
|
||
#### 启动部署 | ||
|
||
首先我们需要对配置文件进行修改,加入数据库连接信息,与common同级加入以下配置 | ||
|
||
```yaml | ||
api: | ||
server: "127.0.0.1" # redis地址 | ||
mongodb: "mongodb://user:[email protected]:27017" # mongodb 连接信息 | ||
redis: "redis_password" # redis 密码 | ||
port: "8080" # 启动API端口 | ||
``` | ||
### 交流 | ||
**API模式** | ||
启动API模式将在配置端口监听,并启动api服务,可通过api服务进行调用读取数据 | ||
在此场景下无需配置cookie信息 | ||
``` | ||
./enscan --api | ||
``` | ||
|
||
**客户端模式** | ||
|
||
可作为部署节点,读取任务队列自动读取信息写入数据库 | ||
|
||
``` | ||
./enscan --client | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
## 交流&反馈 | ||
|
||
关注公众号 `WgpSec狼组安全团队` 回复`加群`一起交流~ | ||
|
||
![](https://assets.wgpsec.org/www/images/wechat.png) | ||
|
||
[![Stargazers over time](https://starchart.cc/wgpsec/ENScan_GO.svg)](https://starchart.cc/wgpsec/ENScan_GO) | ||
|
||
|
||
|
||
## 404星链计划 | ||
|
||
<img src="https://github.com/knownsec/404StarLink/raw/master/Images/logo.png" width="30%"> | ||
|
||
ENScanGo 现已加入 [404星链计划](https://github.com/knownsec/404StarLink) | ||
|
||
|
||
|
||
## JetBrains OS licenses | ||
``ENScanGo`` had been being developed with `GoLand` IDE under the **free JetBrains Open Source license(s)** granted by JetBrains s.r.o., hence I would like to express my thanks here. | ||
|
||
<a href="https://www.jetbrains.com/?from=wgpsec" target="_blank"><img src="https://raw.githubusercontent.com/wgpsec/.github/master/jetbrains/jetbrains-variant-4.png" width="256" align="middle"/></a> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.