21 lines
944 B
Plaintext
21 lines
944 B
Plaintext
// connect to database
|
|
database = function()
|
|
myDB = BinDB.connect("vuln", "ukBfZkFwR2mutQItMD7Q9KQbUaoIIFo4vZqa3HtUtf1JcSOQbV", ["kernel_router.so", "libssh.so", "libftp.so","libsql.so","libsmtp.so","libhttp.so","libcam.so","librepository.so"], "/database")
|
|
end function
|
|
|
|
// insert exploit with check if it already exists.
|
|
// TODO: Add option to update missing data (requirments)
|
|
insertVuln = function(libName,libVersion,memAdress,keyValue,requirments,object,priv)
|
|
data = myDB.fetchBy(libName, "version", libVersion)
|
|
if data.len != 0 then
|
|
for entry in data
|
|
if(entry.indexOf(memAdress) != null and entry.indexOf(keyValue) != null) then
|
|
print("Vuln Already Known")
|
|
return 0
|
|
end if
|
|
end for
|
|
end if
|
|
myDB.insert(libName, {"version": libVersion, "memory_adress": memAdress, "key_value": keyValue, "object": object, "privilege": priv})
|
|
myDB.write()
|
|
end function
|