Skip to content

Commit

Permalink
优化线程总控 2022-07-19 11:45:1658202310
Browse files Browse the repository at this point in the history
  • Loading branch information
x51pwn committed Jul 19, 2022
1 parent b0c5924 commit e0cb025
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* Redis
* FTP
* Mongodb
* SMB
* SMB,同时检测 MS17-010、SmbGhost
* Telnet
* Snmp
* Wap-wsp(Elasticsearch)
Expand Down
3 changes: 2 additions & 1 deletion brute/bypass403.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package brute

import (
"context"
"github.com/hktalent/scan4all/lib"
"net/http"
"regexp"
"strings"
Expand Down Expand Up @@ -62,7 +63,7 @@ func constructEndpointPayloads(domain, path string) []string {
}

func PenetrateEndpoint(wg *sync.WaitGroup, url string, rst chan Result403, header ...string) {
ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second)
ctx, cancel := context.WithTimeout(lib.Ctx_global, 20*time.Second)
defer func() {
cancel()
wg.Done()
Expand Down
3 changes: 2 additions & 1 deletion pkg/hydra/smb/smb.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ package smb
import (
"context"
"errors"
"github.com/hktalent/scan4all/lib"
"github.com/stacktitan/smb/smb"
"time"
)

func Check(Host, Username, Domain, Password string, Port int) (bool, error) {
status := make(chan error)
ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
ctx, cancel := context.WithTimeout(lib.Ctx_global, time.Second*5)
defer cancel()
options := smb.Options{
Host: Host,
Expand Down

0 comments on commit e0cb025

Please sign in to comment.