-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsle.src
More file actions
40 lines (40 loc) · 1.64 KB
/
Copy pathsle.src
File metadata and controls
40 lines (40 loc) · 1.64 KB
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
32
33
34
35
36
37
38
39
40
//--
//-- $$$$$$$$\ $$\
//-- \____$$ | $$ |
//-- $$ / $$$$$$\ $$ | $$$$$$\ $$\ $$\ $$\
//-- $$ / $$ __$$\ $$ |$$ __$$\ $$ | $$ | $$ |
//-- $$ / $$$$$$$$ |$$ |$$ / $$ |$$ | $$ | $$ |
//-- $$ / $$ ____|$$ |$$ | $$ |$$ | $$ | $$ |
//-- $$$$$$$$\\$$$$$$$\ $$ |\$$$$$$ |\$$$$$\$$$$ |
//-- \________|\_______|\__| \______/ \_____\____/
//--
//--Takes the file name of a lib file inside /lib
//--Usage: sle [lib file] example 'libssh.so'
if params.len != 1 then exit("Usage: sle [lib file] example 'libssh.so'")
shell = ""
if active_user == "root" then
shell = get_shell
else
shell = get_shell("root", user_input("Enter Root Password: ", true))
end if
if not shell then exit("Invalid Password.")
comp = shell.host_computer
met = include_lib("/lib/metaxploit.so")
if not met then met = include_lib(current_path + "/metaxploit.so")
if not met then exit("metaxploit.so library not found in /lib or current dir.")
lib = params[0]//--"libssh.so"
target = met.load("/lib/" + lib)
if not target then met.load(current_path + "/" + lib)
if not target then exit(lib + " library not found in /lib or current dir.")
comp.create_folder("/", "xlib")
fileName = lib.split(".")[0] + "-v" + target.version + "-vulx.txt"
comp.touch("/xlib/", fileName)
wait(0.5)
file = comp.File("/xlib/" + fileName)
scanr = met.scan(target)
output = "There was " + scanr.len + " vulnerabilities found in " + lib.split(".")[0] + "-v" + target.version + char(10)
for vul in scanr
output = output + char(10) + "Vulnerability: " + vul + char(10) + met.scan_address(target, vul)
end for
print output
file.set_content(output)