Skip to content

Commit

Permalink
Check full path of hidden node if dir doesn't end with /
Browse files Browse the repository at this point in the history
  • Loading branch information
dmknght committed Oct 27, 2024
1 parent 9901e81 commit 6bb3d81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/engine/scan_file.nim
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,9 @@ proc fscanner_scan_file*(scan_ctx: var FileScanCtx, scan_path: string, virname:
]#
proc fscanner_check_hidden_node(scan_ctx: var FileScanCtx, ptr_dir: ptr Dirent, scan_dir, current_node_name: string, next_node_name: var string) =
if not isEmptyOrWhiteSpace(next_node_name) and next_node_name != current_node_name:
let full_node_path = if scan_dir.endsWith("/"): scan_dir & current_node_name else: scan_dir & "/" & current_node_name
scan_ctx.file_infected += 1
print_file_infected("Heur:Rootkit.HiddenOnDisk", scan_dir & next_node_name)
print_file_infected("Heur:Rootkit.HiddenOnDisk", full_node_path)

# Get name of the next node
if ptr_dir.d_reclen >= 256:
Expand Down

0 comments on commit 6bb3d81

Please sign in to comment.