-
Notifications
You must be signed in to change notification settings - Fork 668
Silent doesn't work. Naabu (as a library) is too verbose. #958
Copy link
Copy link
Closed
Labels
Status: CompletedNothing further to be done with this issue. Awaiting to be closed.Nothing further to be done with this issue. Awaiting to be closed.Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.Inconsistencies or issues which will cause an issue or problem for users or implementors.
Milestone
Description
Hi, I try to use Naabu as a library and the problem I have is that Naabu generate on its own terminal output what I don't want without verbose flag.
Naabu version: v2.2.1
Current Behavior:
When running scan with Naabu library it writes following lines in stdout:
[INF] Running CONNECT scan with non root privileges
[INF] Found 2 ports on host scanme.sh (128.199.158.128)
scanme.sh:443
scanme.sh:80
Even with silent flag set to true
When running Naabu itself with -silent flag the output is:
scanme.sh:443
scanme.sh:80
Expected Behavior:
No output at all with silent flag. Maybe new -silent-full flag or levels to silent flag
Ideally would be amazing to also have control over [INF] Running ... to pass it to log file for example (in context of library usage)
Steps To Reproduce:
Add Silent: true, option to example so it would look like that:
package main
import (
"log"
"github.com/projectdiscovery/goflags"
"github.com/projectdiscovery/naabu/v2/pkg/result"
"github.com/projectdiscovery/naabu/v2/pkg/runner"
)
func main() {
options := runner.Options{
Host: goflags.StringSlice{"scanme.sh"},
ScanType: "s",
OnResult: func(hr *result.HostResult) {
log.Println(hr.Host, hr.Ports)
},
Ports: "80",
Silent: true,
}
naabuRunner, err := runner.NewRunner(&options)
if err != nil {
log.Fatal(err)
}
defer naabuRunner.Close()
naabuRunner.RunEnumeration()
}Btw, maybe naabu library need some documentation? As already stated in #432
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Status: CompletedNothing further to be done with this issue. Awaiting to be closed.Nothing further to be done with this issue. Awaiting to be closed.Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.Inconsistencies or issues which will cause an issue or problem for users or implementors.