Skip to content
This repository was archived by the owner on Apr 30, 2021. It is now read-only.

Commit 3d846c6

Browse files
author
Yevgeny Pats
committed
corpus now located in a directory inside .tar.gz and not flat
1 parent 806e0c4 commit 3d846c6

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

client/agent.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,9 +497,6 @@ func (c *FuzzitClient) RunFuzzer(job Job, jobId string, updateDB bool) error {
497497
return err
498498
}
499499

500-
if err := os.Mkdir("corpus", 0644); err != nil {
501-
return err
502-
}
503500
if err := os.Mkdir("seed", 0644); err != nil {
504501
return err
505502
}
@@ -525,14 +522,20 @@ func (c *FuzzitClient) RunFuzzer(job Job, jobId string, updateDB bool) error {
525522
}
526523

527524
log.Println("downloading corpus")
528-
if err := c.DownloadAndExtractCorpus("./corpus", c.currentJob.TargetId); err != nil {
525+
if err := c.DownloadAndExtractCorpus(".", c.currentJob.TargetId); err != nil {
529526
if err.Error() == "404 Not Found" {
530527
log.Println("no generating corpus yet. continue...")
531528
} else {
532529
return err
533530
}
534531
}
535532

533+
if _, err := os.Stat("corpus"); os.IsNotExist(err) {
534+
if err := os.Mkdir("corpus", 0644); err != nil {
535+
return err
536+
}
537+
}
538+
536539
log.Println("downloading seed")
537540
if err := c.DownloadAndExtractSeed("./seed", c.currentJob.TargetId); err != nil {
538541
if err.Error() == "404 Not Found" {

client/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
)
99

1010
const FuzzitEndpoint = "https://app.fuzzit.dev"
11-
const Version = "v2.4.52"
11+
const Version = "v2.4.53"
1212

1313
type Target struct {
1414
Name string `firestore:"target_name"`

0 commit comments

Comments
 (0)