Skip to content

Commit b90dc40

Browse files
committed
Fix slice bounds out of range #88
1 parent c547128 commit b90dc40

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

pkg/crawler/colly.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,9 @@ func New(target string, txt string, html string, delayTime int, concurrency int,
212212
// HERE SCAN FOR SECRETS
213213
if secretsFlag && lengthOk {
214214
secretsSlice := huntSecrets(secretsFile, r.Request.URL.String(), string(r.Body))
215-
FinalSecrets = append(FinalSecrets, secretsSlice...)
215+
for _, elem := range secretsSlice {
216+
FinalSecrets = append(FinalSecrets, elem)
217+
}
216218
}
217219
// HERE SCAN FOR ENDPOINTS
218220
if endpointsFlag {
@@ -233,13 +235,17 @@ func New(target string, txt string, html string, delayTime int, concurrency int,
233235
// HERE SCAN FOR ERRORS
234236
if errorsFlag {
235237
errorsSlice := huntErrors(r.Request.URL.String(), string(r.Body))
236-
FinalErrors = append(FinalErrors, errorsSlice...)
238+
for _, elem := range errorsSlice {
239+
FinalErrors = append(FinalErrors, elem)
240+
}
237241
}
238242

239243
// HERE SCAN FOR INFOS
240244
if infoFlag {
241245
infosSlice := huntInfos(r.Request.URL.String(), string(r.Body))
242-
FinalInfos = append(FinalInfos, infosSlice...)
246+
for _, elem := range infosSlice {
247+
FinalInfos = append(FinalInfos, elem)
248+
}
243249
}
244250
}
245251
})

0 commit comments

Comments
 (0)