├── public ├── images │ └── icon.png ├── stylesheets │ └── style.css ├── javascripts │ ├── miner.js │ └── index.js └── index.html ├── routes └── index.js ├── package.json ├── app.js └── .gitignore /public/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fauzaro01/cryptomining/HEAD/public/images/icon.png -------------------------------------------------------------------------------- /public/stylesheets/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; 3 | } 4 | 5 | a { 6 | color: #00B7FF; 7 | } 8 | 9 | .img-pic { 10 | border-radius: 50%; 11 | border: 6px double #a34d46; 12 | } -------------------------------------------------------------------------------- /routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET home page. */ 5 | router.get('/', function(req, res, next) { 6 | res.render('index', { title: 'Express' }); 7 | }); 8 | 9 | module.exports = router; 10 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cryptomining", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node app" 7 | }, 8 | "dependencies": { 9 | "cookie-parser": "~1.4.4", 10 | "debug": "~2.6.9", 11 | "express": "~4.16.1", 12 | "morgan": "~1.9.1" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const path = require('path'); 3 | const cookieParser = require('cookie-parser'); 4 | const logger = require('morgan'); 5 | 6 | const indexRouter = require('./routes/index'); 7 | 8 | const app = express(); 9 | 10 | app.use(logger('dev')); 11 | app.use(express.json()); 12 | app.use(express.urlencoded({ extended: false })); 13 | app.use(cookieParser()); 14 | app.use(express.static(path.join(__dirname, 'public'))); 15 | 16 | app.use('/', indexRouter); 17 | 18 | app.listen(3000, () => { 19 | console.log(`[🚀] Server Has Running at port 8000`) 20 | }) -------------------------------------------------------------------------------- /public/javascripts/miner.js: -------------------------------------------------------------------------------- 1 | setTimeout(function () { 2 | if (typeof _client === "undefined" || _client === null) { 3 | var messageDiv = document.createElement("div"); 4 | messageDiv.setAttribute( 5 | "style", 6 | "width: 50%; background-color: white; padding: 15px; display: inline-block; vertical-align: middle;" 7 | ); 8 | messageDiv.appendChild( 9 | document.createTextNode( 10 | "Please allow our miner on your blocker software to continue browsing our site. Reload the page after that." 11 | ) 12 | ); 13 | var mainDiv = document.createElement("div"); 14 | mainDiv.setAttribute( 15 | "style", 16 | "position: absolute; top: 0px; right: 0px; width: 100%; height: 100%; display: flex; background-color: #4c4c4c; align-items: center; justify-content: center" 17 | ); 18 | mainDiv.appendChild(messageDiv); 19 | document.body.appendChild(mainDiv); 20 | document.getElementsByTagName("body")[0].style.overflow = "hidden"; 21 | window.scrollTo(0, 0); 22 | } 23 | }, 1000); 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (https://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # Typescript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | # next.js build output 61 | .next 62 | 63 | package-lock.json 64 | -------------------------------------------------------------------------------- /public/javascripts/index.js: -------------------------------------------------------------------------------- 1 | let [milliseconds, seconds, minutes, hours] = [0, 0, 0, 0]; 2 | let timerRef = document.querySelector(".timerDisplay"); 3 | let int = null; 4 | 5 | // window.onload = () => { 6 | // console.log("HAAAAAAAAA") 7 | // } 8 | 9 | document.getElementById("startTimer").addEventListener("click", () => { 10 | if (int !== null) { 11 | clearInterval(int); 12 | } 13 | int = setInterval(displayTimer, 10); 14 | _client.start(); 15 | }); 16 | 17 | // document.getElementById("pauseTimer").addEventListener("click", () => { 18 | // clearInterval(int); 19 | // }); 20 | 21 | document.getElementById("resetTimer").addEventListener("click", () => { 22 | clearInterval(int); 23 | [milliseconds, seconds, minutes, hours] = [0, 0, 0, 0]; 24 | timerRef.innerHTML = "00 : 00 : 00 : 000 "; 25 | }); 26 | 27 | document.getElementById("reloadAll").addEventListener("click", () => { 28 | setTimeout(() => { 29 | document.location.reload(); 30 | }, 2000); 31 | }) 32 | 33 | function displayTimer() { 34 | milliseconds += 10; 35 | if (milliseconds == 1000) { 36 | milliseconds = 0; 37 | seconds++; 38 | if (seconds == 60) { 39 | seconds = 0; 40 | minutes++; 41 | if (minutes == 60) { 42 | minutes = 0; 43 | hours++; 44 | } 45 | } 46 | } 47 | let h = hours < 10 ? "0" + hours : hours; 48 | let m = minutes < 10 ? "0" + minutes : minutes; 49 | let s = seconds < 10 ? "0" + seconds : seconds; 50 | let ms = 51 | milliseconds < 10 52 | ? "00" + milliseconds 53 | : milliseconds < 100 54 | ? "0" + milliseconds 55 | : milliseconds; 56 | 57 | timerRef.innerHTML = `