@@ -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 })
@@ -281,15 +287,21 @@ func New(target string, txt string, html string, delayTime int, concurrency int,
281287 // Setup graceful exit
282288 chanC := make (chan os.Signal , 1 )
283289 lettersNum := 23
290+ cCount := 0
284291
285292 signal .Notify (chanC , os .Interrupt )
286293 rand .Seed (time .Now ().UnixNano ())
287294
288295 go func () {
289296 for range chanC {
297+ if cCount > 0 {
298+ os .Exit (1 )
299+ }
300+
290301 if ! plain {
291302 fmt .Fprint (os .Stdout , "\r " )
292303 fmt .Println ("CTRL+C pressed: Exiting" )
304+ cCount ++
293305 }
294306
295307 c .AllowedDomains = []string {sliceUtils .RandSeq (lettersNum )}
0 commit comments