mirror of https://github.com/daffainfo/nuclei.git
commit
5b22ca8424
|
@ -18,7 +18,7 @@ jobs:
|
|||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
os: [ubuntu-latest-16-cores, windows-latest-8-cores, macOS-12]
|
||||
steps:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.19
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ jobs:
|
|||
runs-on: ubuntu-latest-16-cores
|
||||
steps:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.19
|
||||
- name: Checkout code
|
||||
|
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
fetch-depth: 0
|
||||
|
||||
- name: "Set up Go"
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.19
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-go@v3
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.19
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ jobs:
|
|||
runs-on: ubuntu-latest-16-cores
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.19
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ Polling for interactions and server registration only starts when a template use
|
|||
|
||||
Next we arrive in the `RunEnumeration` function of the runner.
|
||||
|
||||
`HostErrorsCache` is initialised which is used throughout the run of Nuclei enumeration to keep track of errors per host and skip further requests if the errors are greater than the provided threshold. The functionality for the error tracking cache is defined in [hosterrorscache.go](https://github.com/projectdiscovery/nuclei/blob/master/v2/pkg/protocols/common/hosterrorscache/hosterrorscache.go) and is pretty simplistic in nature.
|
||||
`HostErrorsCache` is initialised which is used throughout the run of Nuclei enumeration to keep track of errors per host and skip further requests if the errors are greater than the provided threshold. The functionality for the error tracking cache is defined in [hosterrorscache.go](https://github.com/projectdiscovery/nuclei/blob/main/v2/pkg/protocols/common/hosterrorscache/hosterrorscache.go) and is pretty simplistic in nature.
|
||||
|
||||
Next the `WorkflowLoader` is initialised which used to load workflows. It exists in `v2/pkg/parsers/workflow_loader.go`
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Build
|
||||
FROM golang:1.20.1-alpine AS build-env
|
||||
FROM golang:1.20.2-alpine AS build-env
|
||||
RUN apk add build-base
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
|
|
13
README.md
13
README.md
|
@ -29,10 +29,10 @@
|
|||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/master/README.md">English</a> •
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/master/README_CN.md">中文</a> •
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/master/README_KR.md">Korean</a> •
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/master/README_ID.md">Indonesia</a>
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/main/README.md">English</a> •
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/main/README_CN.md">中文</a> •
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/main/README_KR.md">Korean</a> •
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/main/README_ID.md">Indonesia</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
@ -153,7 +153,7 @@ OUTPUT:
|
|||
-srd, -store-resp-dir string store all request/response passed through nuclei to custom directory (default "output")
|
||||
-silent display findings only
|
||||
-nc, -no-color disable output content coloring (ANSI escape codes)
|
||||
-json write output in JSONL(ines) format
|
||||
-j -jsonl write output in JSONL(ines) format
|
||||
-irr, -include-rr include request/response pairs in the JSONL output (for findings only)
|
||||
-nm, -no-meta disable printing result metadata in cli output
|
||||
-ts, -timestamp enables printing timestamp in cli output
|
||||
|
@ -161,6 +161,7 @@ OUTPUT:
|
|||
-ms, -matcher-status display match failure status
|
||||
-me, -markdown-export string directory to export results in markdown format
|
||||
-se, -sarif-export string file to export results in SARIF format
|
||||
-je, -json-export string file to export results in JSON format as a JSON array. This can be memory intensive in larger scans.
|
||||
|
||||
CONFIGURATIONS:
|
||||
-config string path to the nuclei configuration file
|
||||
|
@ -428,7 +429,7 @@ Do also check out the below similar open-source projects that may fit in your wo
|
|||
|
||||
### License
|
||||
|
||||
Nuclei is distributed under [MIT License](https://github.com/projectdiscovery/nuclei/blob/master/LICENSE.md)
|
||||
Nuclei is distributed under [MIT License](https://github.com/projectdiscovery/nuclei/blob/main/LICENSE.md)
|
||||
|
||||
<h1 align="left">
|
||||
<a href="https://discord.gg/projectdiscovery"><img src="static/Join-Discord.png" width="380" alt="Join Discord"></a> <a href="https://nuclei.projectdiscovery.io"><img src="static/check-nuclei-documentation.png" width="380" alt="Check Nuclei Documentation"></a>
|
||||
|
|
10
README_CN.md
10
README_CN.md
|
@ -29,9 +29,9 @@
|
|||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/master/README.md">English</a> •
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/master/README_CN.md">中文</a> •
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/master/README_KR.md">Korean</a>
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/main/README.md">English</a> •
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/main/README_CN.md">中文</a> •
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/main/README_KR.md">Korean</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
@ -132,7 +132,7 @@ Nuclei是一款注重于可配置性、可扩展性和易用性的基于模板
|
|||
-srd, -store-resp-dir string 将nuclei的所有请求和响应输出到指定目录(默认:output)
|
||||
-silent 只显示结果
|
||||
-nc, -no-color 禁用输出内容着色(ANSI转义码)
|
||||
-json 输出为jsonL(ines)
|
||||
-j, -jsonl 输出为jsonL(ines)
|
||||
-irr, -include-rr 在JSONL中输出对应的请求和相应(仅结果)
|
||||
-nm, -no-meta 不显示匹配的元数据
|
||||
-nts, -no-timestamp 不在输出中显示时间戳
|
||||
|
@ -349,7 +349,7 @@ Nuclei构建很简单,通过数百名安全研究员的社区模板,Nuclei
|
|||
|
||||
### 许可证
|
||||
|
||||
Nuclei使用[MIT许可证](https://github.com/projectdiscovery/nuclei/blob/master/LICENSE.md)
|
||||
Nuclei使用[MIT许可证](https://github.com/projectdiscovery/nuclei/blob/main/LICENSE.md)
|
||||
|
||||
<h1 align="left">
|
||||
<a href="https://discord.gg/projectdiscovery"><img src="static/Join-Discord.png" width="380" alt="Join Discord"></a> <a href="https://nuclei.projectdiscovery.io"><img src="static/check-nuclei-documentation.png" width="380" alt="Check Nuclei Documentation"></a>
|
||||
|
|
13
README_ID.md
13
README_ID.md
|
@ -29,10 +29,10 @@
|
|||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/master/README.md">English</a> •
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/master/README_CN.md">中文</a> •
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/master/README_KR.md">Korean</a> •
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/master/README_ID.md">Indonesia</a>
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/main/README.md">English</a> •
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/main/README_CN.md">中文</a> •
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/main/README_KR.md">Korean</a> •
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/main/README_ID.md">Indonesia</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
@ -132,7 +132,7 @@ OUTPUT:
|
|||
-srd, -store-resp-dir string store all request/response passed through nuclei to custom directory (default "output")
|
||||
-silent display findings only
|
||||
-nc, -no-color disable output content coloring (ANSI escape codes)
|
||||
-json write output in JSONL(ines) format
|
||||
-j, -jsonl write output in JSONL(ines) format
|
||||
-irr, -include-rr include request/response pairs in the JSONL output (for findings only)
|
||||
-nm, -no-meta disable printing result metadata in cli output
|
||||
-nts, -no-timestamp disable printing timestamp in cli output
|
||||
|
@ -140,6 +140,7 @@ OUTPUT:
|
|||
-ms, -matcher-status display match failure status
|
||||
-me, -markdown-export string directory to export results in markdown format
|
||||
-se, -sarif-export string file to export results in SARIF format
|
||||
-je, -json-export string file to export results in JSON format as a JSON array. This can be memory intensive in larger scans.
|
||||
|
||||
CONFIGURATIONS:
|
||||
-config string path to the nuclei configuration file
|
||||
|
@ -349,7 +350,7 @@ Terima kasih kepada semua komunitas yang luar biasa yang [berkontribusi untuk me
|
|||
|
||||
### Lisensi
|
||||
|
||||
Nuclei didistribusikan di bawah [Lisensi MIT](https://github.com/projectdiscovery/nuclei/blob/master/LICENSE.md)
|
||||
Nuclei didistribusikan di bawah [Lisensi MIT](https://github.com/projectdiscovery/nuclei/blob/main/LICENSE.md)
|
||||
|
||||
<h1 align="left">
|
||||
<a href="https://discord.gg/projectdiscovery"><img src="static/Join-Discord.png" width="380" alt="Join Discord"></a> <a href="https://nuclei.projectdiscovery.io"><img src="static/check-nuclei-documentation.png" width="380" alt="Cek Dokumentasi Nuclei"></a>
|
||||
|
|
10
README_KR.md
10
README_KR.md
|
@ -28,9 +28,9 @@
|
|||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/master/README.md">English</a> •
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/master/README_CN.md">中文</a> •
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/master/README_KR.md">한국어</a>
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/main/README.md">English</a> •
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/main/README_CN.md">中文</a> •
|
||||
<a href="https://github.com/projectdiscovery/nuclei/blob/main/README_KR.md">한국어</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
@ -128,7 +128,7 @@ OUTPUT:
|
|||
-srd, -store-resp-dir string nuclei을 통해 전달된 모든 요청/응답을 사용자 지정 디렉터리에 저장(기본 "output")
|
||||
-silent 결과만 표시
|
||||
-nc, -no-color 출력 내용 색상 비활성화 (ANSI escape codes)
|
||||
-json JSONL(ines) 형식으로 출력
|
||||
-j, -jsonl JSONL(ines) 형식으로 출력
|
||||
-irr, -include-rr JSONL 출력에 요청/응답 쌍 포함(결과만)
|
||||
-nm, -no-meta cli 출력에서 결과 메타데이터 출력 비활성화
|
||||
-nts, -no-timestamp cli 출력에서 결과 타임스탬프 출력 비활성화
|
||||
|
@ -340,7 +340,7 @@ Thanks to all the amazing community [contributors for sending PRs](https://githu
|
|||
|
||||
### License
|
||||
|
||||
Nuclei is distributed under [MIT License](https://github.com/projectdiscovery/nuclei/blob/master/LICENSE.md)
|
||||
Nuclei is distributed under [MIT License](https://github.com/projectdiscovery/nuclei/blob/main/LICENSE.md)
|
||||
|
||||
<h1 align="left">
|
||||
<a href="https://discord.gg/projectdiscovery"><img src="static/Join-Discord.png" width="380" alt="Join Discord"></a> <a href="https://nuclei.projectdiscovery.io"><img src="static/check-nuclei-documentation.png" width="380" alt="Check Nuclei Documentation"></a>
|
||||
|
|
|
@ -80,6 +80,7 @@ info:
|
|||
<div class="dt">
|
||||
|
||||
Requests contains the http request to make in the template.
|
||||
WARNING: 'requests' will be deprecated and will be removed in a future release. Please use 'http' instead.
|
||||
|
||||
|
||||
|
||||
|
@ -107,6 +108,23 @@ requests:
|
|||
```
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="dd">
|
||||
|
||||
<code>http</code> <i>[]<a href="#httprequest">http.Request</a></i>
|
||||
|
||||
</div>
|
||||
<div class="dt">
|
||||
|
||||
description: |
|
||||
HTTP contains the http request to make in the template.
|
||||
examples:
|
||||
- value: exampleNormalHTTPRequest
|
||||
RequestsWithHTTP is placeholder(internal) only, and should not be used instead use RequestsHTTP
|
||||
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
@ -183,6 +201,7 @@ file:
|
|||
<div class="dt">
|
||||
|
||||
Network contains the network request to make in the template
|
||||
WARNING: 'network' will be deprecated and will be removed in a future release. Please use 'tcp' instead.
|
||||
|
||||
|
||||
|
||||
|
@ -204,6 +223,23 @@ network:
|
|||
```
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="dd">
|
||||
|
||||
<code>tcp</code> <i>[]<a href="#networkrequest">network.Request</a></i>
|
||||
|
||||
</div>
|
||||
<div class="dt">
|
||||
|
||||
description: |
|
||||
TCP contains the network request to make in the template
|
||||
examples:
|
||||
- value: exampleNormalNetworkRequest
|
||||
RequestsWithTCP is placeholder(internal) only, and should not be used instead use RequestsNetwork
|
||||
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
@ -759,6 +795,52 @@ cvss-score: "9.8"
|
|||
|
||||
<hr />
|
||||
|
||||
<div class="dd">
|
||||
|
||||
<code>epss-score</code> <i>float64</i>
|
||||
|
||||
</div>
|
||||
<div class="dt">
|
||||
|
||||
EPSS Score for the template.
|
||||
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
|
||||
```yaml
|
||||
epss-score: "0.42509"
|
||||
```
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="dd">
|
||||
|
||||
<code>cpe</code> <i>string</i>
|
||||
|
||||
</div>
|
||||
<div class="dt">
|
||||
|
||||
CPE for the template.
|
||||
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
|
||||
```yaml
|
||||
cpe: cpe:/a:vendor:product:version
|
||||
```
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -771,6 +853,8 @@ Appears in:
|
|||
|
||||
- <code><a href="#template">Template</a>.requests</code>
|
||||
|
||||
- <code><a href="#template">Template</a>.http</code>
|
||||
|
||||
|
||||
```yaml
|
||||
matchers:
|
||||
|
@ -2108,6 +2192,8 @@ Appears in:
|
|||
|
||||
- <code><a href="#template">Template</a>.network</code>
|
||||
|
||||
- <code><a href="#template">Template</a>.tcp</code>
|
||||
|
||||
|
||||
```yaml
|
||||
host:
|
||||
|
@ -2607,7 +2693,7 @@ Name is the name assigned to the headless action.
|
|||
|
||||
This can be used to execute code, for instance in browser
|
||||
DOM using script action, and get the result in a variable
|
||||
which can be matched upon by nuclei. An Example template [here](https://github.com/projectdiscovery/nuclei-templates/blob/master/headless/prototype-pollution-check.yaml).
|
||||
which can be matched upon by nuclei. An Example template [here](https://github.com/projectdiscovery/nuclei-templates/blob/main/headless/prototype-pollution-check.yaml).
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -26,6 +26,19 @@
|
|||
"type": "number",
|
||||
"title": "cvss score for the template",
|
||||
"description": "CVSS Score for the template"
|
||||
},
|
||||
"epss-score": {
|
||||
"type": "number",
|
||||
"title": "epss score for the template",
|
||||
"description": "EPSS Score for the template"
|
||||
},
|
||||
"cpe": {
|
||||
"type": "string",
|
||||
"title": "cpe for the template",
|
||||
"description": "CPE for the template",
|
||||
"examples": [
|
||||
"cpe:/a:vendor:product:version"
|
||||
]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
@ -1331,6 +1344,14 @@
|
|||
"title": "http requests to make",
|
||||
"description": "HTTP requests to make for the template"
|
||||
},
|
||||
"http": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/http.Request"
|
||||
},
|
||||
"type": "array",
|
||||
"title": "http requests to make",
|
||||
"description": "HTTP requests to make for the template"
|
||||
},
|
||||
"dns": {
|
||||
"items": {
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
|
@ -1358,6 +1379,14 @@
|
|||
"title": "network requests to make",
|
||||
"description": "Network requests to make for the template"
|
||||
},
|
||||
"tcp": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/network.Request"
|
||||
},
|
||||
"type": "array",
|
||||
"title": "network(tcp) requests to make",
|
||||
"description": "Network requests to make for the template"
|
||||
},
|
||||
"headless": {
|
||||
"items": {
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
|
|
|
@ -50,8 +50,23 @@
|
|||
# # issue-type is the name of the created issue type (case sensitive)
|
||||
# issue-type: Bug
|
||||
# # SeverityAsLabel (optional) sends the severity as the label of the created issue
|
||||
# # User custom fields for Jira Cloud instead
|
||||
# severity-as-label: true
|
||||
#
|
||||
# # Whatever your final status is that you want to use as a closed ticket - Closed, Done, Remediated, etc
|
||||
# # When checking for duplicates, the JQL query will filter out status's that match this.
|
||||
# # If it finds a match _and_ the ticket does have this status, a new one will be created.
|
||||
# status-not: Closed
|
||||
# # Customfield supports name, id and freeform. name and id are to be used when the custom field is a dropdown.
|
||||
# # freeform can be used if the custom field is just a text entry
|
||||
# # Variables can be used to pull various pieces of data from the finding itself.
|
||||
# # Supported variables: $CVSSMetrics, $CVEID, $CWEID, $Host, $Severity, $CVSSScore, $Name
|
||||
# custom-fields:
|
||||
# customfield_00001:
|
||||
# name: "Nuclei"
|
||||
# customfield_00002:
|
||||
# freeform: $CVSSMetrics
|
||||
# customfield_00003:
|
||||
# freeform: $CVSSScore
|
||||
# elasticsearch contains configuration options for elasticsearch exporter
|
||||
#elasticsearch:
|
||||
# # IP for elasticsearch instance
|
||||
|
|
|
@ -172,7 +172,7 @@ on extensive configurability, massive extensibility and ease of use.`)
|
|||
flagSet.StringVarP(&options.StoreResponseDir, "store-resp-dir", "srd", runner.DefaultDumpTrafficOutputFolder, "store all request/response passed through nuclei to custom directory"),
|
||||
flagSet.BoolVar(&options.Silent, "silent", false, "display findings only"),
|
||||
flagSet.BoolVarP(&options.NoColor, "no-color", "nc", false, "disable output content coloring (ANSI escape codes)"),
|
||||
flagSet.BoolVar(&options.JSON, "json", false, "write output in JSONL(ines) format"),
|
||||
flagSet.BoolVarP(&options.JSONL, "jsonl", "j", false, "write output in JSONL(ines) format"),
|
||||
flagSet.BoolVarP(&options.JSONRequests, "include-rr", "irr", false, "include request/response pairs in the JSONL output (for findings only)"),
|
||||
flagSet.BoolVarP(&options.NoMeta, "no-meta", "nm", false, "disable printing result metadata in cli output"),
|
||||
flagSet.BoolVarP(&options.Timestamp, "timestamp", "ts", false, "enables printing timestamp in cli output"),
|
||||
|
@ -180,6 +180,7 @@ on extensive configurability, massive extensibility and ease of use.`)
|
|||
flagSet.BoolVarP(&options.MatcherStatus, "matcher-status", "ms", false, "display match failure status"),
|
||||
flagSet.StringVarP(&options.MarkdownExportDirectory, "markdown-export", "me", "", "directory to export results in markdown format"),
|
||||
flagSet.StringVarP(&options.SarifExport, "sarif-export", "se", "", "file to export results in SARIF format"),
|
||||
flagSet.StringVarP(&options.JSONExport, "json-export", "je", "", "file to export results in JSON format"),
|
||||
)
|
||||
|
||||
flagSet.CreateGroup("configs", "Configurations",
|
||||
|
|
71
v2/go.mod
71
v2/go.mod
|
@ -25,23 +25,23 @@ require (
|
|||
github.com/pkg/errors v0.9.1
|
||||
github.com/projectdiscovery/clistats v0.0.12
|
||||
github.com/projectdiscovery/fastdialer v0.0.24
|
||||
github.com/projectdiscovery/hmap v0.0.10
|
||||
github.com/projectdiscovery/interactsh v1.1.0
|
||||
github.com/projectdiscovery/rawhttp v0.1.9
|
||||
github.com/projectdiscovery/hmap v0.0.11
|
||||
github.com/projectdiscovery/interactsh v1.1.2
|
||||
github.com/projectdiscovery/rawhttp v0.1.10
|
||||
github.com/projectdiscovery/retryabledns v1.0.21
|
||||
github.com/projectdiscovery/retryablehttp-go v1.0.13
|
||||
github.com/projectdiscovery/stringsutil v0.0.2
|
||||
github.com/projectdiscovery/stringsutil v0.0.2 // indirect
|
||||
github.com/projectdiscovery/yamldoc-go v1.0.4
|
||||
github.com/remeh/sizedwaitgroup v1.0.0
|
||||
github.com/rs/xid v1.4.0
|
||||
github.com/segmentio/ksuid v1.0.4
|
||||
github.com/shirou/gopsutil/v3 v3.22.12
|
||||
github.com/spaolacci/murmur3 v1.1.0
|
||||
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
||||
github.com/spf13/cast v1.5.0
|
||||
github.com/syndtr/goleveldb v1.0.0
|
||||
github.com/tj/go-update v2.2.5-0.20200519121640-62b4b798fd68+incompatible
|
||||
github.com/valyala/fasttemplate v1.2.2
|
||||
github.com/weppos/publicsuffix-go v0.20.0
|
||||
github.com/weppos/publicsuffix-go v0.30.0
|
||||
github.com/xanzy/go-gitlab v0.80.2
|
||||
go.uber.org/multierr v1.10.0
|
||||
golang.org/x/net v0.8.0
|
||||
|
@ -55,62 +55,74 @@ require (
|
|||
github.com/DataDog/gostackparse v0.6.0
|
||||
github.com/antchfx/xmlquery v1.3.15
|
||||
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
|
||||
github.com/aws/aws-sdk-go-v2 v1.17.5
|
||||
github.com/aws/aws-sdk-go-v2 v1.17.6
|
||||
github.com/aws/aws-sdk-go-v2/config v1.18.15
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.13.15
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.13.17
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.55
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.30.5
|
||||
github.com/docker/go-units v0.5.0
|
||||
github.com/fatih/structs v1.1.0
|
||||
github.com/go-git/go-git/v5 v5.5.2
|
||||
github.com/h2non/filetype v1.1.3
|
||||
github.com/hashicorp/go-version v1.6.0
|
||||
github.com/kataras/jwt v0.1.8
|
||||
github.com/klauspost/compress v1.16.0
|
||||
github.com/labstack/echo/v4 v4.10.2
|
||||
github.com/mholt/archiver v3.1.1+incompatible
|
||||
github.com/mitchellh/go-homedir v1.1.0
|
||||
github.com/projectdiscovery/dsl v0.0.5-0.20230328190851-15d12ab4c5e4
|
||||
github.com/projectdiscovery/fasttemplate v0.0.2
|
||||
github.com/projectdiscovery/goflags v0.1.8
|
||||
github.com/projectdiscovery/gologger v1.1.8
|
||||
github.com/projectdiscovery/httpx v1.2.7
|
||||
github.com/projectdiscovery/mapcidr v1.1.0
|
||||
github.com/projectdiscovery/httpx v1.2.9
|
||||
github.com/projectdiscovery/mapcidr v1.1.1
|
||||
github.com/projectdiscovery/nvd v1.0.9
|
||||
github.com/projectdiscovery/ratelimit v0.0.6
|
||||
github.com/projectdiscovery/rdap v0.9.1-0.20221108103045-9865884d1917
|
||||
github.com/projectdiscovery/sarif v0.0.1
|
||||
github.com/projectdiscovery/tlsx v1.0.6
|
||||
github.com/projectdiscovery/tlsx v1.0.6-0.20230328111908-f4528797e948
|
||||
github.com/projectdiscovery/uncover v1.0.2
|
||||
github.com/projectdiscovery/utils v0.0.16
|
||||
github.com/projectdiscovery/wappalyzergo v0.0.81
|
||||
github.com/projectdiscovery/utils v0.0.18
|
||||
github.com/projectdiscovery/wappalyzergo v0.0.88
|
||||
github.com/stretchr/testify v1.8.2
|
||||
gopkg.in/src-d/go-git.v4 v4.13.1
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
)
|
||||
|
||||
require (
|
||||
aead.dev/minisign v0.2.0 // indirect
|
||||
github.com/Masterminds/semver/v3 v3.2.0 // indirect
|
||||
github.com/VividCortex/ewma v1.2.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.21 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.24 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.23 // indirect
|
||||
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
|
||||
github.com/bits-and-blooms/bitset v1.3.1 // indirect
|
||||
github.com/bits-and-blooms/bloom/v3 v3.3.1 // indirect
|
||||
github.com/charmbracelet/glamour v0.6.0 // indirect
|
||||
github.com/cheggaaa/pb/v3 v3.1.2 // indirect
|
||||
github.com/cloudflare/cfssl v1.6.4-0.20221208165709-c5e40da60306 // indirect
|
||||
github.com/cloudflare/circl v1.1.0 // indirect
|
||||
github.com/dlclark/regexp2 v1.8.1 // indirect
|
||||
github.com/fatih/color v1.14.1 // indirect
|
||||
github.com/google/certificate-transparency-go v1.1.4 // indirect
|
||||
github.com/google/go-github/v30 v30.1.0 // indirect
|
||||
github.com/hashicorp/go-version v1.6.0 // indirect
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.1 // indirect
|
||||
github.com/hbakhtiyor/strsim v0.0.0-20190107154042-4d2bbb273edf // indirect
|
||||
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
||||
github.com/karlseguin/expect v1.0.8 // indirect
|
||||
github.com/mackerelio/go-osstat v0.2.3 // indirect
|
||||
github.com/kataras/jwt v0.1.8 // indirect
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
|
||||
github.com/mackerelio/go-osstat v0.2.4 // indirect
|
||||
github.com/minio/selfupdate v0.6.0 // indirect
|
||||
github.com/muesli/reflow v0.3.0 // indirect
|
||||
github.com/muesli/termenv v0.15.1 // indirect
|
||||
github.com/pjbgf/sha1cd v0.2.3 // indirect
|
||||
github.com/projectdiscovery/asnmap v1.0.2 // indirect
|
||||
github.com/projectdiscovery/cdncheck v0.0.4-0.20220413175814-b47bc2d578b1 // indirect
|
||||
github.com/projectdiscovery/freeport v0.0.4 // indirect
|
||||
github.com/skeema/knownhosts v1.1.0 // indirect
|
||||
github.com/smartystreets/goconvey v1.6.4 // indirect
|
||||
github.com/tidwall/btree v1.6.0 // indirect
|
||||
github.com/tidwall/buntdb v1.2.10 // indirect
|
||||
github.com/tidwall/gjson v1.14.4 // indirect
|
||||
|
@ -119,6 +131,8 @@ require (
|
|||
github.com/tidwall/pretty v1.2.1 // indirect
|
||||
github.com/tidwall/rtred v0.1.2 // indirect
|
||||
github.com/tidwall/tinyqueue v0.1.1 // indirect
|
||||
github.com/yuin/goldmark v1.5.4 // indirect
|
||||
github.com/yuin/goldmark-emoji v1.0.1 // indirect
|
||||
go.uber.org/atomic v1.10.0 // indirect
|
||||
gopkg.in/djherbis/times.v1 v1.3.0 // indirect
|
||||
)
|
||||
|
@ -174,13 +188,13 @@ require (
|
|||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
|
||||
github.com/projectdiscovery/blackrock v0.0.0-20221025011524-9e4efe804fb4 // indirect
|
||||
github.com/projectdiscovery/blackrock v0.0.0-20230328171319-f24b18d05b64 // indirect
|
||||
github.com/projectdiscovery/networkpolicy v0.0.4
|
||||
github.com/rivo/uniseg v0.4.4 // indirect
|
||||
github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d // indirect
|
||||
github.com/tklauser/go-sysconf v0.3.11 // indirect
|
||||
github.com/tklauser/numcpus v0.6.0 // indirect
|
||||
github.com/trivago/tgo v1.0.7 // indirect
|
||||
github.com/trivago/tgo v1.0.7
|
||||
github.com/ulikunitz/xz v0.5.11 // indirect
|
||||
github.com/ulule/deepcopier v0.0.0-20200430083143-45decc6639b6 // indirect
|
||||
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
||||
|
@ -195,7 +209,7 @@ require (
|
|||
go.uber.org/zap v1.24.0 // indirect
|
||||
goftp.io/server/v2 v2.0.0 // indirect
|
||||
golang.org/x/crypto v0.7.0
|
||||
golang.org/x/exp v0.0.0-20230310171629-522b1b587ee0
|
||||
golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0
|
||||
golang.org/x/mod v0.9.0 // indirect
|
||||
golang.org/x/sys v0.6.0 // indirect
|
||||
golang.org/x/time v0.3.0 // indirect
|
||||
|
@ -211,14 +225,14 @@ require (
|
|||
github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 // indirect
|
||||
github.com/acomagu/bufpipe v1.0.3 // indirect
|
||||
github.com/alecthomas/chroma v0.10.0
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.23 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.29 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.23 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.30 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.24 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.30 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.23 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.12.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.18.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.24 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.12.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.18.6 // indirect
|
||||
github.com/aws/smithy-go v1.13.5 // indirect
|
||||
github.com/emirpasic/gods v1.18.1 // indirect
|
||||
github.com/go-git/gcfg v1.5.0 // indirect
|
||||
|
@ -230,9 +244,8 @@ require (
|
|||
github.com/kevinburke/ssh_config v1.2.0 // indirect
|
||||
github.com/labstack/gommon v0.4.0 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/nwaples/rardecode v1.1.2 // indirect
|
||||
github.com/nwaples/rardecode v1.1.3 // indirect
|
||||
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
|
||||
github.com/projectdiscovery/fileutil v0.0.3
|
||||
github.com/projectdiscovery/iputil v0.0.2 // indirect
|
||||
github.com/sergi/go-diff v1.2.0 // indirect
|
||||
github.com/src-d/gcfg v1.4.0 // indirect
|
||||
|
|
131
v2/go.sum
131
v2/go.sum
|
@ -1,9 +1,13 @@
|
|||
aead.dev/minisign v0.2.0 h1:kAWrq/hBRu4AARY6AlciO83xhNnW9UaC8YipS2uhLPk=
|
||||
aead.dev/minisign v0.2.0/go.mod h1:zdq6LdSd9TbuSxchxwhpA9zEb9YXcVGoE8JakuiGaIQ=
|
||||
git.mills.io/prologic/smtpd v0.0.0-20210710122116-a525b76c287a h1:3i+FJ7IpSZHL+VAjtpQeZCRhrpP0odl5XfoLBY4fxJ8=
|
||||
git.mills.io/prologic/smtpd v0.0.0-20210710122116-a525b76c287a/go.mod h1:C7hXLmFmPYPjIDGfQl1clsmQ5TMEQfmzWTrJk475bUs=
|
||||
github.com/DataDog/gostackparse v0.6.0 h1:egCGQviIabPwsyoWpGvIBGrEnNWez35aEO7OJ1vBI4o=
|
||||
github.com/DataDog/gostackparse v0.6.0/go.mod h1:lTfqcJKqS9KnXQGnyQMCugq3u1FP6UZMfWR0aitKFMM=
|
||||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw=
|
||||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
|
||||
github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g=
|
||||
github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ=
|
||||
github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA=
|
||||
github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=
|
||||
github.com/Mzack9999/go-http-digest-auth-client v0.6.1-0.20220414142836-eb8883508809 h1:ZbFL+BDfBqegi+/Ssh7im5+aQfBRx6it+kHnC7jaDU8=
|
||||
|
@ -16,6 +20,8 @@ github.com/PuerkitoBio/goquery v1.6.0/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBK
|
|||
github.com/PuerkitoBio/goquery v1.8.1 h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAcwmWM=
|
||||
github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ=
|
||||
github.com/RumbleDiscovery/rumble-tools v0.0.0-20201105153123-f2adbb3244d2/go.mod h1:jD2+mU+E2SZUuAOHZvZj4xP4frlOo+N/YrXDvASFhkE=
|
||||
github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow=
|
||||
github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4=
|
||||
github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk=
|
||||
github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4=
|
||||
github.com/akrylysov/pogreb v0.10.1 h1:FqlR8VR7uCbJdfUob916tPM+idpKgeESDXOA1K0DK4w=
|
||||
|
@ -52,26 +58,30 @@ github.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy
|
|||
github.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys=
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
||||
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
|
||||
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
|
||||
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
|
||||
github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
||||
github.com/aws/aws-sdk-go-v2 v1.17.5 h1:TzCUW1Nq4H8Xscph5M/skINUitxM5UBAyvm2s7XBzL4=
|
||||
github.com/aws/aws-sdk-go-v2 v1.17.5/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw=
|
||||
github.com/aws/aws-sdk-go-v2 v1.17.6 h1:Y773UK7OBqhzi5VDXMi1zVGsoj+CVHs2eaC2bDsLwi0=
|
||||
github.com/aws/aws-sdk-go-v2 v1.17.6/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 h1:dK82zF6kkPeCo8J1e+tGx4JdvDIQzj7ygIoLg8WMuGs=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10/go.mod h1:VeTZetY5KRJLuD/7fkQXMU6Mw7H5m/KP2J5Iy9osMno=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.18.15 h1:509yMO0pJUGUugBP2H9FOFyV+7Mz7sRR+snfDN5W4NY=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.18.15/go.mod h1:vS0tddZqpE8cD9CyW0/kITHF5Bq2QasW9Y1DFHD//O0=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.13.15 h1:0rZQIi6deJFjOEgHI9HI2eZcLPPEGQPictX66oRFLL8=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.13.15/go.mod h1:vRMLMD3/rXU+o6j2MW5YefrGMBmdTvkLLGqFwMLBHQc=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.23 h1:Kbiv9PGnQfG/imNI4L/heyUXvzKmcWSBeDvkrQz5pFc=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.13.17 h1:IubQO/RNeIVKF5Jy77w/LfUvmmCxTnk2TP1UZZIMiF4=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.13.17/go.mod h1:K9xeFo1g/YPMguMUD69YpwB4Nyi6W/5wn706xIInJFg=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.23/go.mod h1:mOtmAg65GT1HIL/HT/PynwPbS+UG0BgCZ6vhkPqnxWo=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.0 h1:/2Cb3SK3xVOQA7Xfr5nCWCo5H3UiNINtsVvVdk8sQqA=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.0/go.mod h1:neYVaeKr5eT7BzwULuG2YbLhzWZ22lpjKdCybR7AXrQ=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.55 h1:ClZKHmu2QIRQCEQ2Y2upfu4JPO0pG69Ce5eiq3PS2V4=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.55/go.mod h1:L/h5B6I7reig2QJXCGY0e0NVx4hYCcjETmsfR02hFng=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.29 h1:9/aKwwus0TQxppPXFmf010DFrE+ssSbzroLVYINA+xE=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.29/go.mod h1:Dip3sIGv485+xerzVv24emnjX5Sg88utCL8fwGmCeWg=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.23 h1:b/Vn141DBuLVgXbhRWIrl9g+ww7G+ScV5SzniWR13jQ=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.30 h1:y+8n9AGDjikyXoMBTRaHHHSaFEB8267ykmvyPodJfys=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.30/go.mod h1:LUBAO3zNXQjoONBKn/kR1y0Q4cj/D02Ts0uHYjcCQLM=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.23/go.mod h1:mr6c4cHC+S/MMkrjtSlG4QA36kOznDep+0fga5L/fGQ=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.24 h1:r+Kv+SEJquhAZXaJ7G4u44cIwXV3f8K+N482NNAzJZA=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.24/go.mod h1:gAuCezX/gob6BSMbItsSlMb6WZGV7K2+fWOvk8xBSto=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.30 h1:IVx9L7YFhpPq0tTnGo8u8TpluFu7nAn9X3sUDMb11c0=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.30/go.mod h1:vsbq62AOBwQ1LJ/GWKFxX8beUEYeRp/Agitrxee2/qM=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.21 h1:QdxdY43AiwsqG/VAqHA7bIVSm3rKr8/p9i05ydA0/RM=
|
||||
|
@ -80,21 +90,28 @@ github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 h1:y2+VQzC
|
|||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11/go.mod h1:iV4q2hsqtNECrfmlXyord9u4zyuFEJX9eLgLpSPzWA8=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.24 h1:Qmm8klpAdkuN3/rPrIMa/hZQ1z93WMBPjOzdAsbSnlo=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.24/go.mod h1:QelGeWBVRh9PbbXsfXKTFlU9FjT6W2yP+dW5jMQzOkg=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.23 h1:QoOybhwRfciWUBbZ0gp9S7XaDnCuSTeK/fySB99V1ls=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.23/go.mod h1:9uPh+Hrz2Vn6oMnQYiUi/zbh3ovbnQk19YKINkQny44=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.24 h1:c5qGfdbCHav6viBwiyDns3OXqhqAbGjfIB4uVu2ayhk=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.24/go.mod h1:HMA4FZG6fyib+NDo5bpIxX1EhYjrAOveZJY2YR0xrNE=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.23 h1:qc+RW0WWZ2KApMnsu/EVCPqLTyIH55uc7YQq7mq4XqE=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.23/go.mod h1:FJhZWVWBCcgAF8jbep7pxQ1QUsjzTwa9tvEXGw2TDRo=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.30.5 h1:kFfb+NMap4R7nDvBYyABa/nw7KFMtAfygD1Hyoxh4uE=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.30.5/go.mod h1:Dze3kNt4T+Dgb8YCfuIFSBLmE6hadKNxqfdF0Xmqz1I=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.12.4 h1:qJdM48OOLl1FBSzI7ZrA1ZfLwOyCYqkXV5lko1hYDBw=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.12.4/go.mod h1:jtLIhd+V+lft6ktxpItycqHqiVXrPIRjWIsFIlzMriw=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.4 h1:YRkWXQveFb0tFC0TLktmmhGsOcCgLwvq88MC2al47AA=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.12.5 h1:bdKIX6SVF3nc3xJFw6Nf0igzS6Ff/louGq8Z6VP/3Hs=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.12.5/go.mod h1:vuWiaDB30M/QTC+lI3Wj6S/zb7tpUK2MSYgy3Guh2L0=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.4/go.mod h1:zVwRrfdSmbRZWkUkWjOItY7SOalnFnq/Yg2LVPqDjwc=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.18.5 h1:L1600eLr0YvTT7gNh3Ni24yGI7NSHkq9Gp62vijPRCs=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.5 h1:xLPZMyuZ4GuqRCIec/zWuIhRFPXh2UOJdLXBSi64ZWQ=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.5/go.mod h1:QjxpHmCwAg0ESGtPQnLIVp7SedTOBMYy+Slr3IfMKeI=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.18.5/go.mod h1:1mKZHLLpDMHTNSYPJ7qrcnCQdHCWsNQaT0xRvq2u80s=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.18.6 h1:rIFn5J3yDoeuKCE9sESXqM5POTAhOP1du3bv/qTL+tE=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.18.6/go.mod h1:48WJ9l3dwP0GSHWGc5sFGGlCkuA82Mc2xnw+T6Q8aDw=
|
||||
github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8=
|
||||
github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
|
||||
github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I=
|
||||
github.com/aymanbagabas/go-osc52 v1.0.3/go.mod h1:zT8H+Rk4VSabYN90pWyugflM3ZhpTZNC7cASDfUCdT4=
|
||||
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
|
||||
github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=
|
||||
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
|
||||
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
|
||||
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
|
||||
|
@ -114,6 +131,10 @@ github.com/c4milo/unpackit v0.1.0 h1:91pWJ6B3svZ4LOE+p3rnyucRK5fZwBdF/yQ/pcZO31I
|
|||
github.com/c4milo/unpackit v0.1.0/go.mod h1:pvXCMYlSV8zwGFWMaT+PWYkAB/cvDjN2mv9r7ZRSxEo=
|
||||
github.com/caddyserver/certmagic v0.17.2 h1:o30seC1T/dBqBCNNGNHWwj2i5/I/FMjBbTAhjADP3nE=
|
||||
github.com/caddyserver/certmagic v0.17.2/go.mod h1:ouWUuC490GOLJzkyN35eXfV8bSbwMwSf4bdhkIxtdQE=
|
||||
github.com/charmbracelet/glamour v0.6.0 h1:wi8fse3Y7nfcabbbDuwolqTqMQPMnVPeZhDM273bISc=
|
||||
github.com/charmbracelet/glamour v0.6.0/go.mod h1:taqWV4swIMMbWALc0m7AfE9JkPSU8om2538k9ITBxOc=
|
||||
github.com/cheggaaa/pb/v3 v3.1.2 h1:FIxT3ZjOj9XJl0U4o2XbEhjFfZl7jCVCDOGq1ZAB7wQ=
|
||||
github.com/cheggaaa/pb/v3 v3.1.2/go.mod h1:SNjnd0yKcW+kw0brSusraeDd5Bf1zBfxAzTL2ss3yQ4=
|
||||
github.com/cloudflare/cfssl v1.6.4-0.20221208165709-c5e40da60306 h1:4ifuHhCvT09M+E/lX56KvQsFKSfOd077aYS1sNXa6UY=
|
||||
github.com/cloudflare/cfssl v1.6.4-0.20221208165709-c5e40da60306/go.mod h1:4TQEp/C5L83FVh5G/2edJy2rQ/rqw7r1ze2D2rgrzTs=
|
||||
github.com/cloudflare/circl v1.1.0 h1:bZgT/A+cikZnKIwn7xL2OBj012Bmvho/o6RpRvv3GKY=
|
||||
|
@ -142,6 +163,8 @@ github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3
|
|||
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
|
||||
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w=
|
||||
github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg=
|
||||
github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
|
||||
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
|
||||
|
@ -190,6 +213,7 @@ github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l
|
|||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
||||
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
|
@ -209,6 +233,8 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
|||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY=
|
||||
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
|
||||
github.com/google/go-github/v30 v30.1.0 h1:VLDx+UolQICEOKu2m4uAoMti1SxuEBAl7RSEG16L+Oo=
|
||||
github.com/google/go-github/v30 v30.1.0/go.mod h1:n8jBpHl45a/rlBUtRJMOG4GhNADUQFEufcolZ95JfU8=
|
||||
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
|
||||
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
|
||||
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
|
||||
|
@ -314,10 +340,12 @@ github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczG
|
|||
github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
|
||||
github.com/lor00x/goldap v0.0.0-20180618054307-a546dffdd1a3 h1:wIONC+HMNRqmWBjuMxhatuSzHaljStc4gjDeKycxy0A=
|
||||
github.com/lor00x/goldap v0.0.0-20180618054307-a546dffdd1a3/go.mod h1:37YR9jabpiIxsb8X9VCIx8qFOjTDIIrIHHODa8C4gz0=
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
|
||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
|
||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
|
||||
github.com/mackerelio/go-osstat v0.2.3 h1:jAMXD5erlDE39kdX2CU7YwCGRcxIO33u/p8+Fhe5dJw=
|
||||
github.com/mackerelio/go-osstat v0.2.3/go.mod h1:DQbPOnsss9JHIXgBStc/dnhhir3gbd3YH+Dbdi7ptMA=
|
||||
github.com/mackerelio/go-osstat v0.2.4 h1:qxGbdPkFo65PXOb/F/nhDKpF2nGmGaCFDLXoZjJTtUs=
|
||||
github.com/mackerelio/go-osstat v0.2.4/go.mod h1:Zy+qzGdZs3A9cuIqmgbJvwbmLQH9dJvtio5ZjJTbdlQ=
|
||||
github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A=
|
||||
github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA=
|
||||
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
|
||||
|
@ -332,6 +360,7 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/
|
|||
github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng=
|
||||
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
|
||||
github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU=
|
||||
github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
|
||||
|
@ -346,6 +375,8 @@ github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7
|
|||
github.com/miekg/dns v1.1.52 h1:Bmlc/qsNNULOe6bpXcUTsuOajd0DzRHwup6D9k1An0c=
|
||||
github.com/miekg/dns v1.1.52/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY=
|
||||
github.com/minio/minio-go/v6 v6.0.46/go.mod h1:qD0lajrGW49lKZLtXKtCB4X/qkMf0a5tBvN2PaZg7Gg=
|
||||
github.com/minio/selfupdate v0.6.0 h1:i76PgT0K5xO9+hjzKcacQtO7+MjJ4JKA8Ak8XQ9DDwU=
|
||||
github.com/minio/selfupdate v0.6.0/go.mod h1:bO02GTIPCMQFTEvE5h4DjYB58bCoZ35XLeBf0buTDdM=
|
||||
github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM=
|
||||
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
|
@ -355,10 +386,15 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ
|
|||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/mreiferson/go-httpclient v0.0.0-20160630210159-31f0106b4474/go.mod h1:OQA4XLvDbMgS8P0CevmM4m9Q3Jq4phKUzcocxuGJ5m8=
|
||||
github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s=
|
||||
github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8=
|
||||
github.com/muesli/termenv v0.13.0/go.mod h1:sP1+uffeLaEYpyOTb8pLCUctGcGLnoFjSn4YJK5e2bc=
|
||||
github.com/muesli/termenv v0.15.1 h1:UzuTb/+hhlBugQz28rpzey4ZuKcZ03MeKsoG7IJZIxs=
|
||||
github.com/muesli/termenv v0.15.1/go.mod h1:HeAQPTzpfs016yGtA4g00CsdYnVLJvxsS4ANqrZs2sQ=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||
github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0=
|
||||
github.com/nwaples/rardecode v1.1.2 h1:Cj0yZY6T1Zx1R7AhTbyGSALm44/Mmq+BAPc4B/p/d3M=
|
||||
github.com/nwaples/rardecode v1.1.2/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0=
|
||||
github.com/nwaples/rardecode v1.1.3 h1:cWCaZwfM5H7nAD6PyEdcVnczzV8i/JtotnyW/dD9lEc=
|
||||
github.com/nwaples/rardecode v1.1.3/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
|
@ -384,42 +420,42 @@ github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF
|
|||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
|
||||
github.com/projectdiscovery/asnmap v1.0.2 h1:2+8tqzJeFVpJS7u27YH7kMK7edDAr7OsmSxs92aWFNc=
|
||||
github.com/projectdiscovery/asnmap v1.0.2/go.mod h1:64YfriVxyRQvqc+1iPMHMf+i/of2jr+Qx7geCIm4ZsU=
|
||||
github.com/projectdiscovery/blackrock v0.0.0-20221025011524-9e4efe804fb4 h1:EsrQ/zkotVodSJLOch3pV/UYt1vQcwyIs5HX0sm1ljE=
|
||||
github.com/projectdiscovery/blackrock v0.0.0-20221025011524-9e4efe804fb4/go.mod h1:5tNGQP9kOfW+X5+40pZP8aqPYLHs45nJkFaSHLxdeH8=
|
||||
github.com/projectdiscovery/blackrock v0.0.0-20230328171319-f24b18d05b64 h1:3oOT3yauepbOp84gz67JQLu/y9uyyIeGakpi+rYw1Cc=
|
||||
github.com/projectdiscovery/blackrock v0.0.0-20230328171319-f24b18d05b64/go.mod h1:ANUtjDfaVrqB453bzToU+YB4cUbvBRpLvEwoWIwlTss=
|
||||
github.com/projectdiscovery/cdncheck v0.0.4-0.20220413175814-b47bc2d578b1 h1:QtTPPx0uu42AsQJiXT86/wqdHS7/iVcgz1VM38tjv20=
|
||||
github.com/projectdiscovery/cdncheck v0.0.4-0.20220413175814-b47bc2d578b1/go.mod h1:EevMeCG1ogBoUJYaa0Mv9R1VUboDm/DiynId7DboKy0=
|
||||
github.com/projectdiscovery/clistats v0.0.12 h1:KLYJxpiwEFidduU4PbcwEcCQ2L7c5wrf7DI5IN5fZ+8=
|
||||
github.com/projectdiscovery/clistats v0.0.12/go.mod h1:9luKJj+7Hjq3+a7g129sKWRYx4SbTdkUWZQxabn3H5Y=
|
||||
github.com/projectdiscovery/dsl v0.0.5-0.20230328190851-15d12ab4c5e4 h1:YXl+QMOQzarFL1/nRDArp0lxwhz4Jgu0CVLGECCn3F8=
|
||||
github.com/projectdiscovery/dsl v0.0.5-0.20230328190851-15d12ab4c5e4/go.mod h1:XiCs+raMYeKar+T3WPFl+dxUmyQ86IEMyMEFVAdbbmo=
|
||||
github.com/projectdiscovery/fastdialer v0.0.24 h1:yEyYALCmDQpPYWttZ4uo9AJseqt4mYWcyx3s9WYzqW8=
|
||||
github.com/projectdiscovery/fastdialer v0.0.24/go.mod h1:X7zZy3BGdGoprR6CftHKeJyV86a3OjSAlJcNU7FL26E=
|
||||
github.com/projectdiscovery/fasttemplate v0.0.2 h1:h2cISk5xDhlJEinlBQS6RRx0vOlOirB2y3Yu4PJzpiA=
|
||||
github.com/projectdiscovery/fasttemplate v0.0.2/go.mod h1:XYWWVMxnItd+r0GbjA1GCsUopMw1/XusuQxdyAIHMCw=
|
||||
github.com/projectdiscovery/fileutil v0.0.3 h1:GSsoey4p8ZHIRxWF2VXh4mhLr+wfEkpJwvF0Dxpn/gg=
|
||||
github.com/projectdiscovery/fileutil v0.0.3/go.mod h1:GLejWd3YerG3RNYD/Hk2pJlytlYRgHdkWfWUAdCH2YQ=
|
||||
github.com/projectdiscovery/freeport v0.0.4 h1:H4VrK/7hUcC1zbg46zv9iSMBACBDpUqcHkV+FUyXISw=
|
||||
github.com/projectdiscovery/freeport v0.0.4/go.mod h1:PY0bxSJ34HVy67LHIeF3uIutiCSDwOqKD8ruBkdiCwE=
|
||||
github.com/projectdiscovery/goflags v0.1.8 h1:Urhm2Isq2BdRt8h4h062lHKYXO65RHRjGTDSkUwex/g=
|
||||
github.com/projectdiscovery/goflags v0.1.8/go.mod h1:Yxi9tclgwGczzDU65ntrwaIql5cXeTvW5j2WxFuF+Jk=
|
||||
github.com/projectdiscovery/gologger v1.1.8 h1:CFlCzGlqAhPqWIrAXBt1OVh5jkMs1qgoR/z4xhdzLNE=
|
||||
github.com/projectdiscovery/gologger v1.1.8/go.mod h1:bNyVaC1U/NpJtFkJltcesn01NR3K8Hg6RsLVce6yvrw=
|
||||
github.com/projectdiscovery/hmap v0.0.10 h1:O6ALGW3BK+FmknLXW7ENwQevLs+faRJuoRbDtakZZus=
|
||||
github.com/projectdiscovery/hmap v0.0.10/go.mod h1:xdtyejCgl5LJW7yz7nf/ut32tWuV/l7FjUzItiCtJIg=
|
||||
github.com/projectdiscovery/httpx v1.2.7 h1:rDB+uKpWE/e6nuLDM341ZNzaaMgwcEcc+A9Q5R6RL3s=
|
||||
github.com/projectdiscovery/httpx v1.2.7/go.mod h1:QW8mKw6PzMBb62T5fT9w75hhVBcjoyyVTDJhefZcX50=
|
||||
github.com/projectdiscovery/interactsh v1.1.0 h1:WXCwvInO2LgOURRr08rr601S5ruzMpoPIVXFRNZpwAE=
|
||||
github.com/projectdiscovery/interactsh v1.1.0/go.mod h1:49THEmeKNQIU1uV/NxxXEY9u8uNtJ4LMw0A8bxZSKuM=
|
||||
github.com/projectdiscovery/hmap v0.0.11 h1:nA3qCFzWPcOw27T8PII5IWI3ZP0ys7TGCi2nLSnHXVA=
|
||||
github.com/projectdiscovery/hmap v0.0.11/go.mod h1:5sbLn2OHexvpVupStNOhusWO9jLCyEm5jcHwWB2nOkI=
|
||||
github.com/projectdiscovery/httpx v1.2.9 h1:bSXXjPHIDywokASSXLaWScyIRTFT6Avr9JJS7lV96c0=
|
||||
github.com/projectdiscovery/httpx v1.2.9/go.mod h1:99+TTGdMDKQgWRLzzWj3zGffQ6f4NCAWQHqHWfPn0Uc=
|
||||
github.com/projectdiscovery/interactsh v1.1.2 h1:CtnVd8vgn6wRK1A2dD77XuGUOmsz5e/bEozzRme9oJs=
|
||||
github.com/projectdiscovery/interactsh v1.1.2/go.mod h1:aoNDXOSGlMTP0ce9sgiE2tEX3+P+iE9CPtzc2cYONl8=
|
||||
github.com/projectdiscovery/iputil v0.0.2 h1:f6IGnZF4RImJLysPSPG3D84jyTH34q3lihCFeP+eZzI=
|
||||
github.com/projectdiscovery/iputil v0.0.2/go.mod h1:J3Pcz1q51pi4/JL871mQztg0KOzyWDPxnPLOYJm2pVQ=
|
||||
github.com/projectdiscovery/mapcidr v1.1.0 h1:Yeb+CGVsRYvHmZ9YSHb9iy4tzY9YuOm3oTFX/xzGhVU=
|
||||
github.com/projectdiscovery/mapcidr v1.1.0/go.mod h1:hck0bWXka5ZkUaBG+TWt99bzLy+4hAg9oANhEmm3GNs=
|
||||
github.com/projectdiscovery/mapcidr v1.1.1 h1:68Xvw9cKugNeAVxHE3Nl1Ej26nm1taWq6e1WPXpluc0=
|
||||
github.com/projectdiscovery/mapcidr v1.1.1/go.mod h1:yyp9ghqmmC0+r5DySgDBXE4cf2QW8SBloVESCteWiAg=
|
||||
github.com/projectdiscovery/networkpolicy v0.0.4 h1:zcGjEqZbyECZEdyCy1jVuwOS7Ww1mzgCefQU75XqdJA=
|
||||
github.com/projectdiscovery/networkpolicy v0.0.4/go.mod h1:DIXwKs3sQyfCoWHKRLQiRrEorSQW4Zrh4ftu7oDVK6w=
|
||||
github.com/projectdiscovery/nvd v1.0.9 h1:2DdMm7lu3GnCQsyYDEQiQ/LRYDmpEm654kvGQS6jzjE=
|
||||
github.com/projectdiscovery/nvd v1.0.9/go.mod h1:nGHAo7o6G4V4kscZlm488qKp/ZrZYiBoKqAQrn3X4Og=
|
||||
github.com/projectdiscovery/ratelimit v0.0.6 h1:SAD2ArdT9F8NmbkAIZpl7DjNnbiXdUQLnMZt5dbVmZ0=
|
||||
github.com/projectdiscovery/ratelimit v0.0.6/go.mod h1:WFL6gIggPLTwYwDbxqQODuWrz/lcMP2E5ofKSAz3YwI=
|
||||
github.com/projectdiscovery/rawhttp v0.1.9 h1:hMMKIwsOcbUcgnVnHfp4LhuJamAq/Dom1oIwO+RljBs=
|
||||
github.com/projectdiscovery/rawhttp v0.1.9/go.mod h1:KZ2dPwu38NE6T5RIfrqN9r4vxA2GmWW7+NSV/qC+jOw=
|
||||
github.com/projectdiscovery/rawhttp v0.1.10 h1:wkQk/lpMVzi4AAELRDaBQEgMqyerpkz3Kks7QgDF274=
|
||||
github.com/projectdiscovery/rawhttp v0.1.10/go.mod h1:cIlAWs3Nu8CTBArx/8GU1baimR5T1eO62TJFG2rAnSc=
|
||||
github.com/projectdiscovery/rdap v0.9.1-0.20221108103045-9865884d1917 h1:m03X4gBVSorSzvmm0bFa7gDV4QNSOWPL/fgZ4kTXBxk=
|
||||
github.com/projectdiscovery/rdap v0.9.1-0.20221108103045-9865884d1917/go.mod h1:JxXtZC9e195awe7EynrcnBJmFoad/BNDzW9mzFkK8Sg=
|
||||
github.com/projectdiscovery/retryabledns v1.0.21 h1:vOpPQR1q8Z824uoA8JXCI/RyvDAssPeD68Onz9hP/ds=
|
||||
|
@ -430,18 +466,19 @@ github.com/projectdiscovery/sarif v0.0.1 h1:C2Tyj0SGOKbCLgHrx83vaE6YkzXEVrMXYRGL
|
|||
github.com/projectdiscovery/sarif v0.0.1/go.mod h1:cEYlDu8amcPf6b9dSakcz2nNnJsoz4aR6peERwV+wuQ=
|
||||
github.com/projectdiscovery/stringsutil v0.0.2 h1:uzmw3IVLJSMW1kEg8eCStG/cGbYYZAja8BH3LqqJXMA=
|
||||
github.com/projectdiscovery/stringsutil v0.0.2/go.mod h1:EJ3w6bC5fBYjVou6ryzodQq37D5c6qbAYQpGmAy+DC0=
|
||||
github.com/projectdiscovery/tlsx v1.0.6 h1:omMbtedk4BjXtauPpB9Y+FQml9cVthOnIxOMKHIrxm8=
|
||||
github.com/projectdiscovery/tlsx v1.0.6/go.mod h1:9PTwYVVbaLYpNIwZIvgVxJzctbiemM/pgukkOb3/4wY=
|
||||
github.com/projectdiscovery/tlsx v1.0.6-0.20230328111908-f4528797e948 h1:bAx0ittZ88QwV0ohxjz4fnhLvNYjYTgXcTlgQP+hzY4=
|
||||
github.com/projectdiscovery/tlsx v1.0.6-0.20230328111908-f4528797e948/go.mod h1:WVHBfdZ9x2zYxfDdmtr73W3soq/h2koI8eJ/ubroSnI=
|
||||
github.com/projectdiscovery/uncover v1.0.2 h1:mRFzflYyvwKkHd3XKufMlDRrb6p1mjFZTSHoNAUpFwo=
|
||||
github.com/projectdiscovery/uncover v1.0.2/go.mod h1:lz4QYfArSA6jJkXyB71kN2/Pc7IW7nJB8c95n7xtwqY=
|
||||
github.com/projectdiscovery/utils v0.0.16 h1:7vmi3haCyM3vk0yXSLjoid4p2/7bo042rcmG4Dtk+Sk=
|
||||
github.com/projectdiscovery/utils v0.0.16/go.mod h1:Cu216AlQ7rAYa8aDBqB2OgNfu5p24Uj+tG9RxV8Wbfs=
|
||||
github.com/projectdiscovery/wappalyzergo v0.0.81 h1:i7WYrH+O2EoHbY1g/WnrxO4YF/0OkA/G1bw6z8WKcjA=
|
||||
github.com/projectdiscovery/wappalyzergo v0.0.81/go.mod h1:HvYuW0Be4JCjVds/+XAEaMSqRG9yrI97UmZq0TPk6A0=
|
||||
github.com/projectdiscovery/utils v0.0.18 h1:gyBMnA4y2ryui0G98iFqKAXuNdoSy6Z6K0/1KHB0czU=
|
||||
github.com/projectdiscovery/utils v0.0.18/go.mod h1:Cu216AlQ7rAYa8aDBqB2OgNfu5p24Uj+tG9RxV8Wbfs=
|
||||
github.com/projectdiscovery/wappalyzergo v0.0.88 h1:N/1vFlKmc3GJco9rANJdHrxg8jdav/xmnICo8rztmH8=
|
||||
github.com/projectdiscovery/wappalyzergo v0.0.88/go.mod h1:HvYuW0Be4JCjVds/+XAEaMSqRG9yrI97UmZq0TPk6A0=
|
||||
github.com/projectdiscovery/yamldoc-go v1.0.4 h1:eZoESapnMw6WAHiVgRwNqvbJEfNHEH148uthhFbG5jE=
|
||||
github.com/projectdiscovery/yamldoc-go v1.0.4/go.mod h1:8PIPRcUD55UbtQdcfFR1hpIGRWG0P7alClXNGt1TBik=
|
||||
github.com/remeh/sizedwaitgroup v1.0.0 h1:VNGGFwNo/R5+MJBf6yrsr110p0m4/OX4S3DCy7Kyl5E=
|
||||
github.com/remeh/sizedwaitgroup v1.0.0/go.mod h1:3j2R4OIe/SeS6YDhICBy22RWjJC5eNCJ1V+9+NVNYlo=
|
||||
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
|
||||
github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
|
@ -469,9 +506,8 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1
|
|||
github.com/smartystreets/assertions v1.0.0 h1:UVQPSSmc3qtTi+zPPkCXvZX9VvW/xT/NsRvKfwY81a8=
|
||||
github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM=
|
||||
github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM=
|
||||
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a h1:pa8hGb/2YqsZKovtsgrwcDH1RZhVbTKCjLp47XpqCDs=
|
||||
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||
github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
|
||||
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||
github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs=
|
||||
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
|
||||
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||
|
@ -548,9 +584,10 @@ github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQ
|
|||
github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
|
||||
github.com/weppos/publicsuffix-go v0.12.0/go.mod h1:z3LCPQ38eedDQSwmsSRW4Y7t2L8Ln16JPQ02lHAdn5k=
|
||||
github.com/weppos/publicsuffix-go v0.15.1-0.20220724114530-e087fba66a37/go.mod h1:5ZC/Uv3fIEUE0eP6o9+Yg4+5+W8V0/BieMi05feGXVA=
|
||||
github.com/weppos/publicsuffix-go v0.20.0 h1:59ypvSUbW3Dunc6zVm+v+MmXf2Q6cGiNDkxgRIzEnaA=
|
||||
github.com/weppos/publicsuffix-go v0.20.0/go.mod h1:5ZC/Uv3fIEUE0eP6o9+Yg4+5+W8V0/BieMi05feGXVA=
|
||||
github.com/weppos/publicsuffix-go v0.30.0 h1:QHPZ2GRu/YE7cvejH9iyavPOkVCB4dNxp2ZvtT+vQLY=
|
||||
github.com/weppos/publicsuffix-go v0.30.0/go.mod h1:kBi8zwYnR0zrbm8RcuN1o9Fzgpnnn+btVN8uWPMyXAY=
|
||||
github.com/weppos/publicsuffix-go/publicsuffix/generator v0.0.0-20220704091424-e0182326a282/go.mod h1:GHfoeIdZLdZmLjMlzBftbTDntahTttUMWjxZwQJhULE=
|
||||
github.com/weppos/publicsuffix-go/publicsuffix/generator v0.0.0-20220927085643-dc0d00c92642/go.mod h1:GHfoeIdZLdZmLjMlzBftbTDntahTttUMWjxZwQJhULE=
|
||||
github.com/wsxiaoys/terminal v0.0.0-20160513160801-0940f3fc43a0 h1:3UeQBvD0TFrlVjOeLOBz+CPAI8dnbqNSVwUwRrkp7vQ=
|
||||
github.com/wsxiaoys/terminal v0.0.0-20160513160801-0940f3fc43a0/go.mod h1:IXCdmsXIht47RaVFLEdVnh1t+pgYtTAhQGj73kz+2DM=
|
||||
github.com/xanzy/go-gitlab v0.80.2 h1:CH1Q7NDklqZllox4ICVF4PwlhQGfPtE+w08Jsb74ZX0=
|
||||
|
@ -572,8 +609,14 @@ github.com/ysmood/gson v0.7.3 h1:QFkWbTH8MxyUTKPkVWAENJhxqdBa4lYTQWqZCiLG6kE=
|
|||
github.com/ysmood/gson v0.7.3/go.mod h1:3Kzs5zDl21g5F/BlLTNcuAGAYLKt2lV5G8D1zF3RNmg=
|
||||
github.com/ysmood/leakless v0.8.0 h1:BzLrVoiwxikpgEQR0Lk8NyBN5Cit2b1z+u0mgL4ZJak=
|
||||
github.com/ysmood/leakless v0.8.0/go.mod h1:R8iAXPRaG97QJwqxs74RdwzcRHT1SWCGTNqY8q0JvMQ=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yuin/goldmark v1.5.2/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yuin/goldmark v1.5.4 h1:2uY/xC0roWy8IBEGLgB1ywIoEJFGmRrX21YQcvGZzjU=
|
||||
github.com/yuin/goldmark v1.5.4/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yuin/goldmark-emoji v1.0.1 h1:ctuWEyzGBwiucEqxzwe0SOYDXPAucOrE9NQC18Wa1os=
|
||||
github.com/yuin/goldmark-emoji v1.0.1/go.mod h1:2w1E6FEWLcDQkoTE+7HU6QF1F6SLlNGjRIBbIZQFqkQ=
|
||||
github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg=
|
||||
github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
|
||||
github.com/zmap/rc2 v0.0.0-20131011165748-24b9757f5521/go.mod h1:3YZ9o3WnatTIZhuOtot4IcUfzoKVjUHqu6WALIyI0nE=
|
||||
|
@ -607,15 +650,17 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
|
|||
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
|
||||
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211209193657-4570a0811e8b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
|
||||
golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A=
|
||||
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
|
||||
golang.org/x/exp v0.0.0-20230310171629-522b1b587ee0 h1:LGJsf5LRplCck6jUCH3dBL2dmycNruWNF5xugkSlfXw=
|
||||
golang.org/x/exp v0.0.0-20230310171629-522b1b587ee0/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
|
||||
golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0 h1:pVgRXcIictcr+lBQIFeiwuwtDIs4eL21OuM9nyAADmo=
|
||||
golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
|
||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
|
@ -642,12 +687,12 @@ golang.org/x/net v0.0.0-20220630215102-69896b714898/go.mod h1:XRhObCWvk6IyKnWLug
|
|||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
|
||||
golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
|
||||
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
|
||||
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
|
||||
golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
|
||||
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
|
||||
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.6.0 h1:Lh8GPgSKBfWSwFvtuWOfeI3aAAnbXTSutYxJiOJFgIw=
|
||||
golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
|
@ -675,6 +720,7 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||
golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210228012217-479acdf4ea46/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
|
@ -692,7 +738,6 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
|
@ -704,7 +749,6 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn
|
|||
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
|
||||
golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
|
@ -735,6 +779,7 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
|
|||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
|
||||
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
|
|
|
@ -39,7 +39,7 @@ func (r *Runner) getScanList(limit int) error {
|
|||
count++
|
||||
lastTime = v.CreatedAt.String()
|
||||
res := nucleicloud.PrepareScanListOutput(v)
|
||||
if r.options.JSON {
|
||||
if r.options.JSONL {
|
||||
_ = jsoniter.NewEncoder(os.Stdout).Encode(res)
|
||||
} else if !r.options.NoTables {
|
||||
values = append(values, []string{strconv.FormatInt(res.ScanID, 10), res.Timestamp, strconv.Itoa(res.Target), strconv.Itoa(res.Template), strconv.Itoa(res.ScanResult), res.ScanTime, res.ScanStatus})
|
||||
|
@ -70,7 +70,7 @@ func (r *Runner) listDatasources() error {
|
|||
header := []string{"ID", "UpdatedAt", "Type", "Repo", "Path"}
|
||||
var values [][]string
|
||||
for _, source := range datasources {
|
||||
if r.options.JSON {
|
||||
if r.options.JSONL {
|
||||
_ = jsoniter.NewEncoder(os.Stdout).Encode(source)
|
||||
} else if !r.options.NoTables {
|
||||
values = append(values, []string{strconv.FormatInt(source.ID, 10), source.Updatedat.Format(nucleicloud.DDMMYYYYhhmmss), source.Type, source.Repo, source.Path})
|
||||
|
@ -96,7 +96,7 @@ func (r *Runner) listReportingSources() error {
|
|||
header := []string{"ID", "Type", "ProjectName", "Enabled"}
|
||||
var values [][]string
|
||||
for _, source := range items {
|
||||
if r.options.JSON {
|
||||
if r.options.JSONL {
|
||||
_ = jsoniter.NewEncoder(os.Stdout).Encode(source)
|
||||
} else if !r.options.NoTables {
|
||||
values = append(values, []string{strconv.FormatInt(source.ID, 10), source.Type, source.ProjectName, strconv.FormatBool(source.Enabled)})
|
||||
|
@ -123,7 +123,7 @@ func (r *Runner) listTargets() error {
|
|||
header := []string{"ID", "Reference", "Count"}
|
||||
var values [][]string
|
||||
for _, source := range items {
|
||||
if r.options.JSON {
|
||||
if r.options.JSONL {
|
||||
_ = jsoniter.NewEncoder(os.Stdout).Encode(source)
|
||||
} else if !r.options.NoTables {
|
||||
values = append(values, []string{strconv.FormatInt(source.ID, 10), source.Reference, strconv.FormatInt(source.Count, 10)})
|
||||
|
@ -149,7 +149,7 @@ func (r *Runner) listTemplates() error {
|
|||
header := []string{"ID", "Reference"}
|
||||
var values [][]string
|
||||
for _, source := range items {
|
||||
if r.options.JSON {
|
||||
if r.options.JSONL {
|
||||
_ = jsoniter.NewEncoder(os.Stdout).Encode(source)
|
||||
} else if !r.options.NoTables {
|
||||
values = append(values, []string{strconv.FormatInt(source.ID, 10), source.Reference})
|
||||
|
|
|
@ -20,8 +20,9 @@ import (
|
|||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/utils/vardump"
|
||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/headless/engine"
|
||||
"github.com/projectdiscovery/nuclei/v2/pkg/types"
|
||||
"github.com/projectdiscovery/stringsutil"
|
||||
fileutil "github.com/projectdiscovery/utils/file"
|
||||
logutil "github.com/projectdiscovery/utils/log"
|
||||
stringsutil "github.com/projectdiscovery/utils/strings"
|
||||
)
|
||||
|
||||
func ConfigureOptions() error {
|
||||
|
@ -250,7 +251,7 @@ func configureOutput(options *types.Options) {
|
|||
}
|
||||
|
||||
// disable standard logger (ref: https://github.com/golang/go/issues/19895)
|
||||
// logutil.DisableDefaultLogger()
|
||||
logutil.DisableDefaultLogger()
|
||||
}
|
||||
|
||||
// loadResolvers loads resolvers from both user provided flag and file
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
json_exporter "github.com/projectdiscovery/nuclei/v2/pkg/reporting/exporters/jsonexporter"
|
||||
"io"
|
||||
"net/http"
|
||||
_ "net/http/pprof"
|
||||
|
@ -217,7 +218,7 @@ func New(options *types.Options) (*Runner, error) {
|
|||
}
|
||||
runner.output = outputWriter
|
||||
|
||||
if options.JSON && options.EnableProgressBar {
|
||||
if options.JSONL && options.EnableProgressBar {
|
||||
options.StatsJSON = true
|
||||
}
|
||||
if options.StatsJSON {
|
||||
|
@ -329,6 +330,14 @@ func createReportingOptions(options *types.Options) (*reporting.Options, error)
|
|||
reportingOptions.SarifExporter = &sarif.Options{File: options.SarifExport}
|
||||
}
|
||||
}
|
||||
if options.JSONExport != "" {
|
||||
if reportingOptions != nil {
|
||||
reportingOptions.JSONExporter = &json_exporter.Options{File: options.JSONExport}
|
||||
} else {
|
||||
reportingOptions = &reporting.Options{}
|
||||
reportingOptions.JSONExporter = &json_exporter.Options{File: options.JSONExport}
|
||||
}
|
||||
}
|
||||
return reportingOptions, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,189 @@
|
|||
package aws
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
"github.com/aws/aws-sdk-go-v2/config"
|
||||
"github.com/aws/aws-sdk-go-v2/credentials"
|
||||
"github.com/aws/aws-sdk-go-v2/feature/s3/manager"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3"
|
||||
)
|
||||
|
||||
// Catalog manages the AWS S3 template catalog
|
||||
type Catalog struct {
|
||||
svc client
|
||||
}
|
||||
|
||||
// client interface abstracts S3 connections
|
||||
type client interface {
|
||||
getAllKeys() ([]string, error)
|
||||
downloadKey(name string) (io.ReadCloser, error)
|
||||
setBucket(bucket string)
|
||||
}
|
||||
|
||||
type s3svc struct {
|
||||
client *s3.Client
|
||||
bucket string
|
||||
}
|
||||
|
||||
// NewCatalog creates a new AWS Catalog object given a required S3 bucket name and optional configurations. If
|
||||
// no configurations to set AWS keys are provided then environment variables will be used to obtain AWS credentials.
|
||||
func NewCatalog(bucket string, configurations ...func(*Catalog) error) (Catalog, error) {
|
||||
var c Catalog
|
||||
|
||||
for _, configuration := range configurations {
|
||||
err := configuration(&c)
|
||||
if err != nil {
|
||||
return c, err
|
||||
}
|
||||
}
|
||||
|
||||
if c.svc == nil {
|
||||
cfg, err := config.LoadDefaultConfig(context.TODO())
|
||||
if err != nil {
|
||||
return c, err
|
||||
}
|
||||
|
||||
c.svc = &s3svc{
|
||||
client: s3.NewFromConfig(cfg),
|
||||
}
|
||||
}
|
||||
c.svc.setBucket(bucket)
|
||||
|
||||
return c, nil
|
||||
}
|
||||
|
||||
// WithAWSKeys enables explicitly setting the AWS access key, secret key and region
|
||||
func WithAWSKeys(accessKey, secretKey, region string) func(*Catalog) error {
|
||||
return func(c *Catalog) error {
|
||||
cfg, err := config.LoadDefaultConfig(context.TODO(),
|
||||
config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider(accessKey, secretKey, "")),
|
||||
config.WithRegion(region))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
c.svc = &s3svc{
|
||||
client: s3.NewFromConfig(cfg),
|
||||
bucket: "",
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// OpenFile downloads a file from S3 and returns the contents as an io.ReadCloser
|
||||
func (c Catalog) OpenFile(filename string) (io.ReadCloser, error) {
|
||||
if filename == "" {
|
||||
return nil, errors.New("empty filename")
|
||||
}
|
||||
|
||||
return c.svc.downloadKey(filename)
|
||||
}
|
||||
|
||||
// GetTemplatePath looks for a target string performing a simple substring check
|
||||
// against all S3 keys. If the input includes a wildcard (*) it is removed.
|
||||
func (c Catalog) GetTemplatePath(target string) ([]string, error) {
|
||||
target = strings.ReplaceAll(target, "*", "")
|
||||
|
||||
keys, err := c.svc.getAllKeys()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var matches []string
|
||||
for _, key := range keys {
|
||||
if strings.Contains(key, target) {
|
||||
matches = append(matches, key)
|
||||
}
|
||||
}
|
||||
|
||||
return matches, nil
|
||||
}
|
||||
|
||||
// GetTemplatesPath returns all templates from S3
|
||||
func (c Catalog) GetTemplatesPath(definitions []string) ([]string, map[string]error) {
|
||||
keys, err := c.svc.getAllKeys()
|
||||
if err != nil {
|
||||
// necessary to implement the Catalog interface
|
||||
return nil, map[string]error{"aws": err}
|
||||
}
|
||||
|
||||
return keys, nil
|
||||
}
|
||||
|
||||
// ResolvePath gets a full S3 key given the first param. If the second parameter is
|
||||
// provided it tries to find paths relative to the second path.
|
||||
func (c Catalog) ResolvePath(templateName, second string) (string, error) {
|
||||
keys, err := c.svc.getAllKeys()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
// if c second path is given, it's c folder and we join the two and check against keys
|
||||
if second != "" {
|
||||
// Note: Do not replace `path` with `filepath` since filepath is aware of Os path seperator
|
||||
// and we only see `/` in s3 paths changing it to filepath cause build fail and other errors
|
||||
target := path.Join(path.Dir(second), templateName)
|
||||
for _, key := range keys {
|
||||
if key == target {
|
||||
return key, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// check if templateName is already an absolute path to c key
|
||||
for _, key := range keys {
|
||||
if key == templateName {
|
||||
return templateName, nil
|
||||
}
|
||||
}
|
||||
|
||||
return "", fmt.Errorf("no such path found: %s%s for keys: %v", second, templateName, keys)
|
||||
}
|
||||
|
||||
func (s *s3svc) getAllKeys() ([]string, error) {
|
||||
paginator := s3.NewListObjectsV2Paginator(s.client, &s3.ListObjectsV2Input{
|
||||
Bucket: &s.bucket,
|
||||
})
|
||||
|
||||
var keys []string
|
||||
|
||||
for paginator.HasMorePages() {
|
||||
page, err := paginator.NextPage(context.TODO())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, obj := range page.Contents {
|
||||
key := aws.ToString(obj.Key)
|
||||
keys = append(keys, key)
|
||||
}
|
||||
}
|
||||
|
||||
return keys, nil
|
||||
}
|
||||
|
||||
func (s *s3svc) downloadKey(name string) (io.ReadCloser, error) {
|
||||
downloader := manager.NewDownloader(s.client)
|
||||
buf := manager.NewWriteAtBuffer([]byte{})
|
||||
_, err := downloader.Download(context.TODO(), buf, &s3.GetObjectInput{
|
||||
Bucket: aws.String(s.bucket),
|
||||
Key: aws.String(name),
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return io.NopCloser(bytes.NewReader(buf.Bytes())), nil
|
||||
}
|
||||
|
||||
func (s *s3svc) setBucket(bucket string) {
|
||||
s.bucket = bucket
|
||||
}
|
|
@ -0,0 +1,286 @@
|
|||
package aws
|
||||
|
||||
import (
|
||||
"io"
|
||||
"reflect"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
func TestCatalog_GetTemplatePath(t *testing.T) {
|
||||
type args struct {
|
||||
target string
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want []string
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
"get all ssl files",
|
||||
args{
|
||||
target: "ssl",
|
||||
},
|
||||
[]string{
|
||||
"ssl/deprecated-tls.yaml",
|
||||
"ssl/detect-ssl-issuer.yaml",
|
||||
"ssl/expired-ssl.yaml",
|
||||
"ssl/mismatched-ssl.yaml",
|
||||
},
|
||||
false,
|
||||
},
|
||||
{
|
||||
"get all ssl files with wildcard",
|
||||
args{
|
||||
target: "ssl*",
|
||||
},
|
||||
[]string{
|
||||
"ssl/deprecated-tls.yaml",
|
||||
"ssl/detect-ssl-issuer.yaml",
|
||||
"ssl/expired-ssl.yaml",
|
||||
"ssl/mismatched-ssl.yaml",
|
||||
},
|
||||
false,
|
||||
},
|
||||
{
|
||||
"non-matching target",
|
||||
args{
|
||||
target: "I-DONT-EXIST",
|
||||
},
|
||||
[]string{},
|
||||
false,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
c, _ := NewCatalog("bucket", withMockS3Service())
|
||||
got, err := c.GetTemplatePath(tt.args.target)
|
||||
if (err != nil) != tt.wantErr {
|
||||
t.Errorf("GetTemplatePath() error = %v, wantErr %v", err, tt.wantErr)
|
||||
return
|
||||
}
|
||||
if len(tt.want) > 0 && !reflect.DeepEqual(got, tt.want) {
|
||||
t.Errorf("GetTemplatePath() got = %v, want %v", got, tt.want)
|
||||
}
|
||||
|
||||
if len(tt.want) == 0 && len(got) > 0 {
|
||||
t.Errorf("GetTemplatePath() got = %v, want %v", got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestCatalog_GetTemplatesPath(t *testing.T) {
|
||||
tmp := newMockS3Service()
|
||||
keys, _ := tmp.getAllKeys()
|
||||
|
||||
type args struct {
|
||||
definitions []string
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want []string
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
"without definitions",
|
||||
args{
|
||||
definitions: nil,
|
||||
},
|
||||
keys,
|
||||
false,
|
||||
},
|
||||
{
|
||||
"with definitions",
|
||||
args{
|
||||
definitions: []string{"ssl/deprecated-tls.yaml"},
|
||||
},
|
||||
keys,
|
||||
false,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
c, _ := NewCatalog("bucket", withMockS3Service())
|
||||
got, got1 := c.GetTemplatesPath(tt.args.definitions)
|
||||
|
||||
if got1 != nil {
|
||||
val, exists := got1["aws"]
|
||||
if exists && !tt.wantErr {
|
||||
t.Errorf("GetTemplatesPath() error = %v, wantErr %v", val, tt.wantErr)
|
||||
}
|
||||
|
||||
if !exists && len(got1) > 0 {
|
||||
t.Errorf("GetTemplatesPath() should only return one key 'aws': %v", got1)
|
||||
}
|
||||
|
||||
if !exists && tt.wantErr {
|
||||
t.Errorf("GetTemplatesPath() error = %v, wantErr %v", val, tt.wantErr)
|
||||
}
|
||||
}
|
||||
if !reflect.DeepEqual(got, tt.want) {
|
||||
t.Errorf("GetTemplatesPath() got = %v, want %v", got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestCatalog_OpenFile(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
filename string
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
"valid key",
|
||||
"ssl/deprecated-tls.yaml",
|
||||
false,
|
||||
},
|
||||
{
|
||||
"non-existent key",
|
||||
"something/that-doesnt-exist.yaml",
|
||||
true,
|
||||
},
|
||||
{
|
||||
"path to folder",
|
||||
"cves/2023",
|
||||
true,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
c, _ := NewCatalog("bucket", withMockS3Service())
|
||||
got, err := c.OpenFile(tt.filename)
|
||||
if (err != nil) != tt.wantErr {
|
||||
t.Errorf("OpenFile() error = %v, wantErr %v", err, tt.wantErr)
|
||||
return
|
||||
}
|
||||
if err == nil && got == nil {
|
||||
t.Error("OpenFile() didn't return error but io.ReadCloser is nil")
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestCatalog_ResolvePath(t *testing.T) {
|
||||
type args struct {
|
||||
templateName string
|
||||
second string
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want string
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
"absolute path",
|
||||
args{
|
||||
"ssl/deprecated-tls.yaml",
|
||||
"",
|
||||
},
|
||||
"ssl/deprecated-tls.yaml",
|
||||
false,
|
||||
},
|
||||
{
|
||||
"relative path with second param",
|
||||
args{
|
||||
"deprecated-tls.yaml",
|
||||
"ssl/",
|
||||
},
|
||||
"ssl/deprecated-tls.yaml",
|
||||
false,
|
||||
},
|
||||
{
|
||||
"relative path and no second param",
|
||||
args{
|
||||
"cves/2023",
|
||||
"",
|
||||
},
|
||||
"",
|
||||
true,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
c, _ := NewCatalog("bucket", withMockS3Service())
|
||||
got, err := c.ResolvePath(tt.args.templateName, tt.args.second)
|
||||
if (err != nil) != tt.wantErr {
|
||||
t.Errorf("ResolvePath() error = %v, wantErr %v", err, tt.wantErr)
|
||||
return
|
||||
}
|
||||
if got != tt.want {
|
||||
t.Errorf("ResolvePath() got = %v, want %v", got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func withMockS3Service() func(*Catalog) error {
|
||||
return func(c *Catalog) error {
|
||||
c.svc = newMockS3Service()
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
type mocks3svc struct {
|
||||
keys []string
|
||||
}
|
||||
|
||||
func newMockS3Service() mocks3svc {
|
||||
return mocks3svc{
|
||||
keys: []string{
|
||||
"ssl/deprecated-tls.yaml",
|
||||
"ssl/detect-ssl-issuer.yaml",
|
||||
"ssl/expired-ssl.yaml",
|
||||
"ssl/mismatched-ssl.yaml",
|
||||
"cves/2023/CVE-2023-0669.yaml",
|
||||
"cves/2023/CVE-2023-23488.yaml",
|
||||
"cves/2023/CVE-2023-23489.yaml",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func (m mocks3svc) getAllKeys() ([]string, error) {
|
||||
return m.keys, nil
|
||||
}
|
||||
|
||||
func (m mocks3svc) downloadKey(name string) (io.ReadCloser, error) {
|
||||
found := false
|
||||
for _, key := range m.keys {
|
||||
if key == name {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
return nil, errors.New("key not found")
|
||||
}
|
||||
|
||||
sample := `
|
||||
id: git-config
|
||||
|
||||
info:
|
||||
name: Git Config File
|
||||
author: Ice3man
|
||||
severity: medium
|
||||
description: Searches for the pattern /.git/config on passed URLs.
|
||||
|
||||
requests:
|
||||
- method: GET
|
||||
path:
|
||||
- "{{BaseURL}}/.git/config"
|
||||
matchers:
|
||||
- type: word
|
||||
words:
|
||||
- "[core]"
|
||||
`
|
||||
|
||||
return io.NopCloser(strings.NewReader(sample)), nil
|
||||
}
|
||||
|
||||
func (m mocks3svc) setBucket(bucket string) {}
|
|
@ -32,7 +32,7 @@ type Config struct {
|
|||
const nucleiConfigFilename = ".templates-config.json"
|
||||
|
||||
// Version is the current version of nuclei
|
||||
const Version = `2.9.0`
|
||||
const Version = `2.9.1`
|
||||
|
||||
var customConfigDirectory string
|
||||
|
||||
|
|
|
@ -64,13 +64,13 @@ func TestRemoteTemplates(t *testing.T) {
|
|||
name: "remote-templates-positive",
|
||||
args: args{
|
||||
config: &Config{
|
||||
TemplateURLs: []string{"https://raw.githubusercontent.com/projectdiscovery/nuclei-templates/master/technologies/tech-detect.yaml"},
|
||||
TemplateURLs: []string{"https://raw.githubusercontent.com/projectdiscovery/nuclei-templates/main/technologies/tech-detect.yaml"},
|
||||
RemoteTemplateDomainList: []string{"localhost", "raw.githubusercontent.com"},
|
||||
Catalog: catalog,
|
||||
},
|
||||
},
|
||||
want: &Store{
|
||||
finalTemplates: []string{"https://raw.githubusercontent.com/projectdiscovery/nuclei-templates/master/technologies/tech-detect.yaml"},
|
||||
finalTemplates: []string{"https://raw.githubusercontent.com/projectdiscovery/nuclei-templates/main/technologies/tech-detect.yaml"},
|
||||
},
|
||||
wantErr: false,
|
||||
},
|
||||
|
@ -78,7 +78,7 @@ func TestRemoteTemplates(t *testing.T) {
|
|||
name: "remote-templates-negative",
|
||||
args: args{
|
||||
config: &Config{
|
||||
TemplateURLs: []string{"https://raw.githubusercontent.com/projectdiscovery/nuclei-templates/master/technologies/tech-detect.yaml"},
|
||||
TemplateURLs: []string{"https://raw.githubusercontent.com/projectdiscovery/nuclei-templates/main/technologies/tech-detect.yaml"},
|
||||
RemoteTemplateDomainList: []string{"localhost"},
|
||||
Catalog: catalog,
|
||||
},
|
||||
|
|
|
@ -65,7 +65,7 @@ func (e *Engine) ExecuteScanWithOpts(templatesList []*templates.Template, target
|
|||
switch e.options.ScanStrategy {
|
||||
case scanstrategy.TemplateSpray.String():
|
||||
strategyResult = e.executeTemplateSpray(filtered, target)
|
||||
case scanstrategy.TemplateSpray.String():
|
||||
case scanstrategy.HostSpray.String():
|
||||
strategyResult = e.executeHostSpray(filtered, target)
|
||||
}
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@ import (
|
|||
"github.com/go-git/go-git/v5"
|
||||
"github.com/google/go-github/github"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/projectdiscovery/fileutil"
|
||||
"github.com/projectdiscovery/gologger"
|
||||
fileutil "github.com/projectdiscovery/utils/file"
|
||||
"golang.org/x/oauth2"
|
||||
"gopkg.in/src-d/go-git.v4/plumbing/transport/http"
|
||||
)
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"github.com/aws/aws-sdk-go-v2/feature/s3/manager"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3"
|
||||
"github.com/projectdiscovery/gologger"
|
||||
"github.com/projectdiscovery/stringsutil"
|
||||
stringsutil "github.com/projectdiscovery/utils/strings"
|
||||
)
|
||||
|
||||
type customTemplateS3Bucket struct {
|
||||
|
|
|
@ -95,4 +95,14 @@ type Classification struct {
|
|||
// examples:
|
||||
// - value: "\"9.8\""
|
||||
CVSSScore float64 `json:"cvss-score,omitempty" yaml:"cvss-score,omitempty" jsonschema:"title=cvss score for the template,description=CVSS Score for the template,example=9.8"`
|
||||
}
|
||||
// description: |
|
||||
// EPSS Score for the template.
|
||||
// examples:
|
||||
// - value: "\"0.42509\""
|
||||
EPSSScore float64 `json:"epss-score,omitempty" yaml:"epss-score,omitempty" jsonschema:"title=epss score for the template,description=EPSS Score for the template,example=0.42509"`
|
||||
// description: |
|
||||
// CPE for the template.
|
||||
// examples:
|
||||
// - value: "\"cpe:/a:vendor:product:version\""
|
||||
CPE string `json:"cpe,omitempty" yaml:"cpe,omitempty" jsonschema:"title=cpe for the template,description=CPE for the template,example=cpe:/a:vendor:product:version"`
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -2,459 +2,25 @@ package dsl
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"regexp"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/Knetic/govaluate"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/projectdiscovery/nuclei/v2/pkg/types"
|
||||
)
|
||||
|
||||
func TestDSLURLEncodeDecode(t *testing.T) {
|
||||
functions := HelperFunctions
|
||||
|
||||
encoded, err := functions["url_encode"]("&test\"")
|
||||
require.Nil(t, err, "could not url encode")
|
||||
require.Equal(t, "%26test%22", encoded, "could not get url encoded data")
|
||||
|
||||
decoded, err := functions["url_decode"]("%26test%22")
|
||||
require.Nil(t, err, "could not url encode")
|
||||
require.Equal(t, "&test\"", decoded, "could not get url decoded data")
|
||||
}
|
||||
|
||||
func TestDSLTimeComparison(t *testing.T) {
|
||||
compiled, err := govaluate.NewEvaluableExpressionWithFunctions("unixtime() > not_after", HelperFunctions)
|
||||
require.Nil(t, err, "could not compare time")
|
||||
|
||||
result, err := compiled.Evaluate(map[string]interface{}{"not_after": float64(time.Now().Unix() - 1000)})
|
||||
require.Nil(t, err, "could not evaluate compare time")
|
||||
require.Equal(t, true, result, "could not get url encoded data")
|
||||
}
|
||||
|
||||
func TestDSLGzipSerialize(t *testing.T) {
|
||||
compiled, err := govaluate.NewEvaluableExpressionWithFunctions("gzip(\"hello world\")", HelperFunctions)
|
||||
require.Nil(t, err, "could not compile encoder")
|
||||
|
||||
result, err := compiled.Evaluate(make(map[string]interface{}))
|
||||
require.Nil(t, err, "could not evaluate compare time")
|
||||
|
||||
compiled, err = govaluate.NewEvaluableExpressionWithFunctions("gzip_decode(data)", HelperFunctions)
|
||||
require.Nil(t, err, "could not compile decoder")
|
||||
|
||||
data, err := compiled.Evaluate(map[string]interface{}{"data": result})
|
||||
require.Nil(t, err, "could not evaluate decoded data")
|
||||
|
||||
require.Equal(t, "hello world", data.(string), "could not get gzip encoded data")
|
||||
}
|
||||
|
||||
func TestDslFunctionSignatures(t *testing.T) {
|
||||
createSignatureError := func(signature string) string {
|
||||
return fmt.Errorf("%w. correct method signature %q", ErrinvalidDslFunction, signature).Error()
|
||||
}
|
||||
|
||||
toUpperSignatureError := createSignatureError("to_upper(arg1 interface{}) interface{}")
|
||||
removeBadCharsSignatureError := createSignatureError("remove_bad_chars(arg1, arg2 interface{}) interface{}")
|
||||
|
||||
testCases := []struct {
|
||||
methodName string
|
||||
arguments []interface{}
|
||||
expected interface{}
|
||||
err string
|
||||
}{
|
||||
{"to_upper", []interface{}{}, nil, toUpperSignatureError},
|
||||
{"to_upper", []interface{}{"a"}, "A", ""},
|
||||
{"toupper", []interface{}{"a"}, "A", ""},
|
||||
{"to_upper", []interface{}{"a", "b", "c"}, nil, toUpperSignatureError},
|
||||
|
||||
{"remove_bad_chars", []interface{}{}, nil, removeBadCharsSignatureError},
|
||||
{"remove_bad_chars", []interface{}{"a"}, nil, removeBadCharsSignatureError},
|
||||
{"remove_bad_chars", []interface{}{"abba baab", "b"}, "aa aa", ""},
|
||||
{"remove_bad_chars", []interface{}{"a", "b", "c"}, nil, removeBadCharsSignatureError},
|
||||
}
|
||||
|
||||
helperFunctions := HelperFunctions
|
||||
for _, currentTestCase := range testCases {
|
||||
methodName := currentTestCase.methodName
|
||||
t.Run(methodName, func(t *testing.T) {
|
||||
actualResult, err := helperFunctions[methodName](currentTestCase.arguments...)
|
||||
|
||||
if currentTestCase.err == "" {
|
||||
assert.Nil(t, err)
|
||||
} else {
|
||||
assert.Equal(t, err.Error(), currentTestCase.err)
|
||||
}
|
||||
assert.Equal(t, currentTestCase.expected, actualResult)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetPrintableDslFunctionSignatures(t *testing.T) {
|
||||
expected := ` aes_cbc(arg1, arg2, arg3 interface{}) interface{}
|
||||
aes_gcm(arg1, arg2 interface{}) interface{}
|
||||
base64(arg1 interface{}) interface{}
|
||||
base64_decode(arg1 interface{}) interface{}
|
||||
base64_py(arg1 interface{}) interface{}
|
||||
bin_to_dec(arg1 interface{}) interface{}
|
||||
compare_versions(firstVersion, constraints ...string) bool
|
||||
concat(args ...interface{}) string
|
||||
contains(arg1, arg2 interface{}) interface{}
|
||||
contains_all(body interface{}, substrs ...string) bool
|
||||
contains_any(body interface{}, substrs ...string) bool
|
||||
date_time(dateTimeFormat string, optionalUnixTime interface{}) string
|
||||
dec_to_hex(arg1 interface{}) interface{}
|
||||
ends_with(str string, suffix ...string) bool
|
||||
generate_java_gadget(arg1, arg2, arg3 interface{}) interface{}
|
||||
generate_jwt(jsonString, optionalAlgorithm, optionalSignature string, optionalMaxAgeUnix interface{}) string
|
||||
gzip(arg1 interface{}) interface{}
|
||||
gzip_decode(arg1 interface{}) interface{}
|
||||
hex_decode(arg1 interface{}) interface{}
|
||||
hex_encode(arg1 interface{}) interface{}
|
||||
hex_to_dec(arg1 interface{}) interface{}
|
||||
hmac(arg1, arg2, arg3 interface{}) interface{}
|
||||
html_escape(arg1 interface{}) interface{}
|
||||
html_unescape(arg1 interface{}) interface{}
|
||||
ip_format(arg1, arg2 interface{}) interface{}
|
||||
join(separator string, elements ...interface{}) string
|
||||
join(separator string, elements []interface{}) string
|
||||
json_minify(arg1 interface{}) interface{}
|
||||
json_prettify(arg1 interface{}) interface{}
|
||||
len(arg1 interface{}) interface{}
|
||||
line_ends_with(str string, suffix ...string) bool
|
||||
line_starts_with(str string, prefix ...string) bool
|
||||
md5(arg1 interface{}) interface{}
|
||||
mmh3(arg1 interface{}) interface{}
|
||||
oct_to_dec(arg1 interface{}) interface{}
|
||||
print_debug(args ...interface{})
|
||||
rand_base(length uint, optionalCharSet string) string
|
||||
rand_char(optionalCharSet string) string
|
||||
rand_int(optionalMin, optionalMax uint) int
|
||||
rand_ip(cidr ...string) string
|
||||
rand_text_alpha(length uint, optionalBadChars string) string
|
||||
rand_text_alphanumeric(length uint, optionalBadChars string) string
|
||||
rand_text_numeric(length uint, optionalBadNumbers string) string
|
||||
regex(arg1, arg2 interface{}) interface{}
|
||||
remove_bad_chars(arg1, arg2 interface{}) interface{}
|
||||
repeat(arg1, arg2 interface{}) interface{}
|
||||
replace(arg1, arg2, arg3 interface{}) interface{}
|
||||
replace_regex(arg1, arg2, arg3 interface{}) interface{}
|
||||
resolve(format string) string
|
||||
resolve(host string) string
|
||||
reverse(arg1 interface{}) interface{}
|
||||
sha1(arg1 interface{}) interface{}
|
||||
sha256(arg1 interface{}) interface{}
|
||||
sha512(arg1 interface{}) interface{}
|
||||
sort(elements ...interface{}) []interface{}
|
||||
sort(input number) string
|
||||
sort(input string) string
|
||||
split(input string, n int) []string
|
||||
split(input string, separator string, optionalChunkSize) []string
|
||||
starts_with(str string, prefix ...string) bool
|
||||
substr(str string, start int, optionalEnd int)
|
||||
to_lower(arg1 interface{}) interface{}
|
||||
to_number(arg1 interface{}) interface{}
|
||||
to_string(arg1 interface{}) interface{}
|
||||
to_unix_time(input string, optionalLayout string) int64
|
||||
to_upper(arg1 interface{}) interface{}
|
||||
trim(arg1, arg2 interface{}) interface{}
|
||||
trim_left(arg1, arg2 interface{}) interface{}
|
||||
trim_prefix(arg1, arg2 interface{}) interface{}
|
||||
trim_right(arg1, arg2 interface{}) interface{}
|
||||
trim_space(arg1 interface{}) interface{}
|
||||
trim_suffix(arg1, arg2 interface{}) interface{}
|
||||
uniq(elements ...interface{}) []interface{}
|
||||
uniq(input number) string
|
||||
uniq(input string) string
|
||||
unix_time(optionalSeconds uint) float64
|
||||
url_decode(arg1 interface{}) interface{}
|
||||
url_encode(arg1 interface{}) interface{}
|
||||
wait_for(seconds uint)
|
||||
zlib(arg1 interface{}) interface{}
|
||||
zlib_decode(arg1 interface{}) interface{}
|
||||
`
|
||||
|
||||
signatures := GetPrintableDslFunctionSignatures(true)
|
||||
assert.Equal(t, expected, signatures)
|
||||
|
||||
coloredSignatures := GetPrintableDslFunctionSignatures(false)
|
||||
require.Contains(t, coloredSignatures, `[93maes_cbc[0m(arg1, arg2, arg3 [38;5;208minterface{}[0m)[38;5;208m interface{}[0m`, "could not get colored signatures")
|
||||
}
|
||||
|
||||
func TestDslExpressions(t *testing.T) {
|
||||
dslExpressions := map[string]interface{}{
|
||||
`base64("Hello")`: "SGVsbG8=",
|
||||
`base64(1234)`: "MTIzNA==",
|
||||
`base64_py("Hello")`: "SGVsbG8=\n",
|
||||
`hex_encode("aa")`: "6161",
|
||||
`html_escape("<body>test</body>")`: "<body>test</body>",
|
||||
`html_unescape("<body>test</body>")`: "<body>test</body>",
|
||||
`md5("Hello")`: "8b1a9953c4611296a827abf8c47804d7",
|
||||
`md5(1234)`: "81dc9bdb52d04dc20036dbd8313ed055",
|
||||
`mmh3("Hello")`: "316307400",
|
||||
`remove_bad_chars("abcd", "bc")`: "ad",
|
||||
`replace("Hello", "He", "Ha")`: "Hallo",
|
||||
`concat("Hello", 123, "world")`: "Hello123world",
|
||||
`join("_", "Hello", 123, "world")`: "Hello_123_world",
|
||||
`repeat("a", 5)`: "aaaaa",
|
||||
`repeat("a", "5")`: "aaaaa",
|
||||
`repeat("../", "5")`: "../../../../../",
|
||||
`repeat(5, 5)`: "55555",
|
||||
`replace_regex("He123llo", "(\\d+)", "")`: "Hello",
|
||||
`reverse("abc")`: "cba",
|
||||
`sha1("Hello")`: "f7ff9e8b7bb2e09b70935a5d785e0cc5d9d0abf0",
|
||||
`sha256("Hello")`: "185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969",
|
||||
`sha512("Hello")`: "3615f80c9d293ed7402687f94b22d58e529b8cc7916f8fac7fddf7fbd5af4cf777d3d795a7a00a16bf7e7f3fb9561ee9baae480da9fe7a18769e71886b03f315",
|
||||
`to_lower("HELLO")`: "hello",
|
||||
`to_upper("hello")`: "HELLO",
|
||||
`trim("aaaHelloddd", "ad")`: "Hello",
|
||||
`trim_left("aaaHelloddd", "ad")`: "Helloddd",
|
||||
`trim_prefix("aaHelloaa", "aa")`: "Helloaa",
|
||||
`trim_right("aaaHelloddd", "ad")`: "aaaHello",
|
||||
`trim_space(" Hello ")`: "Hello",
|
||||
`trim_suffix("aaHelloaa", "aa")`: "aaHello",
|
||||
`url_decode("https:%2F%2Fprojectdiscovery.io%3Ftest=1")`: "https://projectdiscovery.io?test=1",
|
||||
`url_encode("https://projectdiscovery.io/test?a=1")`: "https%3A%2F%2Fprojectdiscovery.io%2Ftest%3Fa%3D1",
|
||||
`gzip("Hello")`: "\x1f\x8b\b\x00\x00\x00\x00\x00\x00\xff\xf2H\xcd\xc9\xc9\a\x04\x00\x00\xff\xff\x82\x89\xd1\xf7\x05\x00\x00\x00",
|
||||
`zlib("Hello")`: "\x78\x9c\xf2\x48\xcd\xc9\xc9\x07\x04\x00\x00\xff\xff\x05\x8c\x01\xf5",
|
||||
`zlib_decode(hex_decode("789cf248cdc9c907040000ffff058c01f5"))`: "Hello",
|
||||
`gzip_decode(hex_decode("1f8b08000000000000fff248cdc9c907040000ffff8289d1f705000000"))`: "Hello",
|
||||
`generate_java_gadget("commons-collections3.1", "wget https://{{interactsh-url}}", "base64")`: "rO0ABXNyABFqYXZhLnV0aWwuSGFzaFNldLpEhZWWuLc0AwAAeHB3DAAAAAI/QAAAAAAAAXNyADRvcmcuYXBhY2hlLmNvbW1vbnMuY29sbGVjdGlvbnMua2V5dmFsdWUuVGllZE1hcEVudHJ5iq3SmznBH9sCAAJMAANrZXl0ABJMamF2YS9sYW5nL09iamVjdDtMAANtYXB0AA9MamF2YS91dGlsL01hcDt4cHQAJmh0dHBzOi8vZ2l0aHViLmNvbS9qb2FvbWF0b3NmL2pleGJvc3Mgc3IAKm9yZy5hcGFjaGUuY29tbW9ucy5jb2xsZWN0aW9ucy5tYXAuTGF6eU1hcG7llIKeeRCUAwABTAAHZmFjdG9yeXQALExvcmcvYXBhY2hlL2NvbW1vbnMvY29sbGVjdGlvbnMvVHJhbnNmb3JtZXI7eHBzcgA6b3JnLmFwYWNoZS5jb21tb25zLmNvbGxlY3Rpb25zLmZ1bmN0b3JzLkNoYWluZWRUcmFuc2Zvcm1lcjDHl%2BwoepcEAgABWwANaVRyYW5zZm9ybWVyc3QALVtMb3JnL2FwYWNoZS9jb21tb25zL2NvbGxlY3Rpb25zL1RyYW5zZm9ybWVyO3hwdXIALVtMb3JnLmFwYWNoZS5jb21tb25zLmNvbGxlY3Rpb25zLlRyYW5zZm9ybWVyO71WKvHYNBiZAgAAeHAAAAAFc3IAO29yZy5hcGFjaGUuY29tbW9ucy5jb2xsZWN0aW9ucy5mdW5jdG9ycy5Db25zdGFudFRyYW5zZm9ybWVyWHaQEUECsZQCAAFMAAlpQ29uc3RhbnRxAH4AA3hwdnIAEWphdmEubGFuZy5SdW50aW1lAAAAAAAAAAAAAAB4cHNyADpvcmcuYXBhY2hlLmNvbW1vbnMuY29sbGVjdGlvbnMuZnVuY3RvcnMuSW52b2tlclRyYW5zZm9ybWVyh%2Bj/a3t8zjgCAANbAAVpQXJnc3QAE1tMamF2YS9sYW5nL09iamVjdDtMAAtpTWV0aG9kTmFtZXQAEkxqYXZhL2xhbmcvU3RyaW5nO1sAC2lQYXJhbVR5cGVzdAASW0xqYXZhL2xhbmcvQ2xhc3M7eHB1cgATW0xqYXZhLmxhbmcuT2JqZWN0O5DOWJ8QcylsAgAAeHAAAAACdAAKZ2V0UnVudGltZXVyABJbTGphdmEubGFuZy5DbGFzczurFteuy81amQIAAHhwAAAAAHQACWdldE1ldGhvZHVxAH4AGwAAAAJ2cgAQamF2YS5sYW5nLlN0cmluZ6DwpDh6O7NCAgAAeHB2cQB%2BABtzcQB%2BABN1cQB%2BABgAAAACcHVxAH4AGAAAAAB0AAZpbnZva2V1cQB%2BABsAAAACdnIAEGphdmEubGFuZy5PYmplY3QAAAAAAAAAAAAAAHhwdnEAfgAYc3EAfgATdXIAE1tMamF2YS5sYW5nLlN0cmluZzut0lbn6R17RwIAAHhwAAAAAXQAH3dnZXQgaHR0cHM6Ly97e2ludGVyYWN0c2gtdXJsfX10AARleGVjdXEAfgAbAAAAAXEAfgAgc3EAfgAPc3IAEWphdmEubGFuZy5JbnRlZ2VyEuKgpPeBhzgCAAFJAAV2YWx1ZXhyABBqYXZhLmxhbmcuTnVtYmVyhqyVHQuU4IsCAAB4cAAAAAFzcgARamF2YS51dGlsLkhhc2hNYXAFB9rBwxZg0QMAAkYACmxvYWRGYWN0b3JJAAl0aHJlc2hvbGR4cD9AAAAAAAAAdwgAAAAQAAAAAHh4eA==",
|
||||
`generate_jwt("{\"name\":\"John Doe\",\"foo\":\"bar\"}", "HS256", "hello-world")`: []byte("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIiLCJuYW1lIjoiSm9obiBEb2UifQ.EsrL8lIcYJR_Ns-JuhF3VCllCP7xwbpMCCfHin_WT6U"),
|
||||
`base64_decode("SGVsbG8=")`: "Hello",
|
||||
`hex_decode("6161")`: "aa",
|
||||
`len("Hello")`: float64(5),
|
||||
`len(1234)`: float64(4),
|
||||
`contains("Hello", "lo")`: true,
|
||||
`starts_with("Hello", "He")`: true,
|
||||
`ends_with("Hello", "lo")`: true,
|
||||
"line_starts_with('Hi\nHello', 'He')": true, // back quotes do not support escape sequences
|
||||
"line_ends_with('Hii\nHello', 'ii')": true, // back quotes do not support escape sequences
|
||||
`regex("H([a-z]+)o", "Hello")`: true,
|
||||
`wait_for(1)`: nil,
|
||||
`print_debug(1+2, "Hello")`: nil,
|
||||
`to_number('4')`: float64(4),
|
||||
`to_string(4)`: "4",
|
||||
`dec_to_hex(7001)`: "1b59",
|
||||
`hex_to_dec("ff")`: float64(255),
|
||||
`hex_to_dec("0xff")`: float64(255),
|
||||
`oct_to_dec("0o1234567")`: float64(342391),
|
||||
`oct_to_dec("1234567")`: float64(342391),
|
||||
`oct_to_dec(1234567)`: float64(342391),
|
||||
`bin_to_dec("0b1010")`: float64(10),
|
||||
`bin_to_dec("1010")`: float64(10),
|
||||
`bin_to_dec(1010)`: float64(10),
|
||||
`compare_versions('v1.0.0', '<1.1.1')`: true,
|
||||
`compare_versions('v1.1.1', '>v1.1.0')`: true,
|
||||
`compare_versions('v1.0.0', '>v0.0.1,<v1.0.1')`: true,
|
||||
`compare_versions('v1.0.0', '>v0.0.1', '<v1.0.1')`: true,
|
||||
`hmac('sha1', 'test', 'scrt')`: "8856b111056d946d5c6c92a21b43c233596623c6",
|
||||
`hmac('sha256', 'test', 'scrt')`: "1f1bff5574f18426eb376d6dd5368a754e67a798aa2074644d5e3fd4c90c7a92",
|
||||
`hmac('sha512', 'test', 'scrt')`: "1d3fff1dbb7369c1615ffb494813146bea051ce07e5d44bdeca539653ea97656bf9d38db264cddbe6a83ea15139c8f861a7e73e10e43ad4865e852a9ee6de2e9",
|
||||
`substr('xxtestxxx',2)`: "testxxx",
|
||||
`substr('xxtestxxx',2,-2)`: "testx",
|
||||
`substr('xxtestxxx',2,6)`: "test",
|
||||
`sort(12453)`: "12345",
|
||||
`sort("a1b2c3d4e5")`: "12345abcde",
|
||||
`sort("b", "a", "2", "c", "3", "1", "d", "4")`: []string{"1", "2", "3", "4", "a", "b", "c", "d"},
|
||||
`split("abcdefg", 2)`: []string{"ab", "cd", "ef", "g"},
|
||||
`split("ab,cd,efg", ",", 1)`: []string{"ab,cd,efg"},
|
||||
`split("ab,cd,efg", ",", 2)`: []string{"ab", "cd,efg"},
|
||||
`split("ab,cd,efg", ",", "3")`: []string{"ab", "cd", "efg"},
|
||||
`split("ab,cd,efg", ",", -1)`: []string{"ab", "cd", "efg"},
|
||||
`split("ab,cd,efg", ",")`: []string{"ab", "cd", "efg"},
|
||||
`join(" ", sort("b", "a", "2", "c", "3", "1", "d", "4"))`: "1 2 3 4 a b c d",
|
||||
`uniq(123123231)`: "123",
|
||||
`uniq("abcabdaabbccd")`: "abcd",
|
||||
`uniq("ab", "cd", "12", "34", "12", "cd")`: []string{"ab", "cd", "12", "34"},
|
||||
`join(" ", uniq("ab", "cd", "12", "34", "12", "cd"))`: "ab cd 12 34",
|
||||
`join(", ", split(hex_encode("abcdefg"), 2))`: "61, 62, 63, 64, 65, 66, 67",
|
||||
`json_minify("{ \"name\": \"John Doe\", \"foo\": \"bar\" }")`: "{\"foo\":\"bar\",\"name\":\"John Doe\"}",
|
||||
`json_prettify("{\"foo\":\"bar\",\"name\":\"John Doe\"}")`: "{\n \"foo\": \"bar\",\n \"name\": \"John Doe\"\n}",
|
||||
`resolve("scanme.sh")`: "128.199.158.128",
|
||||
`resolve("scanme.sh","a")`: "128.199.158.128",
|
||||
`resolve("scanme.sh","6")`: "2400:6180:0:d0::91:1001",
|
||||
`resolve("scanme.sh","aaaa")`: "2400:6180:0:d0::91:1001",
|
||||
`resolve("scanme.sh","soa")`: "ns69.domaincontrol.com",
|
||||
`ip_format('127.0.0.1', '1')`: "127.0.0.1",
|
||||
`ip_format('127.0.0.1', '3')`: "0177.0.0.01",
|
||||
`ip_format('127.0.0.1', '5')`: "281472812449793",
|
||||
`ip_format('127.0.1.0', '11')`: "127.0.256",
|
||||
`resolve("scanme.sh")`: "128.199.158.128",
|
||||
`resolve("scanme.sh","a")`: "128.199.158.128",
|
||||
`resolve("scanme.sh","6")`: "2400:6180:0:d0::91:1001",
|
||||
`resolve("scanme.sh","aaaa")`: "2400:6180:0:d0::91:1001",
|
||||
`resolve("scanme.sh","soa")`: "ns69.domaincontrol.com",
|
||||
}
|
||||
|
||||
testDslExpressionScenarios(t, dslExpressions)
|
||||
}
|
||||
|
||||
func TestDateTimeDSLFunction(t *testing.T) {
|
||||
testDateTimeFormat := func(t *testing.T, dateTimeFormat string, dateTimeFunction *govaluate.EvaluableExpression, expectedFormattedTime string, currentUnixTime int64) {
|
||||
dslFunctionParameters := map[string]interface{}{"dateTimeFormat": dateTimeFormat}
|
||||
|
||||
if currentUnixTime != 0 {
|
||||
dslFunctionParameters["unixTime"] = currentUnixTime
|
||||
}
|
||||
|
||||
result, err := dateTimeFunction.Evaluate(dslFunctionParameters)
|
||||
|
||||
require.Nil(t, err, "could not evaluate compare time")
|
||||
|
||||
require.Equal(t, expectedFormattedTime, result.(string), "could not get correct time format string")
|
||||
}
|
||||
|
||||
t.Run("with unix time", func(t *testing.T) {
|
||||
dateTimeFunction, err := govaluate.NewEvaluableExpressionWithFunctions("date_time(dateTimeFormat)", HelperFunctions)
|
||||
require.Nil(t, err, "could not compile encoder")
|
||||
|
||||
currentTime := time.Now()
|
||||
expectedFormattedTime := currentTime.Format("02-01-2006 15:04")
|
||||
testDateTimeFormat(t, "02-01-2006 15:04", dateTimeFunction, expectedFormattedTime, 0)
|
||||
testDateTimeFormat(t, "%D-%M-%Y %H:%m", dateTimeFunction, expectedFormattedTime, 0)
|
||||
})
|
||||
|
||||
t.Run("without unix time", func(t *testing.T) {
|
||||
dateTimeFunction, err := govaluate.NewEvaluableExpressionWithFunctions("date_time(dateTimeFormat, unixTime)", HelperFunctions)
|
||||
require.Nil(t, err, "could not compile encoder")
|
||||
|
||||
currentTime := time.Now()
|
||||
currentUnixTime := currentTime.Unix()
|
||||
expectedFormattedTime := currentTime.Format("02-01-2006 15:04")
|
||||
testDateTimeFormat(t, "02-01-2006 15:04", dateTimeFunction, expectedFormattedTime, currentUnixTime)
|
||||
testDateTimeFormat(t, "%D-%M-%Y %H:%m", dateTimeFunction, expectedFormattedTime, currentUnixTime)
|
||||
})
|
||||
}
|
||||
|
||||
func TestDateTimeDslExpressions(t *testing.T) {
|
||||
t.Run("date_time", func(t *testing.T) {
|
||||
now := time.Now()
|
||||
|
||||
dslExpressions := map[string]interface{}{
|
||||
`date_time("%Y-%M-%D")`: fmt.Sprintf("%02d-%02d-%02d", now.Year(), now.Month(), now.Day()),
|
||||
`date_time("%Y-%M-%D", unix_time())`: fmt.Sprintf("%02d-%02d-%02d", now.Year(), now.Month(), now.Day()),
|
||||
`date_time("%Y-%M-%D", 1642032000)`: time.Date(2022, 01, 13, 0, 0, 0, 0, time.UTC).Local().Format("2006-01-02"),
|
||||
`date_time("%H-%m")`: fmt.Sprintf("%02d-%02d", now.Hour(), now.Minute()),
|
||||
`date_time("02-01-2006", unix_time())`: now.Format("02-01-2006"),
|
||||
`date_time("02-01-2006", 1642032000)`: time.Date(2022, 01, 13, 0, 0, 0, 0, time.UTC).Local().Format("02-01-2006"),
|
||||
}
|
||||
|
||||
testDslExpressionScenarios(t, dslExpressions)
|
||||
})
|
||||
|
||||
t.Run("to_unix_time(input string) int", func(t *testing.T) {
|
||||
expectedUtcTime := time.Date(2022, 01, 13, 16, 30, 10, 0, time.UTC)
|
||||
|
||||
dateTimeInputs := map[string]time.Time{
|
||||
// UTC time
|
||||
"2022-01-13T16:30:10Z": expectedUtcTime,
|
||||
"2022-01-13T16:30:10+00:00": expectedUtcTime,
|
||||
"2022-01-13T16:30:10-00:00": expectedUtcTime,
|
||||
|
||||
// explicit time offset
|
||||
"2022-01-13 16:30:10 +01:00": time.Date(2022, 01, 13, 16, 30, 10, 0, time.FixedZone("UTC+1", 60*60)),
|
||||
"2022-01-13 16:30 +01:00": time.Date(2022, 01, 13, 16, 30, 0, 0, time.FixedZone("UTC+1", 60*60)),
|
||||
"2022-01-13 +02:00": time.Date(2022, 01, 13, 0, 0, 0, 0, time.FixedZone("UTC+2", 2*60*60)),
|
||||
"2022-01-13 -02:00": time.Date(2022, 01, 13, 0, 0, 0, 0, time.FixedZone("UTC+2", -2*60*60)),
|
||||
|
||||
// local time
|
||||
"2022-01-13 16:30:10": time.Date(2022, 01, 13, 16, 30, 10, 0, time.Local),
|
||||
"2022-01-13 16:30": time.Date(2022, 01, 13, 16, 30, 0, 0, time.Local),
|
||||
"2022-01-13": time.Date(2022, 01, 13, 0, 0, 0, 0, time.Local),
|
||||
}
|
||||
|
||||
for dateTimeInput, expectedTime := range dateTimeInputs {
|
||||
dslExpression := fmt.Sprintf(`to_unix_time("%s")`, dateTimeInput)
|
||||
t.Run(dslExpression, func(t *testing.T) {
|
||||
actual := evaluateExpression(t, dslExpression)
|
||||
assert.Equal(t, expectedTime.Unix(), actual)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("to_unix_time(input string, layout string) int", func(t *testing.T) {
|
||||
testScenarios := []struct {
|
||||
inputDateTime string
|
||||
layout string
|
||||
expectedTime time.Time
|
||||
}{
|
||||
{"2022-01-13T16:30:10+02:00", time.RFC3339, time.Date(2022, 01, 13, 16, 30, 10, 0, time.FixedZone("UTC+2", 2*60*60))},
|
||||
{"13-01-2022 16:30:10", "02-01-2006 15:04:05", time.Date(2022, 01, 13, 16, 30, 10, 0, time.UTC)},
|
||||
{"13-01-2022 16:30", "02-01-2006 15:04", time.Date(2022, 01, 13, 16, 30, 0, 0, time.UTC)},
|
||||
{"13-01-2022", "02-01-2006", time.Date(2022, 01, 13, 0, 0, 0, 0, time.UTC)},
|
||||
|
||||
{"13-01-2022 16:30:10 +02:00", "02-01-2006 15:04:05 Z07:00", time.Date(2022, 01, 13, 16, 30, 10, 0, time.FixedZone("UTC+2", 2*60*60))},
|
||||
{"13-01-2022 16:30 +01:00", "02-01-2006 15:04 Z07:00", time.Date(2022, 01, 13, 16, 30, 0, 0, time.FixedZone("UTC+1", 60*60))},
|
||||
{"13-01-2022 -03:30", "02-01-2006 Z07:00", time.Date(2022, 01, 13, 0, 0, 0, 0, time.FixedZone("UTC-3:30", -3*60*60-30*60))},
|
||||
}
|
||||
|
||||
for _, testScenario := range testScenarios {
|
||||
dslExpression := fmt.Sprintf(`to_unix_time("%s", "%s")`, testScenario.inputDateTime, testScenario.layout)
|
||||
t.Run(dslExpression, func(t *testing.T) {
|
||||
actual := evaluateExpression(t, dslExpression)
|
||||
assert.Equal(t, testScenario.expectedTime.Unix(), actual)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func TestRandDslExpressions(t *testing.T) {
|
||||
randDslExpressions := map[string]string{
|
||||
`rand_base(10, "")`: `[a-zA-Z0-9]{10}`,
|
||||
`rand_base(5, "abc")`: `[abc]{5}`,
|
||||
`rand_base(5)`: `[a-zA-Z0-9]{5}`,
|
||||
`rand_char("abc")`: `[abc]{1}`,
|
||||
`rand_char("")`: `[a-zA-Z0-9]{1}`,
|
||||
`rand_char()`: `[a-zA-Z0-9]{1}`,
|
||||
`rand_ip("192.168.0.0/24")`: `(?:[0-9]{1,3}\.){3}[0-9]{1,3}$`,
|
||||
`rand_ip("2001:db8::/64")`: `(?:[A-Fa-f0-9]{0,4}:){0,7}[A-Fa-f0-9]{0,4}$`,
|
||||
|
||||
`rand_text_alpha(10, "abc")`: `[^abc]{10}`,
|
||||
`rand_text_alpha(10, "")`: `[a-zA-Z]{10}`,
|
||||
`rand_text_alpha(10)`: `[a-zA-Z]{10}`,
|
||||
`rand_text_alphanumeric(10, "ab12")`: `[^ab12]{10}`,
|
||||
`rand_text_alphanumeric(5, "")`: `[a-zA-Z0-9]{5}`,
|
||||
`rand_text_alphanumeric(10)`: `[a-zA-Z0-9]{10}`,
|
||||
`rand_text_numeric(10, 123)`: `[^123]{10}`,
|
||||
`rand_text_numeric(10)`: `\d{10}`,
|
||||
}
|
||||
|
||||
for randDslExpression, regexTester := range randDslExpressions {
|
||||
t.Run(randDslExpression, func(t *testing.T) {
|
||||
actualResult := evaluateExpression(t, randDslExpression)
|
||||
|
||||
compiledTester := regexp.MustCompile(fmt.Sprintf("^%s$", regexTester))
|
||||
|
||||
fmt.Printf("%s: \t %v\n", randDslExpression, actualResult)
|
||||
|
||||
stringResult := types.ToString(actualResult)
|
||||
|
||||
assert.True(t, compiledTester.MatchString(stringResult), "The result '%s' of '%s' expression does not match the expected regex: '%s'", actualResult, randDslExpression, regexTester)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestRandIntDslExpressions(t *testing.T) {
|
||||
randIntDslExpressions := map[string]func(int) bool{
|
||||
`rand_int(5, 9)`: func(i int) bool {
|
||||
return i >= 5 && i <= 9
|
||||
},
|
||||
`rand_int(9)`: func(i int) bool {
|
||||
return i >= 9
|
||||
},
|
||||
`rand_int()`: func(i int) bool {
|
||||
return i >= 0 && i <= math.MaxInt32
|
||||
},
|
||||
}
|
||||
|
||||
for randIntDslExpression, tester := range randIntDslExpressions {
|
||||
t.Run(randIntDslExpression, func(t *testing.T) {
|
||||
actualResult := evaluateExpression(t, randIntDslExpression)
|
||||
|
||||
actualIntResult := actualResult.(int)
|
||||
assert.True(t, tester(actualIntResult), "The '%d' result of the '%s' expression, does not match th expected validation function.", actualIntResult, randIntDslExpression)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func evaluateExpression(t *testing.T, dslExpression string) interface{} {
|
||||
compiledExpression, err := govaluate.NewEvaluableExpressionWithFunctions(dslExpression, HelperFunctions)
|
||||
require.NoError(t, err, "Error while compiling the %q expression", dslExpression)
|
||||
|
|
|
@ -24,6 +24,7 @@ import (
|
|||
"github.com/projectdiscovery/nuclei/v2/pkg/types"
|
||||
"github.com/projectdiscovery/nuclei/v2/pkg/utils"
|
||||
fileutil "github.com/projectdiscovery/utils/file"
|
||||
osutils "github.com/projectdiscovery/utils/os"
|
||||
)
|
||||
|
||||
// Writer is an interface which writes output to somewhere for nuclei events.
|
||||
|
@ -180,7 +181,7 @@ func NewStandardWriter(options *types.Options) (*StandardWriter, error) {
|
|||
}
|
||||
}
|
||||
writer := &StandardWriter{
|
||||
json: options.JSON,
|
||||
json: options.JSONL,
|
||||
jsonReqResp: options.JSONRequests,
|
||||
noMetadata: options.NoMeta,
|
||||
matcherStatus: options.MatcherStatus,
|
||||
|
@ -322,6 +323,9 @@ func sanitizeFileName(fileName string) string {
|
|||
fileName = strings.ReplaceAll(fileName, "\\", "_")
|
||||
fileName = strings.ReplaceAll(fileName, "-", "_")
|
||||
fileName = strings.ReplaceAll(fileName, ".", "_")
|
||||
if osutils.IsWindows() {
|
||||
fileName = strings.ReplaceAll(fileName, ":", "_")
|
||||
}
|
||||
fileName = strings.TrimPrefix(fileName, "__")
|
||||
return fileName
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/projectdiscovery/fileutil"
|
||||
"github.com/projectdiscovery/nuclei/v2/pkg/types"
|
||||
fileutil "github.com/projectdiscovery/utils/file"
|
||||
folderutil "github.com/projectdiscovery/utils/folder"
|
||||
)
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ type Action struct {
|
|||
//
|
||||
// This can be used to execute code, for instance in browser
|
||||
// DOM using script action, and get the result in a variable
|
||||
// which can be matched upon by nuclei. An Example template [here](https://github.com/projectdiscovery/nuclei-templates/blob/master/headless/prototype-pollution-check.yaml).
|
||||
// which can be matched upon by nuclei. An Example template [here](https://github.com/projectdiscovery/nuclei-templates/blob/main/headless/prototype-pollution-check.yaml).
|
||||
Name string `yaml:"name,omitempty" json:"name,omitempty" jsonschema:"title=name for headless action,description=Name is the name assigned to the headless action"`
|
||||
// description: |
|
||||
// Description is the optional description of the headless action
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"net"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
@ -16,7 +17,12 @@ import (
|
|||
"github.com/go-rod/rod/lib/proto"
|
||||
"github.com/go-rod/rod/lib/utils"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/projectdiscovery/gologger"
|
||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/generators"
|
||||
errorutil "github.com/projectdiscovery/utils/errors"
|
||||
fileutil "github.com/projectdiscovery/utils/file"
|
||||
folderutil "github.com/projectdiscovery/utils/folder"
|
||||
stringsutil "github.com/projectdiscovery/utils/strings"
|
||||
"github.com/segmentio/ksuid"
|
||||
)
|
||||
|
||||
|
@ -325,10 +331,27 @@ func (p *Page) Screenshot(act *Action, out map[string]string) error {
|
|||
if err != nil {
|
||||
return errors.Wrap(err, "could not take screenshot")
|
||||
}
|
||||
err = os.WriteFile(to+".png", data, 0540)
|
||||
if p.getActionArgWithDefaultValues(act, "mkdir") == "true" && stringsutil.ContainsAny(to, folderutil.UnixPathSeparator, folderutil.WindowsPathSeparator) {
|
||||
// creates new directory if needed based on path `to`
|
||||
// TODO: replace all permission bits with fileutil constants (https://github.com/projectdiscovery/utils/issues/113)
|
||||
if err := os.MkdirAll(filepath.Dir(to), 0700); err != nil {
|
||||
return errorutil.NewWithErr(err).Msgf("failed to create directory while writing screenshot")
|
||||
}
|
||||
}
|
||||
filePath := to
|
||||
if !strings.HasSuffix(to, ".png") {
|
||||
filePath += ".png"
|
||||
}
|
||||
|
||||
if fileutil.FileExists(filePath) {
|
||||
// return custom error as overwriting files is not supported
|
||||
return errorutil.NewWithTag("screenshot", "failed to write screenshot, file %v already exists", filePath)
|
||||
}
|
||||
err = os.WriteFile(filePath, data, 0540)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not write screenshot")
|
||||
}
|
||||
gologger.Info().Msgf("Screenshot successfully saved at %v\n", filePath)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -3,10 +3,13 @@ package engine
|
|||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
@ -190,18 +193,50 @@ func TestActionScreenshot(t *testing.T) {
|
|||
<body>Nuclei Test Page</body>
|
||||
</html>`
|
||||
|
||||
// filePath where screenshot is saved
|
||||
filePath := filepath.Join(os.TempDir(), "test.png")
|
||||
actions := []*Action{
|
||||
{ActionType: ActionTypeHolder{ActionType: ActionNavigate}, Data: map[string]string{"url": "{{BaseURL}}"}},
|
||||
{ActionType: ActionTypeHolder{ActionType: ActionWaitLoad}},
|
||||
{ActionType: ActionTypeHolder{ActionType: ActionScreenshot}, Data: map[string]string{"to": "test"}},
|
||||
{ActionType: ActionTypeHolder{ActionType: ActionScreenshot}, Data: map[string]string{"to": filePath}},
|
||||
}
|
||||
|
||||
testHeadlessSimpleResponse(t, response, actions, 20*time.Second, func(page *Page, err error, out map[string]string) {
|
||||
require.Nil(t, err, "could not run page actions")
|
||||
require.Equal(t, "Nuclei Test Page", page.Page().MustInfo().Title, "could not navigate correctly")
|
||||
el := page.Page()
|
||||
require.FileExists(t, "test.png", el, "could not get screenshot file")
|
||||
_ = os.Remove("test.png")
|
||||
_ = page.Page()
|
||||
require.FileExists(t, filePath, "could not find screenshot file %v", filePath)
|
||||
if err := os.RemoveAll(filePath); err != nil {
|
||||
t.Logf("got error %v while deleting temp file", err)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func TestActionScreenshotToDir(t *testing.T) {
|
||||
response := `
|
||||
<html>
|
||||
<head>
|
||||
<title>Nuclei Test Page</title>
|
||||
</head>
|
||||
<body>Nuclei Test Page</body>
|
||||
</html>`
|
||||
|
||||
filePath := filepath.Join(os.TempDir(), "screenshot-"+strconv.Itoa(rand.Intn(1000)), "test.png")
|
||||
|
||||
actions := []*Action{
|
||||
{ActionType: ActionTypeHolder{ActionType: ActionNavigate}, Data: map[string]string{"url": "{{BaseURL}}"}},
|
||||
{ActionType: ActionTypeHolder{ActionType: ActionWaitLoad}},
|
||||
{ActionType: ActionTypeHolder{ActionType: ActionScreenshot}, Data: map[string]string{"to": filePath, "mkdir": "true"}},
|
||||
}
|
||||
|
||||
testHeadlessSimpleResponse(t, response, actions, 20*time.Second, func(page *Page, err error, out map[string]string) {
|
||||
require.Nil(t, err, "could not run page actions")
|
||||
require.Equal(t, "Nuclei Test Page", page.Page().MustInfo().Title, "could not navigate correctly")
|
||||
_ = page.Page()
|
||||
require.FileExists(t, filePath, "could not find screenshot file %v", filePath)
|
||||
if err := os.RemoveAll(filePath); err != nil {
|
||||
t.Logf("got error %v while deleting temp file", err)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ type Request struct {
|
|||
MaxVersion string `yaml:"max_version,omitempty" json:"max_version,omitempty" jsonschema:"title=Max. TLS version,description=Max tls version - automatic if not specified.,enum=sslv3,enum=tls10,enum=tls11,enum=tls12,enum=tls13"`
|
||||
// description: |
|
||||
// Client Cipher Suites - auto if not specified.
|
||||
CiperSuites []string `yaml:"cipher_suites,omitempty" json:"cipher_suites,omitempty"`
|
||||
CipherSuites []string `yaml:"cipher_suites,omitempty" json:"cipher_suites,omitempty"`
|
||||
// description: |
|
||||
// Tls Scan Mode - auto if not specified
|
||||
// values:
|
||||
|
@ -83,7 +83,7 @@ type Request struct {
|
|||
|
||||
// CanCluster returns true if the request can be clustered.
|
||||
func (request *Request) CanCluster(other *Request) bool {
|
||||
if len(request.CiperSuites) > 0 || request.MinVersion != "" || request.MaxVersion != "" {
|
||||
if len(request.CipherSuites) > 0 || request.MinVersion != "" || request.MaxVersion != "" {
|
||||
return false
|
||||
}
|
||||
if request.Address != other.Address || request.ScanMode != other.ScanMode {
|
||||
|
@ -127,7 +127,7 @@ func (request *Request) Compile(options *protocols.ExecuterOptions) error {
|
|||
MisMatched: true,
|
||||
MinVersion: request.MinVersion,
|
||||
MaxVersion: request.MaxVersion,
|
||||
Ciphers: request.CiperSuites,
|
||||
Ciphers: request.CipherSuites,
|
||||
WildcardCertCheck: true,
|
||||
Retries: request.options.Options.Retries,
|
||||
Timeout: request.options.Options.Timeout,
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
package jsonexporter
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/projectdiscovery/nuclei/v2/pkg/output"
|
||||
"os"
|
||||
"sync"
|
||||
)
|
||||
|
||||
type Exporter struct {
|
||||
options *Options
|
||||
mutex *sync.Mutex
|
||||
rows []output.ResultEvent
|
||||
}
|
||||
|
||||
// Options contains the configuration options for JSON exporter client
|
||||
type Options struct {
|
||||
// File is the file to export found JSON result to
|
||||
File string `yaml:"file"`
|
||||
}
|
||||
|
||||
// New creates a new JSON exporter integration client based on options.
|
||||
func New(options *Options) (*Exporter, error) {
|
||||
exporter := &Exporter{
|
||||
mutex: &sync.Mutex{},
|
||||
options: options,
|
||||
rows: []output.ResultEvent{},
|
||||
}
|
||||
return exporter, nil
|
||||
}
|
||||
|
||||
// Export appends the passed result event to the list of objects to be exported to
|
||||
// the resulting JSON file
|
||||
func (exporter *Exporter) Export(event *output.ResultEvent) error {
|
||||
exporter.mutex.Lock()
|
||||
defer exporter.mutex.Unlock()
|
||||
|
||||
// Add the event to the rows
|
||||
exporter.rows = append(exporter.rows, *event)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Close writes the in-memory data to the JSON file specified by options.JSONExport
|
||||
// and closes the exporter after operation
|
||||
func (exporter *Exporter) Close() error {
|
||||
exporter.mutex.Lock()
|
||||
defer exporter.mutex.Unlock()
|
||||
|
||||
// Convert the rows to JSON byte array
|
||||
obj, err := json.Marshal(exporter.rows)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to generate JSON report")
|
||||
}
|
||||
|
||||
// Attempt to write the JSON to file specified in options.JSONExport
|
||||
if err := os.WriteFile(exporter.options.File, obj, 0644); err != nil {
|
||||
return errors.Wrap(err, "failed to create JSON file")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -57,7 +57,7 @@ func (exporter *Exporter) Export(event *output.ResultEvent) error {
|
|||
filenameBuilder := &strings.Builder{}
|
||||
filenameBuilder.WriteString(event.TemplateID)
|
||||
filenameBuilder.WriteString("-")
|
||||
filenameBuilder.WriteString(strings.ReplaceAll(strings.ReplaceAll(event.Matched, "/", "_"), ":", "_"))
|
||||
filenameBuilder.WriteString(stringsutil.ReplaceAll(event.Matched, "_", "/", ":"))
|
||||
|
||||
var suffix string
|
||||
if event.MatcherName != "" {
|
||||
|
|
|
@ -2,6 +2,7 @@ package reporting
|
|||
|
||||
import (
|
||||
"github.com/projectdiscovery/nuclei/v2/pkg/reporting/exporters/es"
|
||||
"github.com/projectdiscovery/nuclei/v2/pkg/reporting/exporters/jsonexporter"
|
||||
"github.com/projectdiscovery/nuclei/v2/pkg/reporting/exporters/markdown"
|
||||
"github.com/projectdiscovery/nuclei/v2/pkg/reporting/exporters/sarif"
|
||||
"github.com/projectdiscovery/nuclei/v2/pkg/reporting/exporters/splunk"
|
||||
|
@ -31,6 +32,8 @@ type Options struct {
|
|||
ElasticsearchExporter *es.Options `yaml:"elasticsearch"`
|
||||
// SplunkExporter contains configuration options for splunkhec Exporter Module
|
||||
SplunkExporter *splunk.Options `yaml:"splunkhec"`
|
||||
// JSONExporter contains configuration options for JSON Exporter Module
|
||||
JSONExporter *jsonexporter.Options `yaml:"json"`
|
||||
|
||||
HttpClient *retryablehttp.Client `yaml:"-"`
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package reporting
|
||||
|
||||
import (
|
||||
json_exporter "github.com/projectdiscovery/nuclei/v2/pkg/reporting/exporters/jsonexporter"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
|
@ -133,6 +134,13 @@ func New(options *Options, db string) (Client, error) {
|
|||
}
|
||||
client.exporters = append(client.exporters, exporter)
|
||||
}
|
||||
if options.JSONExporter != nil {
|
||||
exporter, err := json_exporter.New(options.JSONExporter)
|
||||
if err != nil {
|
||||
return nil, errorutil.NewWithErr(err).Wrap(ErrExportClientCreation)
|
||||
}
|
||||
client.exporters = append(client.exporters, exporter)
|
||||
}
|
||||
if options.ElasticsearchExporter != nil {
|
||||
options.ElasticsearchExporter.HttpClient = options.HttpClient
|
||||
exporter, err := es.New(options.ElasticsearchExporter)
|
||||
|
|
|
@ -7,6 +7,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/andygrunwald/go-jira"
|
||||
"github.com/trivago/tgo/tcontainer"
|
||||
|
||||
"github.com/projectdiscovery/gologger"
|
||||
"github.com/projectdiscovery/nuclei/v2/pkg/catalog/config"
|
||||
|
@ -44,9 +45,13 @@ type Options struct {
|
|||
// issue.
|
||||
SeverityAsLabel bool `yaml:"severity-as-label" json:"severity_as_label"`
|
||||
// Severity (optional) is the severity of the issue.
|
||||
Severity []string `yaml:"severity" json:"severity"`
|
||||
|
||||
Severity []string `yaml:"severity" json:"severity"`
|
||||
HttpClient *retryablehttp.Client `yaml:"-" json:"-"`
|
||||
// for each customfield specified in the configuration options
|
||||
// we will create a map of customfield name to the value
|
||||
// that will be used to create the issue
|
||||
CustomFields map[string]interface{} `yaml:"custom-fields" json:"custom_fields"`
|
||||
StatusNot string `yaml:"status-not" json:"status_not"`
|
||||
}
|
||||
|
||||
// New creates a new issue tracker integration client based on options.
|
||||
|
@ -80,15 +85,55 @@ func (i *Integration) CreateNewIssue(event *output.ResultEvent) error {
|
|||
if label := i.options.IssueType; label != "" {
|
||||
labels = append(labels, label)
|
||||
}
|
||||
|
||||
// for each custom value, take the name of the custom field and
|
||||
// set the value of the custom field to the value specified in the
|
||||
// configuration options
|
||||
customFields := tcontainer.NewMarshalMap()
|
||||
for name, value := range i.options.CustomFields {
|
||||
//customFields[name] = map[string]interface{}{"value": value}
|
||||
if valueMap, ok := value.(map[interface{}]interface{}); ok {
|
||||
// Iterate over nested map
|
||||
for nestedName, nestedValue := range valueMap {
|
||||
fmtNestedValue, ok := nestedValue.(string)
|
||||
if !ok {
|
||||
return fmt.Errorf(`couldn't iterate on nested item "%s": %s`, nestedName, nestedValue)
|
||||
}
|
||||
if strings.HasPrefix(fmtNestedValue, "$") {
|
||||
nestedValue = strings.TrimPrefix(fmtNestedValue, "$")
|
||||
switch nestedValue {
|
||||
case "CVSSMetrics":
|
||||
nestedValue = event.Info.Classification.CVSSMetrics
|
||||
case "CVEID":
|
||||
nestedValue = event.Info.Classification.CVEID
|
||||
case "CWEID":
|
||||
nestedValue = event.Info.Classification.CWEID
|
||||
case "CVSSScore":
|
||||
nestedValue = event.Info.Classification.CVSSScore
|
||||
case "Host":
|
||||
nestedValue = event.Host
|
||||
case "Severity":
|
||||
nestedValue = event.Info.SeverityHolder
|
||||
case "Name":
|
||||
nestedValue = event.Info.Name
|
||||
}
|
||||
}
|
||||
switch nestedName {
|
||||
case "id":
|
||||
customFields[name] = map[string]interface{}{"id": nestedValue}
|
||||
case "name":
|
||||
customFields[name] = map[string]interface{}{"value": nestedValue}
|
||||
case "freeform":
|
||||
customFields[name] = nestedValue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
fields := &jira.IssueFields{
|
||||
Assignee: &jira.User{AccountID: i.options.AccountID},
|
||||
Reporter: &jira.User{AccountID: i.options.AccountID},
|
||||
Description: jiraFormatDescription(event),
|
||||
Unknowns: customFields,
|
||||
Type: jira.IssueType{Name: i.options.IssueType},
|
||||
Project: jira.Project{Key: i.options.ProjectName},
|
||||
Summary: summary,
|
||||
Labels: labels,
|
||||
}
|
||||
// On-prem version of Jira server does not use AccountID
|
||||
if !i.options.Cloud {
|
||||
|
@ -99,6 +144,7 @@ func (i *Integration) CreateNewIssue(event *output.ResultEvent) error {
|
|||
Project: jira.Project{Key: i.options.ProjectName},
|
||||
Summary: summary,
|
||||
Labels: labels,
|
||||
Unknowns: customFields,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -136,7 +182,7 @@ func (i *Integration) CreateIssue(event *output.ResultEvent) error {
|
|||
// FindExistingIssue checks if the issue already exists and returns its ID
|
||||
func (i *Integration) FindExistingIssue(event *output.ResultEvent) (string, error) {
|
||||
template := format.GetMatchedTemplate(event)
|
||||
jql := fmt.Sprintf("summary ~ \"%s\" AND summary ~ \"%s\" AND status = \"Open\"", template, event.Host)
|
||||
jql := fmt.Sprintf("summary ~ \"%s\" AND summary ~ \"%s\" AND status != \"%s\"", template, event.Host, i.options.StatusNot)
|
||||
|
||||
searchOptions := &jira.SearchOptions{
|
||||
MaxResults: 1, // if any issue exists, then we won't create a new one
|
||||
|
|
|
@ -18,6 +18,7 @@ import (
|
|||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/whois"
|
||||
"github.com/projectdiscovery/nuclei/v2/pkg/templates/types"
|
||||
"github.com/projectdiscovery/nuclei/v2/pkg/workflows"
|
||||
errorutil "github.com/projectdiscovery/utils/errors"
|
||||
"go.uber.org/multierr"
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
@ -45,10 +46,17 @@ type Template struct {
|
|||
Info model.Info `yaml:"info" json:"info" jsonschema:"title=info for the template,description=Info contains metadata for the template"`
|
||||
// description: |
|
||||
// Requests contains the http request to make in the template.
|
||||
// WARNING: 'requests' will be deprecated and will be removed in a future release. Please use 'http' instead.
|
||||
// examples:
|
||||
// - value: exampleNormalHTTPRequest
|
||||
RequestsHTTP []*http.Request `yaml:"requests,omitempty" json:"requests,omitempty" jsonschema:"title=http requests to make,description=HTTP requests to make for the template"`
|
||||
// description: |
|
||||
// HTTP contains the http request to make in the template.
|
||||
// examples:
|
||||
// - value: exampleNormalHTTPRequest
|
||||
// RequestsWithHTTP is placeholder(internal) only, and should not be used instead use RequestsHTTP
|
||||
RequestsWithHTTP []*http.Request `yaml:"http,omitempty" json:"http,omitempty" jsonschema:"title=http requests to make,description=HTTP requests to make for the template"`
|
||||
// description: |
|
||||
// DNS contains the dns request to make in the template
|
||||
// examples:
|
||||
// - value: exampleNormalDNSRequest
|
||||
|
@ -60,10 +68,17 @@ type Template struct {
|
|||
RequestsFile []*file.Request `yaml:"file,omitempty" json:"file,omitempty" jsonschema:"title=file requests to make,description=File requests to make for the template"`
|
||||
// description: |
|
||||
// Network contains the network request to make in the template
|
||||
// WARNING: 'network' will be deprecated and will be removed in a future release. Please use 'tcp' instead.
|
||||
// examples:
|
||||
// - value: exampleNormalNetworkRequest
|
||||
RequestsNetwork []*network.Request `yaml:"network,omitempty" json:"network,omitempty" jsonschema:"title=network requests to make,description=Network requests to make for the template"`
|
||||
// description: |
|
||||
// TCP contains the network request to make in the template
|
||||
// examples:
|
||||
// - value: exampleNormalNetworkRequest
|
||||
// RequestsWithTCP is placeholder(internal) only, and should not be used instead use RequestsNetwork
|
||||
RequestsWithTCP []*network.Request `yaml:"tcp,omitempty" json:"tcp,omitempty" jsonschema:"title=network(tcp) requests to make,description=Network requests to make for the template"`
|
||||
// description: |
|
||||
// Headless contains the headless request to make in the template.
|
||||
RequestsHeadless []*headless.Request `yaml:"headless,omitempty" json:"headless,omitempty" jsonschema:"title=headless requests to make,description=Headless requests to make for the template"`
|
||||
// description: |
|
||||
|
@ -164,6 +179,19 @@ func (template *Template) UnmarshalYAML(unmarshal func(interface{}) error) error
|
|||
return err
|
||||
}
|
||||
*template = Template(*alias)
|
||||
|
||||
if len(alias.RequestsHTTP) > 0 && len(alias.RequestsWithHTTP) > 0 {
|
||||
return errorutil.New("use http or requests, both are not supported").WithTag("invalid template")
|
||||
}
|
||||
if len(alias.RequestsNetwork) > 0 && len(alias.RequestsWithTCP) > 0 {
|
||||
return errorutil.New("use tcp or network, both are not supported").WithTag("invalid template")
|
||||
}
|
||||
if len(alias.RequestsWithHTTP) > 0 {
|
||||
template.RequestsHTTP = alias.RequestsWithHTTP
|
||||
}
|
||||
if len(alias.RequestsWithTCP) > 0 {
|
||||
template.RequestsNetwork = alias.RequestsWithTCP
|
||||
}
|
||||
return validate.New().Struct(template)
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ func init() {
|
|||
TemplateDoc.Type = "Template"
|
||||
TemplateDoc.Comments[encoder.LineComment] = " Template is a YAML input file which defines all the requests and"
|
||||
TemplateDoc.Description = "Template is a YAML input file which defines all the requests and\n other metadata for a template."
|
||||
TemplateDoc.Fields = make([]encoder.Doc, 14)
|
||||
TemplateDoc.Fields = make([]encoder.Doc, 16)
|
||||
TemplateDoc.Fields[0].Name = "id"
|
||||
TemplateDoc.Fields[0].Type = "string"
|
||||
TemplateDoc.Fields[0].Note = ""
|
||||
|
@ -60,74 +60,84 @@ func init() {
|
|||
TemplateDoc.Fields[2].Name = "requests"
|
||||
TemplateDoc.Fields[2].Type = "[]http.Request"
|
||||
TemplateDoc.Fields[2].Note = ""
|
||||
TemplateDoc.Fields[2].Description = "Requests contains the http request to make in the template."
|
||||
TemplateDoc.Fields[2].Description = "Requests contains the http request to make in the template.\nWARNING: 'requests' will be deprecated and will be removed in a future release. Please use 'http' instead."
|
||||
TemplateDoc.Fields[2].Comments[encoder.LineComment] = "Requests contains the http request to make in the template."
|
||||
|
||||
TemplateDoc.Fields[2].AddExample("", exampleNormalHTTPRequest)
|
||||
TemplateDoc.Fields[3].Name = "dns"
|
||||
TemplateDoc.Fields[3].Type = "[]dns.Request"
|
||||
TemplateDoc.Fields[3].Name = "http"
|
||||
TemplateDoc.Fields[3].Type = "[]http.Request"
|
||||
TemplateDoc.Fields[3].Note = ""
|
||||
TemplateDoc.Fields[3].Description = "DNS contains the dns request to make in the template"
|
||||
TemplateDoc.Fields[3].Comments[encoder.LineComment] = "DNS contains the dns request to make in the template"
|
||||
|
||||
TemplateDoc.Fields[3].AddExample("", exampleNormalDNSRequest)
|
||||
TemplateDoc.Fields[4].Name = "file"
|
||||
TemplateDoc.Fields[4].Type = "[]file.Request"
|
||||
TemplateDoc.Fields[3].Description = "description: |\n HTTP contains the http request to make in the template.\n examples:\n - value: exampleNormalHTTPRequest\n RequestsWithHTTP is placeholder(internal) only, and should not be used instead use RequestsHTTP"
|
||||
TemplateDoc.Fields[3].Comments[encoder.LineComment] = " description: |"
|
||||
TemplateDoc.Fields[4].Name = "dns"
|
||||
TemplateDoc.Fields[4].Type = "[]dns.Request"
|
||||
TemplateDoc.Fields[4].Note = ""
|
||||
TemplateDoc.Fields[4].Description = "File contains the file request to make in the template"
|
||||
TemplateDoc.Fields[4].Comments[encoder.LineComment] = "File contains the file request to make in the template"
|
||||
TemplateDoc.Fields[4].Description = "DNS contains the dns request to make in the template"
|
||||
TemplateDoc.Fields[4].Comments[encoder.LineComment] = "DNS contains the dns request to make in the template"
|
||||
|
||||
TemplateDoc.Fields[4].AddExample("", exampleNormalFileRequest)
|
||||
TemplateDoc.Fields[5].Name = "network"
|
||||
TemplateDoc.Fields[5].Type = "[]network.Request"
|
||||
TemplateDoc.Fields[4].AddExample("", exampleNormalDNSRequest)
|
||||
TemplateDoc.Fields[5].Name = "file"
|
||||
TemplateDoc.Fields[5].Type = "[]file.Request"
|
||||
TemplateDoc.Fields[5].Note = ""
|
||||
TemplateDoc.Fields[5].Description = "Network contains the network request to make in the template"
|
||||
TemplateDoc.Fields[5].Comments[encoder.LineComment] = "Network contains the network request to make in the template"
|
||||
TemplateDoc.Fields[5].Description = "File contains the file request to make in the template"
|
||||
TemplateDoc.Fields[5].Comments[encoder.LineComment] = "File contains the file request to make in the template"
|
||||
|
||||
TemplateDoc.Fields[5].AddExample("", exampleNormalNetworkRequest)
|
||||
TemplateDoc.Fields[6].Name = "headless"
|
||||
TemplateDoc.Fields[6].Type = "[]headless.Request"
|
||||
TemplateDoc.Fields[5].AddExample("", exampleNormalFileRequest)
|
||||
TemplateDoc.Fields[6].Name = "network"
|
||||
TemplateDoc.Fields[6].Type = "[]network.Request"
|
||||
TemplateDoc.Fields[6].Note = ""
|
||||
TemplateDoc.Fields[6].Description = "Headless contains the headless request to make in the template."
|
||||
TemplateDoc.Fields[6].Comments[encoder.LineComment] = "Headless contains the headless request to make in the template."
|
||||
TemplateDoc.Fields[7].Name = "ssl"
|
||||
TemplateDoc.Fields[7].Type = "[]ssl.Request"
|
||||
TemplateDoc.Fields[6].Description = "Network contains the network request to make in the template\nWARNING: 'network' will be deprecated and will be removed in a future release. Please use 'tcp' instead."
|
||||
TemplateDoc.Fields[6].Comments[encoder.LineComment] = "Network contains the network request to make in the template"
|
||||
|
||||
TemplateDoc.Fields[6].AddExample("", exampleNormalNetworkRequest)
|
||||
TemplateDoc.Fields[7].Name = "tcp"
|
||||
TemplateDoc.Fields[7].Type = "[]network.Request"
|
||||
TemplateDoc.Fields[7].Note = ""
|
||||
TemplateDoc.Fields[7].Description = "SSL contains the SSL request to make in the template."
|
||||
TemplateDoc.Fields[7].Comments[encoder.LineComment] = "SSL contains the SSL request to make in the template."
|
||||
TemplateDoc.Fields[8].Name = "websocket"
|
||||
TemplateDoc.Fields[8].Type = "[]websocket.Request"
|
||||
TemplateDoc.Fields[7].Description = "description: |\n TCP contains the network request to make in the template\n examples:\n - value: exampleNormalNetworkRequest\n RequestsWithTCP is placeholder(internal) only, and should not be used instead use RequestsNetwork"
|
||||
TemplateDoc.Fields[7].Comments[encoder.LineComment] = " description: |"
|
||||
TemplateDoc.Fields[8].Name = "headless"
|
||||
TemplateDoc.Fields[8].Type = "[]headless.Request"
|
||||
TemplateDoc.Fields[8].Note = ""
|
||||
TemplateDoc.Fields[8].Description = "Websocket contains the Websocket request to make in the template."
|
||||
TemplateDoc.Fields[8].Comments[encoder.LineComment] = "Websocket contains the Websocket request to make in the template."
|
||||
TemplateDoc.Fields[9].Name = "whois"
|
||||
TemplateDoc.Fields[9].Type = "[]whois.Request"
|
||||
TemplateDoc.Fields[8].Description = "Headless contains the headless request to make in the template."
|
||||
TemplateDoc.Fields[8].Comments[encoder.LineComment] = "Headless contains the headless request to make in the template."
|
||||
TemplateDoc.Fields[9].Name = "ssl"
|
||||
TemplateDoc.Fields[9].Type = "[]ssl.Request"
|
||||
TemplateDoc.Fields[9].Note = ""
|
||||
TemplateDoc.Fields[9].Description = "WHOIS contains the WHOIS request to make in the template."
|
||||
TemplateDoc.Fields[9].Comments[encoder.LineComment] = "WHOIS contains the WHOIS request to make in the template."
|
||||
TemplateDoc.Fields[10].Name = "self-contained"
|
||||
TemplateDoc.Fields[10].Type = "bool"
|
||||
TemplateDoc.Fields[9].Description = "SSL contains the SSL request to make in the template."
|
||||
TemplateDoc.Fields[9].Comments[encoder.LineComment] = "SSL contains the SSL request to make in the template."
|
||||
TemplateDoc.Fields[10].Name = "websocket"
|
||||
TemplateDoc.Fields[10].Type = "[]websocket.Request"
|
||||
TemplateDoc.Fields[10].Note = ""
|
||||
TemplateDoc.Fields[10].Description = "Self Contained marks Requests for the template as self-contained"
|
||||
TemplateDoc.Fields[10].Comments[encoder.LineComment] = "Self Contained marks Requests for the template as self-contained"
|
||||
TemplateDoc.Fields[11].Name = "stop-at-first-match"
|
||||
TemplateDoc.Fields[11].Type = "bool"
|
||||
TemplateDoc.Fields[10].Description = "Websocket contains the Websocket request to make in the template."
|
||||
TemplateDoc.Fields[10].Comments[encoder.LineComment] = "Websocket contains the Websocket request to make in the template."
|
||||
TemplateDoc.Fields[11].Name = "whois"
|
||||
TemplateDoc.Fields[11].Type = "[]whois.Request"
|
||||
TemplateDoc.Fields[11].Note = ""
|
||||
TemplateDoc.Fields[11].Description = "Stop execution once first match is found"
|
||||
TemplateDoc.Fields[11].Comments[encoder.LineComment] = "Stop execution once first match is found"
|
||||
TemplateDoc.Fields[12].Name = "signature"
|
||||
TemplateDoc.Fields[12].Type = "http.SignatureTypeHolder"
|
||||
TemplateDoc.Fields[11].Description = "WHOIS contains the WHOIS request to make in the template."
|
||||
TemplateDoc.Fields[11].Comments[encoder.LineComment] = "WHOIS contains the WHOIS request to make in the template."
|
||||
TemplateDoc.Fields[12].Name = "self-contained"
|
||||
TemplateDoc.Fields[12].Type = "bool"
|
||||
TemplateDoc.Fields[12].Note = ""
|
||||
TemplateDoc.Fields[12].Description = "Signature is the request signature method"
|
||||
TemplateDoc.Fields[12].Comments[encoder.LineComment] = "Signature is the request signature method"
|
||||
TemplateDoc.Fields[12].Values = []string{
|
||||
TemplateDoc.Fields[12].Description = "Self Contained marks Requests for the template as self-contained"
|
||||
TemplateDoc.Fields[12].Comments[encoder.LineComment] = "Self Contained marks Requests for the template as self-contained"
|
||||
TemplateDoc.Fields[13].Name = "stop-at-first-match"
|
||||
TemplateDoc.Fields[13].Type = "bool"
|
||||
TemplateDoc.Fields[13].Note = ""
|
||||
TemplateDoc.Fields[13].Description = "Stop execution once first match is found"
|
||||
TemplateDoc.Fields[13].Comments[encoder.LineComment] = "Stop execution once first match is found"
|
||||
TemplateDoc.Fields[14].Name = "signature"
|
||||
TemplateDoc.Fields[14].Type = "http.SignatureTypeHolder"
|
||||
TemplateDoc.Fields[14].Note = ""
|
||||
TemplateDoc.Fields[14].Description = "Signature is the request signature method"
|
||||
TemplateDoc.Fields[14].Comments[encoder.LineComment] = "Signature is the request signature method"
|
||||
TemplateDoc.Fields[14].Values = []string{
|
||||
"AWS",
|
||||
}
|
||||
TemplateDoc.Fields[13].Name = "variables"
|
||||
TemplateDoc.Fields[13].Type = "variables.Variable"
|
||||
TemplateDoc.Fields[13].Note = ""
|
||||
TemplateDoc.Fields[13].Description = "Variables contains any variables for the current request."
|
||||
TemplateDoc.Fields[13].Comments[encoder.LineComment] = "Variables contains any variables for the current request."
|
||||
TemplateDoc.Fields[15].Name = "variables"
|
||||
TemplateDoc.Fields[15].Type = "variables.Variable"
|
||||
TemplateDoc.Fields[15].Note = ""
|
||||
TemplateDoc.Fields[15].Description = "Variables contains any variables for the current request."
|
||||
TemplateDoc.Fields[15].Comments[encoder.LineComment] = "Variables contains any variables for the current request."
|
||||
|
||||
MODELInfoDoc.Type = "model.Info"
|
||||
MODELInfoDoc.Comments[encoder.LineComment] = " Info contains metadata information about a template"
|
||||
|
@ -283,7 +293,7 @@ func init() {
|
|||
FieldName: "classification",
|
||||
},
|
||||
}
|
||||
MODELClassificationDoc.Fields = make([]encoder.Doc, 4)
|
||||
MODELClassificationDoc.Fields = make([]encoder.Doc, 6)
|
||||
MODELClassificationDoc.Fields[0].Name = "cve-id"
|
||||
MODELClassificationDoc.Fields[0].Type = "stringslice.StringSlice"
|
||||
MODELClassificationDoc.Fields[0].Note = ""
|
||||
|
@ -312,6 +322,20 @@ func init() {
|
|||
MODELClassificationDoc.Fields[3].Comments[encoder.LineComment] = "CVSS Score for the template."
|
||||
|
||||
MODELClassificationDoc.Fields[3].AddExample("", "9.8")
|
||||
MODELClassificationDoc.Fields[4].Name = "epss-score"
|
||||
MODELClassificationDoc.Fields[4].Type = "float64"
|
||||
MODELClassificationDoc.Fields[4].Note = ""
|
||||
MODELClassificationDoc.Fields[4].Description = "EPSS Score for the template."
|
||||
MODELClassificationDoc.Fields[4].Comments[encoder.LineComment] = "EPSS Score for the template."
|
||||
|
||||
MODELClassificationDoc.Fields[4].AddExample("", "0.42509")
|
||||
MODELClassificationDoc.Fields[5].Name = "cpe"
|
||||
MODELClassificationDoc.Fields[5].Type = "string"
|
||||
MODELClassificationDoc.Fields[5].Note = ""
|
||||
MODELClassificationDoc.Fields[5].Description = "CPE for the template."
|
||||
MODELClassificationDoc.Fields[5].Comments[encoder.LineComment] = "CPE for the template."
|
||||
|
||||
MODELClassificationDoc.Fields[5].AddExample("", "cpe:/a:vendor:product:version")
|
||||
|
||||
HTTPRequestDoc.Type = "http.Request"
|
||||
HTTPRequestDoc.Comments[encoder.LineComment] = " Request contains a http request to be made from a template"
|
||||
|
@ -323,6 +347,10 @@ func init() {
|
|||
TypeName: "Template",
|
||||
FieldName: "requests",
|
||||
},
|
||||
{
|
||||
TypeName: "Template",
|
||||
FieldName: "http",
|
||||
},
|
||||
}
|
||||
HTTPRequestDoc.PartDefinitions = []encoder.KeyValue{
|
||||
{
|
||||
|
@ -953,6 +981,10 @@ func init() {
|
|||
TypeName: "Template",
|
||||
FieldName: "network",
|
||||
},
|
||||
{
|
||||
TypeName: "Template",
|
||||
FieldName: "tcp",
|
||||
},
|
||||
}
|
||||
NETWORKRequestDoc.PartDefinitions = []encoder.KeyValue{
|
||||
{
|
||||
|
@ -1196,7 +1228,7 @@ func init() {
|
|||
ENGINEActionDoc.Fields[1].Name = "name"
|
||||
ENGINEActionDoc.Fields[1].Type = "string"
|
||||
ENGINEActionDoc.Fields[1].Note = ""
|
||||
ENGINEActionDoc.Fields[1].Description = "Name is the name assigned to the headless action.\n\nThis can be used to execute code, for instance in browser\nDOM using script action, and get the result in a variable\nwhich can be matched upon by nuclei. An Example template [here](https://github.com/projectdiscovery/nuclei-templates/blob/master/headless/prototype-pollution-check.yaml)."
|
||||
ENGINEActionDoc.Fields[1].Description = "Name is the name assigned to the headless action.\n\nThis can be used to execute code, for instance in browser\nDOM using script action, and get the result in a variable\nwhich can be matched upon by nuclei. An Example template [here](https://github.com/projectdiscovery/nuclei-templates/blob/main/headless/prototype-pollution-check.yaml)."
|
||||
ENGINEActionDoc.Fields[1].Comments[encoder.LineComment] = "Name is the name assigned to the headless action."
|
||||
ENGINEActionDoc.Fields[2].Name = "description"
|
||||
ENGINEActionDoc.Fields[2].Type = "string"
|
||||
|
|
|
@ -47,7 +47,7 @@ var protocolMappings = map[ProtocolType]string{
|
|||
FileProtocol: "file",
|
||||
HTTPProtocol: "http",
|
||||
HeadlessProtocol: "headless",
|
||||
NetworkProtocol: "network",
|
||||
NetworkProtocol: "tcp",
|
||||
WorkflowProtocol: "workflow",
|
||||
SSLProtocol: "ssl",
|
||||
WebsocketProtocol: "websocket",
|
||||
|
|
|
@ -35,7 +35,7 @@ var DefaultOptions = &types.Options{
|
|||
Verbose: false,
|
||||
NoColor: true,
|
||||
UpdateTemplates: false,
|
||||
JSON: false,
|
||||
JSONL: false,
|
||||
JSONRequests: false,
|
||||
EnableProgressBar: false,
|
||||
TemplatesVersion: false,
|
||||
|
|
|
@ -230,10 +230,12 @@ type Options struct {
|
|||
NoColor bool
|
||||
// UpdateTemplates updates the templates installed at startup
|
||||
UpdateTemplates bool
|
||||
// JSON writes json output to files
|
||||
JSON bool
|
||||
// JSON writes json line output to files
|
||||
JSONL bool
|
||||
// JSONRequests writes requests/responses for matches in JSON output
|
||||
JSONRequests bool
|
||||
// JSONExport is the file to export JSON output format to
|
||||
JSONExport string
|
||||
// Cloud enables nuclei cloud scan execution
|
||||
Cloud bool
|
||||
// EnableProgressBar enables progress bar
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
const (
|
||||
// TemplatesRepoURL is the URL for files in nuclei-templates repository
|
||||
TemplatesRepoURL = "https://github.com/projectdiscovery/nuclei-templates/blob/master/"
|
||||
TemplatesRepoURL = "https://github.com/projectdiscovery/nuclei-templates/blob/main/"
|
||||
)
|
||||
|
||||
var configData *config.Config
|
||||
|
|
Loading…
Reference in New Issue