25 lines
836 B
Plaintext
25 lines
836 B
Plaintext
if params.len < 4 or params[0] == "-h" or params[0] == "--help" then exit("<b>Usage: "+program_path.split("/")[-1]+" [IP_Address] [Port] [Memory_Address] [Overflow_String]</b>")
|
|
|
|
target_ip = params[0]
|
|
port = params[1]
|
|
memory_Address = params[2]
|
|
overflow_String = params[3]
|
|
|
|
metaxploit = include_lib("/lib/metaxploit.so")
|
|
|
|
if not metaxploit then
|
|
metaxploit = include_lib(current_path + "/metaxploit.so")
|
|
end if
|
|
|
|
if not metaxploit then exit("Error: Can't find metaxploit library in the /lib path or the current folder")
|
|
net_session = metaxploit.net_use(target_ip,port.to_int)
|
|
|
|
if not net_session then exit("Error: can't connect to net session")
|
|
metaLib = net_session.dump_lib
|
|
result = metaLib.overflow(memory_Address,overflow_String)
|
|
|
|
|
|
if not result then exit("Program ended")
|
|
|
|
if typeof(result) == "shell" then result.start_terminal
|