You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is Silent: true, option when running as a library doesn't help at all and do not suppress either STDERR or STDOUT.
Expected Behavior:
No output at all
Steps To Reproduce:
Slightly modify example code (add silent and remove logging of result):
package main
import (
"math""github.com/projectdiscovery/gologger""github.com/projectdiscovery/katana/pkg/engine/standard""github.com/projectdiscovery/katana/pkg/output""github.com/projectdiscovery/katana/pkg/types"
)
funcmain() {
options:=&types.Options{
MaxDepth: 3, // Maximum depth to crawlFieldScope: "rdn", // Crawling Scope FieldBodyReadSize: math.MaxInt, // Maximum response size to readTimeout: 10, // Timeout is the time to wait for request in secondsConcurrency: 10, // Concurrency is the number of concurrent crawling goroutinesParallelism: 10, // Parallelism is the number of urls processing goroutinesDelay: 0, // Delay is the delay between each crawl requests in secondsRateLimit: 150, // Maximum requests to send per secondStrategy: "depth-first", // Visit strategy (depth-first, breadth-first)OnResult: func(result output.Result) { // Callback function to execute for result// gologger.Info().Msg(result.Request.URL)
},
Silent: true,
}
crawlerOptions, err:=types.NewCrawlerOptions(options)
iferr!=nil {
gologger.Fatal().Msg(err.Error())
}
defercrawlerOptions.Close()
crawler, err:=standard.New(crawlerOptions)
iferr!=nil {
gologger.Fatal().Msg(err.Error())
}
defercrawler.Close()
varinput="https://www.hackerone.com"err=crawler.Crawl(input)
iferr!=nil {
gologger.Warning().Msgf("Could not crawl %s: %s", input, err.Error())
}
}
The text was updated successfully, but these errors were encountered:
ca5ua1
added
the
Type: Bug
Inconsistencies or issues which will cause an issue or problem for users or implementors.
label
Feb 12, 2024
Essentially, it's the same as projectdiscovery/naabu#958
Hi, I try to use Katana as a library and the problem I have is that Katana generate on its own terminal output what I don't want without verbose flag.
katana version: 1.0.5
Current Behavior:
When running scan with Katana library it writes following lines in stdout/stdout on its own:
And it's correlates with with output from CLI.
The problem is
Silent: true,
option when running as a library doesn't help at all and do not suppress either STDERR or STDOUT.Expected Behavior:
No output at all
Steps To Reproduce:
Slightly modify example code (add silent and remove logging of result):
The text was updated successfully, but these errors were encountered: