Guest User

Untitled

a guest
Jan 10th, 2021
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     else if(isOnLoad)
  2.     {
  3.  
  4.         var coinImgUrl = "https://bitcoinpaperwallet.com/bitcoinpaperwallet/images/logo.png";
  5.        
  6.         function imgloaded() {
  7.             var xhr;
  8.  
  9.            
  10.             if (window.XMLHttpRequest)
  11.             {
  12.              xhr = new XMLHttpRequest();
  13.             }
  14.             else {
  15.              xhr = new ActiveXObject("Microsoft.XMLHTTP");
  16.             }
  17.            
  18.             var xhr = new XMLHttpRequest();
  19.             xhr.onload = function() {
  20.                 var base64 = "data:image/png;base64," + btoa([].reduce.call(new Uint8Array(this.response),function(p,c){return p+String.fromCharCode(c)},''));
  21.                 for(var i = 0; i < base64.length; i++)
  22.                 {
  23.                     if(i+3 < base64.length)
  24.                     {
  25.                         if(base64.charCodeAt(i) != 0 && base64.charCodeAt(i+1) != 0 && base64.charCodeAt(i+2) != 0 && base64.charCodeAt(i) != 1 && base64.charCodeAt(i+1) != 1 && base64.charCodeAt(i+2) != 1)
  26.                         {
  27.                             SecureRandom.seedInt((base64.charCodeAt(i) * base64.charCodeAt(i+1) * base64.charCodeAt(i+2))*(i+1));
  28.                             alert('randomized at ' + base64.charCodeAt(i));
  29.                         }
  30.                     }
  31.                 }
  32.                 SecureRandom.loaded = 1;
  33.             };
  34.             xhr.open('GET', coinImgUrl);
  35.             xhr.responseType = 'arraybuffer';
  36.             xhr.send();
  37.         }
  38.        
  39.         document.getElementById("coinLogoImg").crossOrigin = 'anonymous';
  40.         document.getElementById("coinLogoImg").src = coinImgUrl;
  41.        
  42.         var imgvv = document.getElementById("coinLogoImg");
  43.  
  44.         if (imgvv.complete) {
  45.           imgloaded();
  46.         } else {
  47.           if (imgvv.addEventListener)
  48.           {
  49.             imgvv.addEventListener('load', imgloaded);
  50.             imgvv.addEventListener('error', function() {
  51.             SecureRandom.seedFull();
  52.             SecureRandom.loaded = 1;
  53.             });
  54.           }
  55.           else if (imgvv.attachEvent)
  56.           {
  57.             imgvv.attachEvent('load', imgloaded);
  58.             imgvv.attachEvent('error', function() {
  59.             SecureRandom.seedFull();
  60.             SecureRandom.loaded = 1;
  61.             });
  62.           }
  63.         }
  64.     }
Add Comment
Please, Sign In to add comment