Skip to content

Commit b38bcdf

Browse files
committed
Merge remote-tracking branch 'origin'
2 parents 7f2558f + 4dca9a1 commit b38bcdf

45 files changed

Lines changed: 647 additions & 436 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
vendor
55
dist
66
integration_tests/nuclei
7+
integration_tests/.cache
78
integration_tests/integration-test
89
cmd/nuclei/main
910
cmd/nuclei/nuclei

cmd/integration-test/headless.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func (h *headlessExtractValues) Execute(filePath string) error {
113113
return err
114114
}
115115

116-
return expectResultsCount(results, 3)
116+
return expectResultsCount(results, 1)
117117
}
118118

119119
type headlessPayloads struct{}

cmd/integration-test/http.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ func (h *httpDSLFunctions) Execute(filePath string) error {
368368
}
369369

370370
for _, header := range extracted {
371+
header = strings.Trim(header, `"`)
371372
parts := strings.Split(header, ": ")
372373
index, err := strconv.Atoi(parts[0])
373374
if err != nil {

cmd/nuclei/main.go

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,6 @@ func main() {
113113

114114
runner.ParseOptions(options)
115115

116-
if options.HangMonitor {
117-
cancel := monitor.NewStackMonitor(10 * time.Second)
118-
defer cancel()
119-
}
120-
121116
nucleiRunner, err := runner.New(options)
122117
if err != nil {
123118
gologger.Fatal().Msgf("Could not create runner: %s\n", err)
@@ -126,6 +121,19 @@ func main() {
126121
return
127122
}
128123

124+
if options.HangMonitor {
125+
stackMonitor := monitor.NewStackMonitor()
126+
cancel := stackMonitor.Start(10 * time.Second)
127+
defer cancel()
128+
stackMonitor.RegisterCallback(func(dumpID string) error {
129+
resumeFileName := fmt.Sprintf("crash-resume-file-%s.dump", dumpID)
130+
nucleiRunner.Close()
131+
gologger.Info().Msgf("Creating resume file: %s\n", resumeFileName)
132+
err := nucleiRunner.SaveResumeConfig(resumeFileName)
133+
return errorutil.NewWithErr(err).Msgf("couldn't create crash resume file")
134+
})
135+
}
136+
129137
// Setup graceful exits
130138
resumeFileName := types.DefaultResumeFilePath()
131139
c := make(chan os.Signal, 1)
@@ -134,6 +142,7 @@ func main() {
134142
go func() {
135143
for range c {
136144
gologger.Info().Msgf("CTRL+C pressed: Exiting\n")
145+
gologger.Info().Msgf("Attempting graceful shutdown...")
137146
nucleiRunner.Close()
138147
if options.ShouldSaveResume() {
139148
gologger.Info().Msgf("Creating resume file: %s\n", resumeFileName)

examples/advanced/advanced.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ func main() {
2020
defer sg.Done()
2121
err = ne.ExecuteNucleiWithOpts([]string{"scanme.sh"},
2222
nuclei.WithTemplateFilters(nuclei.TemplateFilters{ProtocolTypes: "dns"}),
23+
nuclei.WithHeaders([]string{"X-Bug-Bounty: pdteam"}),
2324
)
2425
if err != nil {
2526
panic(err)

go.mod

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ require (
2121
github.com/olekukonko/tablewriter v0.0.5
2222
github.com/pkg/errors v0.9.1
2323
github.com/projectdiscovery/clistats v0.0.20
24-
github.com/projectdiscovery/fastdialer v0.0.52
25-
github.com/projectdiscovery/hmap v0.0.33
24+
github.com/projectdiscovery/fastdialer v0.0.54
25+
github.com/projectdiscovery/hmap v0.0.34
2626
github.com/projectdiscovery/interactsh v1.1.8
2727
github.com/projectdiscovery/rawhttp v0.1.33
28-
github.com/projectdiscovery/retryabledns v1.0.50
29-
github.com/projectdiscovery/retryablehttp-go v1.0.42
28+
github.com/projectdiscovery/retryabledns v1.0.51
29+
github.com/projectdiscovery/retryablehttp-go v1.0.44
3030
github.com/projectdiscovery/yamldoc-go v1.0.4
3131
github.com/remeh/sizedwaitgroup v1.0.0
3232
github.com/rs/xid v1.5.0
@@ -39,7 +39,7 @@ require (
3939
github.com/weppos/publicsuffix-go v0.30.2-0.20230730094716-a20f9abcc222
4040
github.com/xanzy/go-gitlab v0.84.0
4141
go.uber.org/multierr v1.11.0
42-
golang.org/x/net v0.19.0
42+
golang.org/x/net v0.20.0
4343
golang.org/x/oauth2 v0.11.0
4444
golang.org/x/text v0.14.0
4545
gopkg.in/yaml.v2 v2.4.0
@@ -78,26 +78,26 @@ require (
7878
github.com/praetorian-inc/fingerprintx v1.1.9
7979
github.com/projectdiscovery/dsl v0.0.38
8080
github.com/projectdiscovery/fasttemplate v0.0.2
81-
github.com/projectdiscovery/goflags v0.1.34
81+
github.com/projectdiscovery/goflags v0.1.35
8282
github.com/projectdiscovery/gologger v1.1.12
8383
github.com/projectdiscovery/gostruct v0.0.2
8484
github.com/projectdiscovery/gozero v0.0.1
8585
github.com/projectdiscovery/httpx v1.3.7
8686
github.com/projectdiscovery/mapcidr v1.1.16
8787
github.com/projectdiscovery/n3iwf v0.0.0-20230523120440-b8cd232ff1f5
88-
github.com/projectdiscovery/ratelimit v0.0.23
88+
github.com/projectdiscovery/ratelimit v0.0.24
8989
github.com/projectdiscovery/rdap v0.9.1-0.20221108103045-9865884d1917
9090
github.com/projectdiscovery/sarif v0.0.1
9191
github.com/projectdiscovery/tlsx v1.1.6-0.20231116215000-e842dc367a74
9292
github.com/projectdiscovery/uncover v1.0.7
93-
github.com/projectdiscovery/utils v0.0.72
93+
github.com/projectdiscovery/utils v0.0.74-0.20240115220656-48fef326de18
9494
github.com/projectdiscovery/wappalyzergo v0.0.109
9595
github.com/redis/go-redis/v9 v9.1.0
9696
github.com/ropnop/gokrb5/v8 v8.0.0-20201111231119-729746023c02
9797
github.com/sashabaranov/go-openai v1.15.3
9898
github.com/stretchr/testify v1.8.4
9999
github.com/zmap/zgrab2 v0.1.8-0.20230806160807-97ba87c0e706
100-
golang.org/x/term v0.15.0
100+
golang.org/x/term v0.16.0
101101
gopkg.in/src-d/go-git.v4 v4.13.1
102102
gopkg.in/yaml.v3 v3.0.1
103103
)
@@ -112,7 +112,7 @@ require (
112112
github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect
113113
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
114114
github.com/VividCortex/ewma v1.2.0 // indirect
115-
github.com/andybalholm/brotli v1.0.6 // indirect
115+
github.com/andybalholm/brotli v1.1.0 // indirect
116116
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect
117117
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.27 // indirect
118118
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 // indirect
@@ -139,7 +139,6 @@ require (
139139
github.com/fatih/color v1.15.0 // indirect
140140
github.com/free5gc/util v1.0.5-0.20230511064842-2e120956883b // indirect
141141
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
142-
github.com/gaukas/godicttls v0.0.4 // indirect
143142
github.com/geoffgarside/ber v1.1.0 // indirect
144143
github.com/gin-contrib/sse v0.1.0 // indirect
145144
github.com/gin-gonic/gin v1.9.1 // indirect
@@ -164,7 +163,7 @@ require (
164163
github.com/jinzhu/inflection v1.0.0 // indirect
165164
github.com/jmespath/go-jmespath v0.4.0 // indirect
166165
github.com/kataras/jwt v0.1.10 // indirect
167-
github.com/klauspost/compress v1.17.3 // indirect
166+
github.com/klauspost/compress v1.17.4 // indirect
168167
github.com/klauspost/pgzip v1.2.5 // indirect
169168
github.com/kylelemons/godebug v1.1.0 // indirect
170169
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
@@ -186,8 +185,8 @@ require (
186185
github.com/projectdiscovery/asnmap v1.0.6 // indirect
187186
github.com/projectdiscovery/cdncheck v1.0.9 // indirect
188187
github.com/projectdiscovery/freeport v0.0.5 // indirect
189-
github.com/quic-go/quic-go v0.40.0 // indirect
190-
github.com/refraction-networking/utls v1.5.4 // indirect
188+
github.com/quic-go/quic-go v0.40.1 // indirect
189+
github.com/refraction-networking/utls v1.6.1 // indirect
191190
github.com/shoenig/go-m1cpu v0.1.6 // indirect
192191
github.com/sirupsen/logrus v1.9.3 // indirect
193192
github.com/skeema/knownhosts v1.2.1 // indirect
@@ -221,7 +220,7 @@ require (
221220
github.com/Mzack9999/go-http-digest-auth-client v0.6.1-0.20220414142836-eb8883508809 // indirect
222221
github.com/Mzack9999/ldapserver v1.0.2-0.20211229000134-b44a0d6ad0dd // indirect
223222
github.com/PuerkitoBio/goquery v1.8.1 // indirect
224-
github.com/akrylysov/pogreb v0.10.1 // indirect
223+
github.com/akrylysov/pogreb v0.10.2 // indirect
225224
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
226225
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
227226
github.com/andybalholm/cascadia v1.3.2 // indirect
@@ -279,16 +278,16 @@ require (
279278
github.com/ysmood/leakless v0.8.0 // indirect
280279
github.com/yusufpapurcu/wmi v1.2.3 // indirect
281280
github.com/zmap/rc2 v0.0.0-20190804163417-abaa70531248 // indirect
282-
github.com/zmap/zcrypto v0.0.0-20231106212110-94c8f62efae4 // indirect
281+
github.com/zmap/zcrypto v0.0.0-20231219022726-a1f61fb1661c // indirect
283282
go.etcd.io/bbolt v1.3.8 // indirect
284283
go.uber.org/zap v1.25.0 // indirect
285284
goftp.io/server/v2 v2.0.1 // indirect
286-
golang.org/x/crypto v0.17.0 // indirect
287-
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
285+
golang.org/x/crypto v0.18.0 // indirect
286+
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3
288287
golang.org/x/mod v0.14.0 // indirect
289-
golang.org/x/sys v0.15.0 // indirect
288+
golang.org/x/sys v0.16.0 // indirect
290289
golang.org/x/time v0.3.0 // indirect
291-
golang.org/x/tools v0.15.0 // indirect
290+
golang.org/x/tools v0.17.0 // indirect
292291
google.golang.org/appengine v1.6.7 // indirect
293292
google.golang.org/protobuf v1.31.0 // indirect
294293
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect

0 commit comments

Comments
 (0)