Skip to content

Commit

Permalink
some new functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Serhatcck committed Dec 11, 2024
1 parent 7871c32 commit 222fdfa
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ func main() {
flagSet.IntVar(&options.DuplicateCounter, "dp-counter", 50, "Number of duplicates to check")
flagSet.IntVar(&options.RedirectConter, "rd-counter", 3, "Number of redirects to check")
flagSet.BoolVar(&options.Silent, "silent", false, "Suppress output")
flagSet.BoolVar(&options.OnlyWriteStats, "only-stats", false, "Only Write Stats")
flagSet.BoolVar(&options.NoInteractive, "no-interactive", false, "No Interactive Window")
flagSet.IntVar(&options.FailureCheckTimeout, "fc-tm-out", 1, "Failure check timeout (seconds)")
flagSet.IntVar(&options.TimeOut, "tm-out", 20, "HTTP response timeout (seconds)")
flagSet.IntVar(&options.Depth, "depth", 3, "Subdirectory depth")
Expand Down
4 changes: 4 additions & 0 deletions pkg/hidden_fuzzer/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ type Config struct {
Target string
Url *url.URL
Silent bool
OnlyWriteStats bool
NoInteractive bool
Wordlist []string
Extensions []string
Threads int
Expand Down Expand Up @@ -100,6 +102,8 @@ func (c *Config) Build(options Options) error {
c.ProxyUrl = options.ProxyUrl
c.MaxBodyLengthForCompare = options.MaxBodyLengthForCompare
c.Recheck = options.Recheck
c.OnlyWriteStats = options.OnlyWriteStats
c.NoInteractive = options.NoInteractive

//if param fuzzing is true do not handle 403 or directories.
//do not process sub directory depth
Expand Down
2 changes: 2 additions & 0 deletions pkg/hidden_fuzzer/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ type Options struct {
DuplicateCounter int
RedirectConter int
Silent bool
OnlyWriteStats bool
NoInteractive bool
FailureCheckTimeout int
TimeOut int
Depth int
Expand Down
15 changes: 9 additions & 6 deletions pkg/hidden_fuzzer/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,15 @@ func NewWorker(conf *Config) *Worker {
}

func (w *Worker) Start() error {
go func() {
err := HandleInteractive(w)
if err != nil {
log.Printf("Error while trying to initialize interactive session: %s", err)
}
}()
if !w.Config.NoInteractive {
go func() {
err := HandleInteractive(w)
if err != nil {
log.Printf("Error while trying to initialize interactive session: %s", err)
}
}()
}

// Gorutin sayısını takip etmek için bir kanal oluştur
w.isInteractiveWindow = false
w.isrunning = true
Expand Down
2 changes: 1 addition & 1 deletion pkg/hidden_fuzzer/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const (
)

func WriteStatus(worker *Worker, stat int, counter int) {
if !worker.Config.Silent {
if !worker.Config.Silent || worker.Config.OnlyWriteStats {
fmt.Fprintf(os.Stderr, "%s[Target: %s] -- [Req per second: %d] -- [Status: %d/%d]", Clear_Terminal, worker.currentTarget, stat, counter, len(worker.WorkQueue))
}
}
Expand Down

0 comments on commit 222fdfa

Please sign in to comment.