Files
Grey-Hack/myShit/shlockcrack.src
2026-05-02 02:52:28 +02:00

45 lines
1.3 KiB
Lua

metax = include_lib("/lib/metaxploit.so")
if not metax then metax = include_lib(current_path + "/metaexploit.so")
if not metax then exit("<color=red><b><center>No metaxploit.so found\nAcceptable places: /lib or current directory<center/><b/><color/>")
g = get_custom_object
expectedParamCount = 0
if not g.currentAdd then
g.currentAdd = params[expectedParamCount]
expectedParamCount += 1
end if
if not g.port then
g.port = params[expectedParamCount]
expectedParamCount += 1
end if
if not g.targetMem then
g.targetMem = params[expectedParamCount]
expectedParamCount += 1
end if
if not g.targetExploit then
g.targetExploit = params[expectedParamCount]
expectedParamCount += 1
end if
if not g.netSession then g.netSession = metax.net_use(g.currentAdd, g.port)
if not g.netSession then exit("Couldn't connect to net session")
overflowResult = g.metLib.overflow(g.targetMem, g.targetExploit)
if not overflowResult then exit("Not able to exploit this vector")
if typeof(overflowResult) == "shell" then
overflowResult.start_terminal
else if typeof(overflowResult) == "computer" then
print("Computer object obtained for " + overflowResult.get_name)
else if typeof(overflowResult) == "file" then
print("Obtained file object")
else
print("<color=red>Erorr: expected shell, computer or file - result: " + overflowResult)
end if