This password was not compromised in any database breach!!
@@ -66,7 +66,7 @@
This password was not compr
PasswordSecurity.info is a free service. If you wan't to show your support, you can donate via Bitcoin: 14Qyu3nAe7heugEsNjLHVVUgs9Ax49WGjf
-
+
diff --git a/js/main.js b/js/main.js
index 4c41719..65b6cb3 100644
--- a/js/main.js
+++ b/js/main.js
@@ -1,242 +1,248 @@
-(function (doc) {
- var passwordInput = doc.getElementById("password-box"),
- timeDiv = doc.getElementById("password-time"),
- checksList = doc.getElementById("password-checks");
- var passwordplain;
-
- // Code to render the time returned by HSIMP
- var renderTime = function (time, input) {
- timeDiv.innerHTML = time || "";
- };
-
- // Code to output the checks returned by HSIMP
- var renderChecks = function (checks, input) {
- checksList.innerHTML = "";
-
- for (var i = 0, l = checks.length; i < l; i++) {
- var li = doc.createElement("li"),
- title = doc.createElement("h2"),
- message = doc.createElement("p");
-
- title.innerHTML = checks[i].name;
- li.appendChild(title);
-
- message.innerHTML = checks[i].message;
- li.appendChild(message);
-
- checksList.appendChild(li);
- }
- };
-
- // Setup the HSIMP object
- var attachTo = hsimp({
- options: {
- calculationsPerSecond: 10e9, // 10 billion calculations per second
- good: 31557600e9, // 1 billion years
- ok: 31557600e3 // 1 thousand years
- },
- outputTime: renderTime,
- outputChecks: renderChecks
- });
-
- // setup custom values for "instantly"/"forever"
- hsimp.setDictionary({
- "instantly": "Immediately",
- "forever": "Aaaaaaaaaaaaaaaages",
- });
-
- // Run the HSIMP
- attachTo(passwordInput);
-
-
-}(this.document));
-
-
-var passwordInput = document.getElementById("password-box")
-var passwordplain = '';
-var xhttp;
-
-function passwordmodified() {
- var modifiedpassword = passwordInput.value;
- if (modifiedpassword !== passwordplain) {
- document.getElementById("iscompromised").innerHTML = ' We are checking if your password has ever been compromised...';
-
- passwordplain = modifiedpassword;
-
- if (passwordplain !== '') {
-
- var sha1pass = SHA1(passwordplain);
- sha1pass = sha1pass.toUpperCase();
- var subsha1pass = sha1pass.substring(5);
- if (xhttp) {
- xhttp.abort();
- }
- xhttp = new XMLHttpRequest();
- xhttp.onreadystatechange = function() {
- if (this.readyState == 4 && this.status == 200) {
- var xhttpresponse = this.responseText;
- if (xhttpresponse.indexOf(subsha1pass) !== -1) {
-
- var passlist = xhttpresponse.split("\n");
- var pwnedcount = 0;
- var timespell = 'times';
- for (var i = 0; i < passlist.length; i++) {
- if (subsha1pass == passlist[i].split(":")[0]) {
- pwnedcount = passlist[i].split(":")[1];
- if (passlist[i].split(":")[1] == 1){ timespell = "time"; }
- }
- }
-
- document.getElementById("iscompromised").innerHTML = 'Oh no! This password was found '+ pwnedcount + ' '+ timespell + ' in compromised passwords databases! If this is your password, you should change it immediately. Using a password that has been breached is extremely dangerous.
If you are using this password on multiple websites, you should take the opportunity to start using different passwords for every website. Attackers can take the advantage of password reuse by automating login attempts on your account using breached emails and password pairs.
';
- }else {
- document.getElementById("iscompromised").innerHTML = 'Good news, this password has never been breached!';
- }
- }
- };
-
- xhttp.open('GET', 'https://api.pwnedpasswords.com/range/' + sha1pass.substring(0, 5));
- xhttp.send();
- }
-
- }
-}
-
-
-/**
-*
-* Secure Hash Algorithm (SHA1)
-* http://www.webtoolkit.info/
-*
-**/
-function SHA1 (msg) {
- function rotate_left(n,s) {
- var t4 = ( n<>>(32-s));
- return t4;
- };
- function lsb_hex(val) {
- var str="";
- var i;
- var vh;
- var vl;
- for( i=0; i<=6; i+=2 ) {
- vh = (val>>>(i*4+4))&0x0f;
- vl = (val>>>(i*4))&0x0f;
- str += vh.toString(16) + vl.toString(16);
- }
- return str;
- };
- function cvt_hex(val) {
- var str="";
- var i;
- var v;
- for( i=7; i>=0; i-- ) {
- v = (val>>>(i*4))&0x0f;
- str += v.toString(16);
- }
- return str;
- };
- function Utf8Encode(string) {
- string = string.replace(/\r\n/g,"\n");
- var utftext = "";
- for (var n = 0; n < string.length; n++) {
- var c = string.charCodeAt(n);
- if (c < 128) {
- utftext += String.fromCharCode(c);
- }
- else if((c > 127) && (c < 2048)) {
- utftext += String.fromCharCode((c >> 6) | 192);
- utftext += String.fromCharCode((c & 63) | 128);
- }
- else {
- utftext += String.fromCharCode((c >> 12) | 224);
- utftext += String.fromCharCode(((c >> 6) & 63) | 128);
- utftext += String.fromCharCode((c & 63) | 128);
- }
- }
- return utftext;
- };
- var blockstart;
- var i, j;
- var W = new Array(80);
- var H0 = 0x67452301;
- var H1 = 0xEFCDAB89;
- var H2 = 0x98BADCFE;
- var H3 = 0x10325476;
- var H4 = 0xC3D2E1F0;
- var A, B, C, D, E;
- var temp;
- msg = Utf8Encode(msg);
- var msg_len = msg.length;
- var word_array = new Array();
- for( i=0; i>>29 );
- word_array.push( (msg_len<<3)&0x0ffffffff );
- for ( blockstart=0; blockstart We are checking if your password has ever been compromised...';
+
+ clearTimeout(requestTimeout);
+ requestTimeout = setTimeout(passwordmodified, 2000);
+}
+
+var passwordInput = document.getElementById("password-box");
+var passwordplain = '';
+var xhttp;
+
+function passwordmodified() {
+ var modifiedpassword = passwordInput.value;
+ if (modifiedpassword !== passwordplain) {
+
+ passwordplain = modifiedpassword;
+
+ if (passwordplain !== '') {
+
+ var sha1pass = SHA1(passwordplain);
+ sha1pass = sha1pass.toUpperCase();
+ var subsha1pass = sha1pass.substring(5);
+ if (xhttp) {
+ xhttp.abort();
+ }
+ xhttp = new XMLHttpRequest();
+ xhttp.onreadystatechange = function() {
+ if (this.readyState == 4 && this.status == 200) {
+ var xhttpresponse = this.responseText;
+ if (xhttpresponse.indexOf(subsha1pass) !== -1) {
+
+ var passlist = xhttpresponse.split("\n");
+ var pwnedcount = 0;
+ var timespell = 'times';
+ for (var i = 0; i < passlist.length; i++) {
+ if (subsha1pass == passlist[i].split(":")[0]) {
+ pwnedcount = passlist[i].split(":")[1];
+ if (passlist[i].split(":")[1] == 1){ timespell = "time"; }
+ }
+ }
+
+ document.getElementById("iscompromised").innerHTML = 'Oh no! This password was found '+ pwnedcount + ' '+ timespell + ' in compromised passwords databases! If this is your password, you should change it immediately. Using a password that has been breached is extremely dangerous.
If you are using this password on multiple websites, you should take the opportunity to start using different passwords for every website. Attackers can take the advantage of password reuse by automating login attempts on your account using breached emails and password pairs.
';
+ }else {
+ document.getElementById("iscompromised").innerHTML = 'Good news, this password has never been breached!';
+ }
+ }
+ };
+
+ xhttp.open('GET', 'https://api.pwnedpasswords.com/range/' + sha1pass.substring(0, 5));
+ xhttp.send();
+ }
+
+ }
+}
+
+
+/**
+*
+* Secure Hash Algorithm (SHA1)
+* http://www.webtoolkit.info/
+*
+**/
+function SHA1 (msg) {
+ function rotate_left(n,s) {
+ var t4 = ( n<>>(32-s));
+ return t4;
+ };
+ function lsb_hex(val) {
+ var str="";
+ var i;
+ var vh;
+ var vl;
+ for( i=0; i<=6; i+=2 ) {
+ vh = (val>>>(i*4+4))&0x0f;
+ vl = (val>>>(i*4))&0x0f;
+ str += vh.toString(16) + vl.toString(16);
+ }
+ return str;
+ };
+ function cvt_hex(val) {
+ var str="";
+ var i;
+ var v;
+ for( i=7; i>=0; i-- ) {
+ v = (val>>>(i*4))&0x0f;
+ str += v.toString(16);
+ }
+ return str;
+ };
+ function Utf8Encode(string) {
+ string = string.replace(/\r\n/g,"\n");
+ var utftext = "";
+ for (var n = 0; n < string.length; n++) {
+ var c = string.charCodeAt(n);
+ if (c < 128) {
+ utftext += String.fromCharCode(c);
+ }
+ else if((c > 127) && (c < 2048)) {
+ utftext += String.fromCharCode((c >> 6) | 192);
+ utftext += String.fromCharCode((c & 63) | 128);
+ }
+ else {
+ utftext += String.fromCharCode((c >> 12) | 224);
+ utftext += String.fromCharCode(((c >> 6) & 63) | 128);
+ utftext += String.fromCharCode((c & 63) | 128);
+ }
+ }
+ return utftext;
+ };
+ var blockstart;
+ var i, j;
+ var W = new Array(80);
+ var H0 = 0x67452301;
+ var H1 = 0xEFCDAB89;
+ var H2 = 0x98BADCFE;
+ var H3 = 0x10325476;
+ var H4 = 0xC3D2E1F0;
+ var A, B, C, D, E;
+ var temp;
+ msg = Utf8Encode(msg);
+ var msg_len = msg.length;
+ var word_array = new Array();
+ for( i=0; i>>29 );
+ word_array.push( (msg_len<<3)&0x0ffffffff );
+ for ( blockstart=0; blockstart