Skip to content

Commit f4f4787

Browse files
author
root
committed
Move run method
1 parent 52b929c commit f4f4787

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

modules/post/windows/gather/credentials/mcafee_hashdump.rb

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,23 @@ def initialize(info = {})
3939
))
4040
end
4141

42+
def run
43+
print_status("Looking for McAfee password hashes on #{sysinfo['Computer']} ...")
44+
45+
vse_keys = enum_vse_keys
46+
if vse_keys.empty?
47+
vprint_error("McAfee Virus Scan Enterprise not installed or insufficient permissions")
48+
return
49+
end
50+
51+
hashes_and_versions = extract_hashes_and_versions(vse_keys)
52+
if hashes_and_versions.empty?
53+
vprint_error("No hashes extracted")
54+
return
55+
end
56+
process_hashes_and_versions(hashes_and_versions)
57+
end
58+
4259
def enum_vse_keys
4360
vprint_status('Enumerating McAfee VSE installations')
4461
keys = []
@@ -126,20 +143,4 @@ def process_hashes_and_versions(hashes_and_versions)
126143
end
127144
end
128145

129-
def run
130-
print_status("Looking for McAfee password hashes on #{sysinfo['Computer']} ...")
131-
132-
vse_keys = enum_vse_keys
133-
if vse_keys.empty?
134-
vprint_error("McAfee Virus Scan Enterprise not installed or insufficient permissions")
135-
return
136-
end
137-
138-
hashes_and_versions = extract_hashes_and_versions(vse_keys)
139-
if hashes_and_versions.empty?
140-
vprint_error("No hashes extracted")
141-
return
142-
end
143-
process_hashes_and_versions(hashes_and_versions)
144-
end
145146
end

0 commit comments

Comments
 (0)