From db530c851a7ac8979bb3547e27c752c0a98ce96f Mon Sep 17 00:00:00 2001 From: sandeep Date: Fri, 10 Dec 2021 21:47:47 +0530 Subject: [PATCH 1/2] fix: docker build fix --- .github/workflows/dockerhub-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerhub-push.yml b/.github/workflows/dockerhub-push.yml index cc6775e82..b849631e0 100644 --- a/.github/workflows/dockerhub-push.yml +++ b/.github/workflows/dockerhub-push.yml @@ -35,6 +35,6 @@ jobs: uses: docker/build-push-action@v2 with: context: . - platforms: linux/amd64,linux/arm64,linux/arm + platforms: linux/amd64,linux/arm64 push: true tags: projectdiscovery/nuclei:latest,projectdiscovery/nuclei:${{ steps.meta.outputs.tag }} \ No newline at end of file From ed309e446ab6284b74b7e4a58091e4628d140251 Mon Sep 17 00:00:00 2001 From: Sandeep Singh Date: Mon, 13 Dec 2021 18:46:41 +0530 Subject: [PATCH 2/2] Interactsh bugfix release (#1368) * dev version update * Adding race condition test (#1357) * Removing linux/arm - Missing chrome package (#1355) * Trim paths info from released binary (#1356) * chore(deps): bump golang from 1.17.4-alpine to 1.17.5-alpine (#1363) Bumps golang from 1.17.4-alpine to 1.17.5-alpine. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: updating default interactsh server to use Co-authored-by: Mzack9999 Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-test.yml | 5 +++++ Dockerfile | 2 +- README.md | 2 +- README_CN.md | 2 +- v2/.goreleaser.yml | 3 +++ v2/cmd/nuclei/main.go | 2 +- v2/pkg/catalog/config/config.go | 2 +- v2/pkg/protocols/common/interactsh/interactsh.go | 4 ++-- v2/pkg/testutils/testutils.go | 2 +- 9 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 52751ee19..9e1935041 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -28,4 +28,9 @@ jobs: - name: Build run: go build . + working-directory: v2/cmd/nuclei/ + + # At the bottom for known issue on OSX - https://github.com/projectdiscovery/nuclei/issues/1309 + - name: Race Condition Tests + run: go build -race . working-directory: v2/cmd/nuclei/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 21822611b..a0806c9f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17.4-alpine as build-env +FROM golang:1.17.5-alpine as build-env RUN go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest FROM alpine:3.15.0 diff --git a/README.md b/README.md index 1b3dc3adf..83a2e24f0 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ CONFIGURATIONS: -ca, -client-ca string client certificate authority file (PEM-encoded) used for authenticating against scanned hosts INTERACTSH: - -iserver, -interactsh-server string interactsh server url for self-hosted instance (default "https://interactsh.com") + -iserver, -interactsh-server string interactsh server url for self-hosted instance (default "https://interact.sh") -itoken, -interactsh-token string authentication token for self-hosted interactsh server -interactions-cache-size int number of requests to keep in the interactions cache (default 5000) -interactions-eviction int number of seconds to wait before evicting requests from cache (default 60) diff --git a/README_CN.md b/README_CN.md index b52263563..74f401692 100644 --- a/README_CN.md +++ b/README_CN.md @@ -133,7 +133,7 @@ Nuclei是一款注重于可配置性、可扩展性和易用性的基于模板 -ev, env-vars 在模板中使用环境变量 交互: - -inserver, -ineractsh-server string 使用interactsh反连检测平台(默认为"https://interactsh.com") + -inserver, -ineractsh-server string 使用interactsh反连检测平台(默认为"https://interact.sh") -itoken, -interactsh-token string 指定反连检测平台的身份凭证 -interactions-cache-size int 指定保存在交互缓存中的请求数(默认:5000) -interactions-eviction int 聪缓存中删除请求前等待的时间(默认为60秒) diff --git a/v2/.goreleaser.yml b/v2/.goreleaser.yml index 8ae96e831..ba272fcf3 100644 --- a/v2/.goreleaser.yml +++ b/v2/.goreleaser.yml @@ -26,6 +26,9 @@ builds: binary: '{{ .ProjectName }}' main: cmd/nuclei/main.go + flags: + - -trimpath + archives: - format: zip replacements: diff --git a/v2/cmd/nuclei/main.go b/v2/cmd/nuclei/main.go index bd015fede..cdaa3f39a 100644 --- a/v2/cmd/nuclei/main.go +++ b/v2/cmd/nuclei/main.go @@ -105,7 +105,7 @@ on extensive configurability, massive extensibility and ease of use.`) ) createGroup(flagSet, "interactsh", "interactsh", - flagSet.StringVarP(&options.InteractshURL, "interactsh-server", "iserver", "https://interactsh.com", "interactsh server url for self-hosted instance"), + flagSet.StringVarP(&options.InteractshURL, "interactsh-server", "iserver", "https://interact.sh", "interactsh server url for self-hosted instance"), flagSet.StringVarP(&options.InteractshToken, "interactsh-token", "itoken", "", "authentication token for self-hosted interactsh server"), flagSet.IntVar(&options.InteractionsCacheSize, "interactions-cache-size", 5000, "number of requests to keep in the interactions cache"), flagSet.IntVar(&options.InteractionsEviction, "interactions-eviction", 60, "number of seconds to wait before evicting requests from cache"), diff --git a/v2/pkg/catalog/config/config.go b/v2/pkg/catalog/config/config.go index bb5cfb24f..c01bf4cd3 100644 --- a/v2/pkg/catalog/config/config.go +++ b/v2/pkg/catalog/config/config.go @@ -26,7 +26,7 @@ type Config struct { const nucleiConfigFilename = ".templates-config.json" // Version is the current version of nuclei -const Version = `2.5.4` +const Version = `2.5.5` func getConfigDetails() (string, error) { homeDir, err := os.UserHomeDir() diff --git a/v2/pkg/protocols/common/interactsh/interactsh.go b/v2/pkg/protocols/common/interactsh/interactsh.go index b810c346d..07dc19de6 100644 --- a/v2/pkg/protocols/common/interactsh/interactsh.go +++ b/v2/pkg/protocols/common/interactsh/interactsh.go @@ -109,7 +109,7 @@ func New(options *Options) (*Client, error) { // NewDefaultOptions returns the default options for interactsh client func NewDefaultOptions(output output.Writer, reporting *reporting.Client, progress progress.Progress) *Options { return &Options{ - ServerURL: "https://interactsh.com", + ServerURL: "https://interact.sh", CacheSize: 5000, Eviction: 60 * time.Second, ColldownPeriod: 5 * time.Second, @@ -265,7 +265,7 @@ func (c *Client) RequestEvent(interactshURLs []string, data *RequestData) { // HasMatchers returns true if an operator has interactsh part // matchers or extractors. // -// Used by requests to show result or not depending on presence of interactsh.com +// Used by requests to show result or not depending on presence of interact.sh // data part matchers. func HasMatchers(op *operators.Operators) bool { if op == nil { diff --git a/v2/pkg/testutils/testutils.go b/v2/pkg/testutils/testutils.go index 99ddf9cef..b39752290 100644 --- a/v2/pkg/testutils/testutils.go +++ b/v2/pkg/testutils/testutils.go @@ -58,7 +58,7 @@ var DefaultOptions = &types.Options{ Templates: []string{}, ExcludedTemplates: []string{}, CustomHeaders: []string{}, - InteractshURL: "https://interactsh.com", + InteractshURL: "https://interact.sh", InteractionsCacheSize: 5000, InteractionsEviction: 60, InteractionsCoolDownPeriod: 5,