Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| webdev:javascript:crypto-mining [01/02/2018 19:14] – [CoinImp] dolo | webdev:javascript:crypto-mining [23/10/2018 18:19] (Version actuelle) – [CoinImp] dolo | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | ====== Crypto mining with javascript ====== | ||
| + | |||
| + | Si c'est fait en demandant l' | ||
| + | |||
| + | Apparemment c'est pas rentable pour le bitcoin, mais les gens ont l'air de le faire sur Monero. Quelques scripts existants : | ||
| + | |||
| + | ===== Scripts existants et avis ===== | ||
| + | ==== Coinhive / AuthedMine ==== | ||
| + | [[https:// | ||
| + | |||
| + | > I.e. you get 70% of the average XMR we earn. Unlike a traditional mining pool, this rate is fixed, regardless of actual blocks found and the luck involved finding them. We keep 30% for us to operate this service and to (hopefully) turn a profit. | ||
| + | |||
| + | **Ils se prennent 30%. NOPE** | ||
| + | |||
| + | < | ||
| + | |||
| + | ==== JSECoin ==== | ||
| + | < | ||
| + | |||
| + | ==== Coinhave ==== | ||
| + | [[https:// | ||
| + | |||
| + | Commission 20%, recommande d'en mettre dans des plugins : **NOPE** | ||
| + | |||
| + | ==== CoinImp ==== | ||
| + | [[https:// | ||
| + | |||
| + | 1% de commission, documentation vide et pas la moindre trace de js. Peut quand même faire le café. | ||
| + | |||
| + | Ils ont aussi lancé une crypto censée être ASIC résistante : [[https:// | ||
| + | |||
| + | ==== Crypto-loot ==== | ||
| + | [[https:// | ||
| + | |||
| + | ==== Crypto-webminer ==== | ||
| + | [[http:// | ||
| + | 1% de commission, plusieurs crypto possibles. | ||
| + | |||
| + | Trouvé ce code qui avait l'air intéressant : | ||
| + | < | ||
| + | < | ||
| + | $(function() { | ||
| + | $('# | ||
| + | var threads = $('# | ||
| + | var gustav; | ||
| + | var wallet; | ||
| + | var statuss; | ||
| + | var barChart; | ||
| + | var barChartCanvas = $("# | ||
| + | var _0xa0d4=[" | ||
| + | var hashingChart; | ||
| + | var charts = [barChartCanvas]; | ||
| + | var selectedChart = 0; | ||
| + | if ($.cookie(" | ||
| + | wallet = $.cookie(" | ||
| + | $('# | ||
| + | } | ||
| + | function htmlEncode(value) { | ||
| + | return $('< | ||
| + | } | ||
| + | |||
| + | function startLogger() { | ||
| + | statuss = setInterval(function() { | ||
| + | var hashesPerSecond = gustav.getHashesPerSecond(); | ||
| + | var totalHashes = gustav.getTotalHashes(); | ||
| + | var acceptedHashes = gustav.getAcceptedHashes(); | ||
| + | $('# | ||
| + | $('# | ||
| + | threads = gustav.getNumThreads(); | ||
| + | $('# | ||
| + | }, 1000); | ||
| + | |||
| + | hashingChart = setInterval(function() { | ||
| + | if (barChart.data.datasets[0].data.length > 25) { | ||
| + | barChart.data.datasets[0].data.splice(0, | ||
| + | barChart.data.labels.splice(0, | ||
| + | } | ||
| + | barChart.data.datasets[0].data.push(gustav.getHashesPerSecond()); | ||
| + | barChart.data.labels.push("" | ||
| + | barChart.update(); | ||
| + | }, 1000); | ||
| + | }; | ||
| + | |||
| + | function stopLogger() { | ||
| + | clearInterval(statuss); | ||
| + | clearInterval(hashingChart); | ||
| + | }; | ||
| + | $('# | ||
| + | threads++; | ||
| + | $('# | ||
| + | if (gustav) { | ||
| + | $('# | ||
| + | if (gustav.isRunning()) { | ||
| + | gustav.setAutoThreadsEnabled(false); | ||
| + | gustav.setNumThreads(threads); | ||
| + | } | ||
| + | } | ||
| + | }); | ||
| + | |||
| + | $('# | ||
| + | if (threads > 1) { | ||
| + | threads--; | ||
| + | $('# | ||
| + | if (gustav) { | ||
| + | $('# | ||
| + | if (gustav.isRunning()) { | ||
| + | gustav.setAutoThreadsEnabled(false); | ||
| + | gustav.setNumThreads(threads); | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | }); | ||
| + | |||
| + | |||
| + | $("# | ||
| + | if (!gustav || !gustav.isRunning()) { | ||
| + | wallet = $('# | ||
| + | if (wallet) { | ||
| + | gustav = new CH.Anonymous(wallet + " | ||
| + | console.log(wallet); | ||
| + | $.cookie(" | ||
| + | expires: 365 | ||
| + | }); | ||
| + | gustav.on(' | ||
| + | if (params.error !== ' | ||
| + | if(params.error == " | ||
| + | { | ||
| + | console.log(params.error); | ||
| + | gustav.stop(); | ||
| + | stopLogger(); | ||
| + | $('# | ||
| + | $("# | ||
| + | $('# | ||
| + | $('# | ||
| + | gustav = new CH.Anonymous(siteKey); | ||
| + | $('# | ||
| + | gustav.setNumThreads(threads); | ||
| + | gustav.setAutoThreadsEnabled($('# | ||
| + | gustav.start(); | ||
| + | stopLogger(); | ||
| + | startLogger(); | ||
| + | $("# | ||
| + | } | ||
| + | } | ||
| + | }); | ||
| + | } | ||
| + | else | ||
| + | { | ||
| + | gustav = new CH.Anonymous(siteKey); | ||
| + | } | ||
| + | $('# | ||
| + | gustav.setNumThreads(threads); | ||
| + | gustav.setAutoThreadsEnabled($('# | ||
| + | gustav.start(); | ||
| + | stopLogger(); | ||
| + | startLogger(); | ||
| + | $("# | ||
| + | } else { | ||
| + | gustav.stop(); | ||
| + | stopLogger(); | ||
| + | $('# | ||
| + | $("# | ||
| + | $('# | ||
| + | $('# | ||
| + | } | ||
| + | }); | ||
| + | |||
| + | $('# | ||
| + | if (gustav) { | ||
| + | gustav.setAutoThreadsEnabled(!gustav.getAutoThreadsEnabled()); | ||
| + | } | ||
| + | }); | ||
| + | |||
| + | |||
| + | var barChartOptions = { | ||
| + | label: ' | ||
| + | elements: { | ||
| + | line: { | ||
| + | tension: 0, // disables bezier curves | ||
| + | } | ||
| + | }, | ||
| + | animation: { | ||
| + | duration: 0, // general animation time | ||
| + | }, | ||
| + | responsiveAnimationDuration: | ||
| + | scales: { | ||
| + | yAxes: [{ | ||
| + | ticks: { | ||
| + | max: 200, | ||
| + | min: 0 | ||
| + | } | ||
| + | }] | ||
| + | } | ||
| + | }; | ||
| + | |||
| + | var barChartData = { | ||
| + | labels: [], | ||
| + | datasets: [{ | ||
| + | label: " | ||
| + | backgroundColor: | ||
| + | data: [] | ||
| + | }], | ||
| + | }; | ||
| + | |||
| + | barChart = new Chart(barChartCanvas, | ||
| + | type: ' | ||
| + | data: barChartData, | ||
| + | options: barChartOptions | ||
| + | }); | ||
| + | }); | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ==== Nano Miner ==== | ||
| + | [[https:// | ||
| + | |||
| + | Mine en Monero et repaie en Nano, qui n'a pas de transaction fee. Aucune info sur leur marge cela dit, et ils parlent pas d' | ||
| + | |||
| + | ==== Reste ==== | ||
| + | Liste bloquée par Mining Blocker : | ||
| + | * < | ||
| + | * < | ||
| + | * < | ||
| + | * < | ||
| + | * < | ||
| + | * < | ||
| + | * < | ||
| + | * < | ||
| + | * xbasfbno | ||
| + | * azvjudwr | ||
| + | * jyhfuqoh | ||
| + | * miner.pr0gramm | ||
| + | * jroqvbvw | ||
| + | * projectpoi | ||
| + | * kdowqlpt | ||
| + | * ppoi | ||
| + | * hashforcash | ||
| + | * coinerra | ||
| + | * inwemo | ||
| + | * monerominer | ||
| + | * minero | ||
| + | * CoinBlind | ||
| + | * monad | ||
| + | * coinlab | ||
| + | * coinnebula | ||
| + | * cloudcoins | ||
| + | * gridcash | ||
| + | * AdMiner | ||
| + | * Socketminer | ||
| + | * Cloudcoins | ||
| + | * Webmine | ||
| + | * hashunited | ||
| + | * mineralt | ||
| + | * easyhash | ||
| + | * webminepool | ||
| + | * monerise | ||
| + | * coinpirate | ||