-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversions.src
More file actions
31 lines (29 loc) · 774 Bytes
/
versions.src
File metadata and controls
31 lines (29 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// version scanner for libs.
metaxploit = include_lib("/lib/metaxploit.so")
scanlib = function(filename)
lib = metaxploit.load(filename)
if lib == null then return null
return lib.lib_name + " " + lib.version
end function
pwd = "/lib"
if params.len > 0 then
pwd = params[0]
end if
parent = get_shell.host_computer.File(pwd)
if parent == null then exit
output = "Filename Lib Version\n"
if parent.is_folder then
files = parent.get_files
for file in files
version = scanlib(file.path)
if version == null then
output = output + file.name + " --no_lib--\n"
else
output = output + file.name + " " + version + "\n"
end if
end for
else
version = scanlib(parent.path)
output = output + parent.name + " " + version + "\n"
end if
print(format_columns(output))