Last active
October 7, 2019 19:35
-
-
Save ypcrts/70caa6b8ebcf1917f007ce2b12595fbd to your computer and use it in GitHub Desktop.
nessus output miner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function attack() { | |
const rows = document.querySelectorAll('.plugin-details-output table tbody tr'); | |
var ret = []; | |
rows.forEach(row => { | |
const port = "Port " + row.querySelector('.port span').innerText.match(/\d{1,7}/)[0]; | |
row.querySelectorAll('.hosts a').forEach(host => { | |
if (!ret[port]) | |
ret[port] = new Set([]); | |
ret[port].add(host.attributes['data-host-id'].nodeValue); | |
}); | |
}); | |
var final = ""; | |
for (let i in ret) { | |
final += (i + ': ' + Array.from(ret[i]).join(', ')) + "\n"; | |
} | |
console.log(final) | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment