diff --git a/database-fetch.src b/database-fetch.src index e75a52f..1734c3b 100644 --- a/database-fetch.src +++ b/database-fetch.src @@ -1 +1,7 @@ -import_code("/root/database.lib") +import_code("/scanner/database.lib") + +table = params[0] +release = params[1] + + +myDB.printTableBy(table,"version",release,{"version": "Version", "memory_adress": "Memory Address", "key_value": "key Value", "object": "Object", "privilege": "Privilege"}) diff --git a/database.src b/database.src index 4fc6e9f..578804a 100644 --- a/database.src +++ b/database.src @@ -1,5 +1,5 @@ // import database lib -import_code("/home/Dave/libbindb.src") +import_code("/scanner/libbindb.src") // connect to database myDB = BinDB.connect("vuln", "Fizeta7-Nyzi0=Sinuvi5-Golepa4", ["kernel_router.so", "libssh.so", "libftp.so","libsql.so","libsmtp.so","libhttp.so","libcam.so","librepository.so"], "/database") diff --git a/get_shell.src b/get_shell.src new file mode 100644 index 0000000..0225db4 --- /dev/null +++ b/get_shell.src @@ -0,0 +1,17 @@ +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("99.3.9.142",80) + +if not net_session then exit("Error: can't connect to net session") +metaLib = net_session.dump_lib +result = metaLib.overflow("0x7D764A89","olor_buttonshowbuttonim") + + +if not result then exit("Program ended") + +result.start_terminal \ No newline at end of file diff --git a/libbindb.src b/libbindb.src index b8b6cef..1c110ce 100644 --- a/libbindb.src +++ b/libbindb.src @@ -272,4 +272,29 @@ BinDB.printTable = function(table="", labels = {}) end for print(format_columns(out.join("\n"))) return self +end function + + +BinDB.printTableBy = function(table="",key, value , labels = {}) + if self.tables.indexes.indexOf(table) == null then return print("Table " + table + " not found") + if self.tables[table].len == 0 then return null + out = [] + columns = ["#"] + for k in self.tables[table][0].indexes + label = str(k) + if labels.hasIndex(k) then label = labels[k] + columns.push(label.replace(" ", char(160))) + end for + out.push(columns.join(" ")) + i = 0 + for s in self.fetchBy(table, key, value) + i = i + 1 + row = [str(i)] + for k in s.values + row.push(str(k).replace(" ", char(160))) + end for + out.push(row.join(" ")) + end for + print(format_columns(out.join("\n"))) + return self end function \ No newline at end of file diff --git a/nmap.src b/nmap.src index 47f47bd..17c106a 100644 --- a/nmap.src +++ b/nmap.src @@ -1,5 +1,3 @@ -import_code("/root/myprogram") - if params.len == 0 then exit("Usage: nmap [IP]") target_ip = params[0] @@ -20,4 +18,3 @@ end for print("\nIP Address : " + target_ip) print(format_columns(column)) -