Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] DisableMaxHostErr not used in sdk #5782

Open
1 task done
iuliu8899 opened this issue Oct 29, 2024 · 0 comments · May be fixed by #5783
Open
1 task done

[BUG] DisableMaxHostErr not used in sdk #5782

iuliu8899 opened this issue Oct 29, 2024 · 0 comments · May be fixed by #5783
Assignees
Labels
Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@iuliu8899
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues.

Current Behavior

In NetworkConfig struct: lib/config.go:270, DisableMaxHostErr is not used anywhere. So it's not effected even though we set it to true.

Expected Behavior

If DisableMaxHostErr is true, sdk should not skip the host.

Steps To Reproduce

package main

import (
	"context"
	nuclei "github.com/projectdiscovery/nuclei/v3/lib"
)

func main() {
	ne, err := nuclei.NewNucleiEngineCtx(context.Background(),
		nuclei.WithNetworkConfig(
			nuclei.NetworkConfig{
				DisableMaxHostErr: true,
				MaxHostError:      30,
				Retries:           0,
				SystemResolvers:   true,
				Timeout:           5,
			},
		),
	)
	if err != nil {
		panic(err)
	}
	ne.LoadTargets([]string{"http://xxx.xxx"}, false) // the target is not real alive
	err = ne.ExecuteCallbackWithCtx(context.Background())
	if err != nil {
		panic(err)
	}
}

Relevant log output

No response

Environment

  • OS: macOS 15.0.1
  • Nuclei: dev
  • Go: go1.22.6

Anything else?

No response

@iuliu8899 iuliu8899 added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Oct 29, 2024
@iuliu8899 iuliu8899 linked a pull request Oct 29, 2024 that will close this issue
4 tasks
@dogancanbakir dogancanbakir linked a pull request Oct 30, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant