This article is a mirror article of machine translation, please click here to jump to the original article.

View: 15249|Reply: 3

JS Mining - How does Monero mine with web mining?

[Copy link]
Posted on 2/6/2018 1:47:25 PM | | | |
Recently, I saw a kind of mining using web JavaScript, and I would like to introduce it to you. Java is embedded in the web page, and once the user opens the website, the browser will turn into a Monero miner according to the script's instructions. This additional mining code usually takes up a lot of CPU, causing the user's computer to freeze or even fail to use normally.

Such a website will embed the Coinhive Java Miner code. The code is based on the CryptoNight mining algorithm, which can produce CryptoNote network currencies such as Monero, Dashcoin, DarkNetCoin, etc. The embedded Coinhive Java Miner only supports Monero mining.

So how do you get JS scripts to mine? There are a few more steps in between. I personally don't approve of this practice of sacrificing user experience to mine websites without user consent. It is very interesting to understand the implementation method and develop ideas. The following is an introduction to the specific operation.

(Note: 30% of the income you get from mining with the following js will be given to the developer, so you can only get 70% of the profit)

1. Register a Monero wallet and obtain the wallet address

Wallet download URL: https://getmonero.org/downloads/

Just download the corresponding program according to your system. I'm using Mac OS X, 64-bit

Software size: 157.9M

1. Create a new wallet



Just follow the prompts step by step

2. The final setting is successful



3. The final application interface is as follows:



Pay attention to your payee address, which will be used later

2. Register a mining platform

Registration link: https://coinhive.com/account/signup

1. Register an account



2. Go to Settings - > set the payment information



The address here is your wallet address

3. Set API Keys



This key will be used later to obtain the mining code

3. Get the mining code

Get code address: https://coinhive.com/documentation/miner

The resulting JS code looks like this:



I wrote a very simple html page that you can download and run or refer to,

Download address: http://oyim09vvu.bkt.clouddn.com/xmr.html

4. Operation effect
You can see that the CPU has skyrocketed significantly, and when the web page is closed, it immediately drops



At this point, you can check the mining progress on the Dashboard.

Visited at https://coinhive.com/dashboard



The current price of Monero is around ¥579



Finally, that's all for the introduction. This idea of using JS mining is quite interesting as a web developer. A piece of code can integrate a large number of online resources. However, this method does not inform users when browsing, reduces the user's experience, and cannot be widely promoted and used. The next time you open a web page, if the CPU fan is spinning wildly, maybe you can open the developer tools to see if the site is secretly using you to mine and understand the doorway.
Posted on 2/7/2018 2:08:57 PM |
Awesome @!! ~~~~ I studied
 Landlord| Posted on 2/8/2018 11:26:09 AM |
[Original] rookie can also use CPU to mine Monero XMR tutorial
http://www.itsvse.com/thread-4497-1-1.html
(Source: Architect)
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com