Skip to content

Instantly share code, notes, and snippets.

@valex91
Created June 3, 2019 21:32
Show Gist options
  • Save valex91/453447794b794cfe42db88b2943f5397 to your computer and use it in GitHub Desktop.
Save valex91/453447794b794cfe42db88b2943f5397 to your computer and use it in GitHub Desktop.
(function dw() {
const addresses = [];
document.querySelectorAll('li p a').forEach((e) => {
addresses.push(e.textContent);
});
const blob = new Blob([JSON.stringify(addresses.reduce((acum, possibleAddress) => {
if (possibleAddress.includes('http')) {
acum[possibleAddress] = {
href: possibleAddress
}
}
return acum;
}, {}), null, 2)], {type: 'application/json'});
let e = document.createElement('a');
e.href = window.URL.createObjectURL(blob);
e.setAttribute('download', 'CTF.json');
e.click();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment