Help with a Script

Jan 24, 2015 01:55 PM

description = [Searches for exploits in the exploitdb on Backtrack. This archive can also be found at http://www.exploitdb.com]

author = "L10n"

license = "Same as Nmap--See http://nmap.org/book/man-legal.html"

categories = {"safe", "vuln"}

require("stdnse")

portrule = function(host, port)

return port.state == "open"

end

action = function(host, port)

local n = port.version.product

local exploits = ""

for line in io.lines ("/pentest/exploits/exploitdb/files.csv") do

if string.match(line, n) and string.match(line, "remote") then

local items = split(line, ",")

local file = items2

local desc = items3

exploits = exploits..file.." ---> "..desc.."\n"

end

end

if not string.match(exploits, "\n") then

exploits = nil

end

exploits = " \n"..exploits

return exploits

end

function split(str, pat)

local t = {} -- NOTE: use {n = 0} in Lua-5.0

local fpat = "(.-)" .. pat

local lastend = 1

local s, e, cap = str:find(fpat, 1)

while s do

if s ~= 1 or cap ~= "" then

table.insert(t,cap)

end

last
end = e+1

s, e, cap = str:find(fpat, lastend)

end

if last
end <= #str then

cap = str:sub(lastend)

table.insert(t, cap)

end

return t

end

I found that script on exploitdb's papers , already downloaded the files.csv and modified the path but i still cant run that script. If someone can help me with that i would appreciate.

Thank you

Related Articles

637587411395252764.jpg

How to Perform Advanced Man-in-the-Middle Attacks with Xerosploit

635211718118959676.jpg

How to Get Unlimited Free Trials Using a "Real" Fake Credit Card Number

Comments

No Comments Exist

Be the first, drop a comment!