Skip to content

Instantly share code, notes, and snippets.

@samrocketman
Last active January 31, 2017 22:15
Show Gist options
  • Select an option

  • Save samrocketman/031093f04a5b55939702d332ebe6fd2d to your computer and use it in GitHub Desktop.

Select an option

Save samrocketman/031093f04a5b55939702d332ebe6fd2d to your computer and use it in GitHub Desktop.
2055538028 compromised accounts from 187 services. (2 billion accounts)
//run the following using Firefox Firebug on
//https://haveibeenpwned.com/PwnedWebsites
//2055538028 compromised accounts from 187 services. (2 billion accounts)
//http://stackoverflow.com/questions/1144783/how-to-replace-all-occurrences-of-a-string-in-javascript
String.prototype.replaceAll = function(search, replacement) {
var target = this;
return target.replace(new RegExp(search, 'g'), replacement);
};
var count = 0
for(var i=0;i<document.getElementsByClassName('pwnCount').length;i++ ) {
count += Number(document.getElementsByClassName('pwnCount')[i].innerHTML.replaceAll(",",""))
}
console.log(count.toString() + " compromised accounts from " + document.getElementsByClassName('pwnCount').length.toString() + " services.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment