nmap fix, get_shell made, print specific lib/version

This commit is contained in:
2025-02-13 22:48:15 +01:00
parent 638f240f0c
commit b6ef2e22d1
5 changed files with 50 additions and 5 deletions

View File

@@ -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