Skip to content

Commit

Permalink
Merge pull request #54 from hktalent/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
hktalent authored Aug 1, 2022
2 parents acad9fe + 685fa1c commit 1f9042e
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 41 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ priorityNmap=false ./scan4all -tp http -list allOut.txt -v
- 2022-06-07 添加相似度算法来检测 404
- 2022-06-07 增加http url列表精准扫描参数,根据环境变量UrlPrecise=true开启

# Communication group (WeChat, QQ)
| Wechat | Or | QQchat |
| --- |--- |--- |
|<img width=166 src=/~https://github.com/hktalent/scan4all/blob/main/static/wcq.JPG>||<img width=166 src=/~https://github.com/hktalent/scan4all/blob/main/static/qqc.jpg>|
# Communication group (WeChat, QQ,Tg)
| Wechat | Or | QQchat | Or | Tg |
| --- |--- |--- |--- |--- |
|<img width=166 src=/~https://github.com/hktalent/scan4all/blob/main/static/wcq.JPG>||<img width=166 src=/~https://github.com/hktalent/scan4all/blob/main/static/qqc.jpg>||<img width=166 src=/~https://github.com/hktalent/scan4all/blob/main/static/tg.jpg>|

# Donation
| Wechat Pay | AliPay | Paypal | BTC Pay |BCH Pay |
Expand Down
8 changes: 4 additions & 4 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@ priorityNmap=false ./scan4all -tp http -list allOut.txt -v
- 2022-06-07 添加相似度算法来检测 404
- 2022-06-07 增加http url列表精准扫描参数,根据环境变量UrlPrecise=true开启

# 交流群(微信、QQ)
| Wechat | Or | QQchat |
| --- |--- |--- |
|<img width=166 src=/~https://github.com/hktalent/scan4all/blob/main/static/wcq.JPG>||<img width=166 src=/~https://github.com/hktalent/scan4all/blob/main/static/qqc.jpg>|
# 交流群(微信、QQ、Tg)
| Wechat | Or | QQchat | Or | Tg |
| --- |--- |--- |--- |--- |
|<img width=166 src=/~https://github.com/hktalent/scan4all/blob/main/static/wcq.JPG>||<img width=166 src=/~https://github.com/hktalent/scan4all/blob/main/static/qqc.jpg>||<img width=166 src=/~https://github.com/hktalent/scan4all/blob/main/static/tg.jpg>|

# Donation
| Wechat Pay | AliPay | Paypal | BTC Pay |BCH Pay |
Expand Down
65 changes: 35 additions & 30 deletions projectdiscovery/nuclei_Yaml/nclruner/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ func (r *Runner) Close() {
if r.pprofServer != nil {
_ = r.pprofServer.Shutdown(context.Background())
}
if r.interactsh != nil {
r.interactsh.Close()
}
}

// RunEnumeration sets up the input layer for giving input nuclei.
Expand Down Expand Up @@ -380,7 +383,39 @@ func (r *Runner) RunEnumeration() error {
if err != nil {
return errors.Wrap(err, "could not load templates from config")
}
// 确保释放资源,多实例运行优化
defer func() {
var results *atomic.Bool
if r.options.AutomaticScan {
if results, err = r.executeSmartWorkflowInput(executerOpts, store, engine); err != nil {
return
}

} else {
if results, err = r.executeTemplatesInput(store, engine); err != nil {
return
}
}

if r.interactsh != nil {
matched := r.interactsh.Close()
if matched {
results.CAS(false, true)
}
}
r.progress.Stop()

if r.issuesClient != nil {
r.issuesClient.Close()
}

if !results.Load() {
gologger.Info().Msgf("No results found. Better luck next time!")
}
if r.browser != nil {
r.browser.Close()
}
}()
if r.options.Validate {
if err := store.ValidateTemplates(); err != nil {
return err
Expand All @@ -396,36 +431,6 @@ func (r *Runner) RunEnumeration() error {

r.displayExecutionInfo(store)

var results *atomic.Bool
if r.options.AutomaticScan {
if results, err = r.executeSmartWorkflowInput(executerOpts, store, engine); err != nil {
return err
}

} else {
if results, err = r.executeTemplatesInput(store, engine); err != nil {
return err
}
}

if r.interactsh != nil {
matched := r.interactsh.Close()
if matched {
results.CAS(false, true)
}
}
r.progress.Stop()

if r.issuesClient != nil {
r.issuesClient.Close()
}

if !results.Load() {
gologger.Info().Msgf("No results found. Better luck next time!")
}
if r.browser != nil {
r.browser.Close()
}
return err
}

Expand Down
Binary file added static/tg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1f9042e

Please sign in to comment.