Skip to content

Commit

Permalink
up 2023-09-01
Browse files Browse the repository at this point in the history
  • Loading branch information
hktalent committed Sep 1, 2023
1 parent f14472e commit 930b67f
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions lib/util/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -537,15 +537,7 @@ func RegInitFunc4Hd(cbk func()) {
func DoInit(config *embed.FS) {
Init1(config)
rand.Seed(time.Now().UnixNano())
var wg sync.WaitGroup
for _, x := range []string{"nuclei", "naabu", "httpx", "dnsx", "subfinder", "katana", "uncover", "tlsx"} {
wg.Add(1)
go func(s string) {
defer wg.Done()
util1.UpdateScan4allVersionToLatest(true, "projectdiscovery", s, util1.SzPwd+"/config/"+runtime.GOOS+"/")
}(x)
}
wg.Wait()

// log.Println("start init for fnInitHd ", len(fnInitHd))
// for _, x := range fnInitHd {
// x()
Expand All @@ -568,6 +560,27 @@ func DoInit(config *embed.FS) {
}
fnInit = nil
fnInitHd = nil
var wg sync.WaitGroup
if "" == util1.SzPwd {
if s, err := os.Getwd(); nil == err {
util1.SzPwd = s
}
}
if "" == util1.SzPwd {
util1.SzPwd = "."
}
szPath := util1.SzPwd + "/config/" + runtime.GOOS
if err := os.MkdirAll(szPath, os.ModePerm); nil != err {
log.Println(err, szPath)
}
for _, x := range []string{"nuclei", "naabu", "httpx", "dnsx", "subfinder", "katana", "uncover", "tlsx"} {
wg.Add(1)
go func(s string) {
defer wg.Done()
util1.UpdateScan4allVersionToLatest(true, "projectdiscovery", s, szPath)
}(x)
}
wg.Wait()
}

func RemoveDuplication_map(arr []string) []string {
Expand Down

0 comments on commit 930b67f

Please sign in to comment.