fixedtypo in yara
This commit is contained in:
		
							parent
							
								
									9d869689d6
								
							
						
					
					
						commit
						b46f1074dd
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -21,7 +21,8 @@ func compileSourcesFromFiles() error {
 | 
			
		|||
    return err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	cmd := exec.Command("/usr/local/bin/yr", "compile","-path-as-namespace", "--relaxed-re-syntax", "--output", outputPath, root)
 | 
			
		||||
	cmd := exec.Command("/usr/local/bin/yr", "compile","--path-as-namespace", "--relaxed-re-syntax", "--output", outputPath, root)
 | 
			
		||||
	slog.Debug("Yara compile command", "cmd", cmd.String())
 | 
			
		||||
	result, err := cmd.Output()
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		slog.Error("Error compiling yara rules", "error", err, "result", string(result))
 | 
			
		||||
| 
						 | 
				
			
			@ -46,6 +47,7 @@ func scanFile(fileName string) ([]string, error) {
 | 
			
		|||
		return matched, err
 | 
			
		||||
	}
 | 
			
		||||
	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())
 | 
			
		||||
	result, err := cmd.Output()
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		slog.Error("Error scanning file with yara", "error", err, "file-uuid", fileName,"result", string(result))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue