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,