Files
greyhack/source/lscan.src
2026-08-23 21:17:51 +02:00

23 lines
648 B
Plaintext

if params.len < 1 or params[0] == "-h" or params[0] == "--help" then
current_program = get_shell.host_computer.File(program_path)
exit "Usage: " + current_program.name + " <library path>"
end if
mx = include_lib("/lib/metaxploit.so")
lib_path = params[0]
lib_file = get_shell.host_computer.File(lib_path)
if not lib_file then
lib_file = get_shell.host_computer.File(current_path + lib_path)
if not lib_file then
exit "Unable to find library"
end if
end if
lib = mx.load(lib_file.path)
if not lib then
exit "Unable to load library"
end if
adds = mx.scan(lib)
for add in adds
print "Address: " + add
print mx.scan_address(lib, add)
end for