formatting
This commit is contained in:
		
							parent
							
								
									ad191a5393
								
							
						
					
					
						commit
						51dd4c31e1
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -43,14 +43,14 @@ func scanFile(fileName string) ([]string, error) {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	fullPath, err := store.AbsPath(fileName)
 | 
						fullPath, err := store.AbsPath(fileName)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		slog.Error("Error in DiecScan", "file-uuid", fileName, "error", err)
 | 
							slog.Error("Error in Yara Scan", "file-uuid", fileName, "error", err)
 | 
				
			||||||
		return matched, err
 | 
							return matched, err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	cmd := exec.Command("/usr/local/bin/yr", "scan", "--output-format ndjson", "--print-namespace","--compiled-rules", outputPath, fullPath)
 | 
						cmd := exec.Command("/usr/local/bin/yr", "scan", "--output-format ndjson", "--print-namespace","--compiled-rules", outputPath, fullPath)
 | 
				
			||||||
	slog.Debug("Yara scan command", "cmd", cmd.String())
 | 
						slog.Debug("Yara scan command", "cmd", cmd.String())
 | 
				
			||||||
	result, err := cmd.Output()
 | 
						result, err := cmd.Output()
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		slog.Error("Error scanning file with yara", "error", err, "file-uuid", fileName,"result", string(result))
 | 
							slog.Error("Error scanning file with yara", "error", err, "file-uuid", fileName, "result", string(result))
 | 
				
			||||||
		return matched, err
 | 
							return matched, err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue