more yara stuff
This commit is contained in:
parent
b46f1074dd
commit
ad4f9576d0
2 changed files with 12 additions and 1 deletions
|
@ -18,7 +18,7 @@ var startup time.Time
|
|||
|
||||
func Setup(wg *sync.WaitGroup) {
|
||||
startup = time.Now()
|
||||
yara.InitYara()
|
||||
go yara.InitYara()
|
||||
}
|
||||
|
||||
// Submit() starts the analysis process for a file.
|
||||
|
@ -31,6 +31,14 @@ func Submit(ctx context.Context, file pgtype.UUID) error {
|
|||
}
|
||||
|
||||
go basic.BasicProcessing(job)
|
||||
|
||||
yaraJob, err := database.NewProcessingJob(ctx, file, TypeYARA)
|
||||
if err != nil {
|
||||
slog.Error("Could not submit processing job", "error", err, "file-uuid", file, "type", TypeBasic)
|
||||
return err
|
||||
}
|
||||
go yara.YaraProcessing(yaraJob)
|
||||
|
||||
mimeType, err := database.GetFileMime(file)
|
||||
if err != nil {
|
||||
slog.Error("Could not retrieve MimeType", "error", err, "file-uuid", file)
|
||||
|
|
|
@ -25,6 +25,9 @@ const TypeArchive = "Archive"
|
|||
// Anything not implemented (yet)
|
||||
const TypeOther = "Other"
|
||||
|
||||
// Yara Scan (can be done for all filetypes)
|
||||
const TypeYARA = "Yara"
|
||||
|
||||
var MSOfficeMime = []string{
|
||||
"application/msword",
|
||||
"application/vnd.ms-excel",
|
||||
|
|
Loading…
Add table
Reference in a new issue