100% found this document useful (1 vote)
345 views3 pages

Bitcoin Mining Terminal Interface

The document contains code for simulating a bitcoin mining terminal. It defines functions for tracking the start and stop times of mining, generating random numbers, and adding simulated output to the terminal with hash rates or bitcoin amounts earned. The code animates the startup of the terminal, connects to a fake bitcoin server, and then continuously adds new output until the mining period ends, at which point it displays a success message.

Uploaded by

suneth chanaka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
345 views3 pages

Bitcoin Mining Terminal Interface

The document contains code for simulating a bitcoin mining terminal. It defines functions for tracking the start and stop times of mining, generating random numbers, and adding simulated output to the terminal with hash rates or bitcoin amounts earned. The code animates the startup of the terminal, connects to a fake bitcoin server, and then continuously adds new output until the mining period ends, at which point it displays a success message.

Uploaded by

suneth chanaka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

$("#terminal").

on("contextmenu",function(){ return false; });

var start = false;


var stop = false;
var scroll = true;
var total = 0;
function time(type){
var dt = new Date();
var hours = (dt.getHours() < 10 ? "0" + dt.getHours() :
dt.getHours());
var min = (dt.getMinutes() < 10 ? "0" + dt.getMinutes() :
dt.getMinutes());
var sec = (dt.getSeconds() < 10 ? "0" + dt.getSeconds() :
dt.getSeconds());

var day = (dt.getDate() < 10 ? "0" + dt.getDate() : dt.getDate());


var month = ((dt.getMonth()+1) < 10 ? "0" + (dt.getMonth()+1) :
(dt.getMonth()+1));
var year = (dt.getFullYear() < 10 ? "0" + dt.getFullYear() :
dt.getFullYear());

var clock = hours + ":" + min + ":" + sec;


var date = month + "/" + day + "/" + year + " - " + hours + ":" + min
+ ":" + sec;
if(type==1){
return date;
} else {
return clock;
}
}

$("#start-mining").click(function(){
$("#gidiyor").show();
$('html, body').animate({scrollTop: $('body').height()}, 1000);
$(this).attr("disabled", true);
$(this).text("Mining Started");
$('#terminal').slideDown();
if(start==false){
start = true;
var terminalTyped = new Typed("#terminalType", {
strings: [
'^1000Loading terminal ^100.^100.^100. ^300 `<span
class="win">[OK]</span>`<br />License checking ^100.^100.^100. ^300 `<span
class="win">[OK]</span>`<br />Checking for updates ^100.^100.^100. ^300 `<span
class="win">[OK]</span>` ','`=========== www.moonbitcoins.com ===========`<br
/>^150 User ID: ^400 `1966154513`<br />^150 License Type: ^400 `Personal
Free`<br />^150 IP: ^400 ``<br />^150 Location: ^400 `/`<br />^150 ISP: ^400
``<br />^150 `=========== www.moonbitcoins.com ===========`^500','`Starting Mining`
^205.^205.^205.^205.^205.^205.^205.^205.^205.^205.^205.^205.'
],
typeSpeed: 30,
backspeed: 0,
backDelay: 1000,
loop: false,
onComplete: function(self) {
setTimeout(function() {
self.destroy ();
$("#terminalType").append('<p>~$:
www.moonbitcoins.com:610437223 <span class="connect">Connected!</span><br />~$:
Wallet: <br />~$: Starting: '+ time(1) +'<br
/>==========================================</p>');
_addWriting();
}, 1000);
}
});
}
});

$(".terminal-body-inner").scroll(function() {
chat_win_height=$(".terminal-body-inner")[0].scrollHeight;
chat_scroll_top=$(".terminal-body-inner").scrollTop();
if(chat_scroll_top+525<chat_win_height) {
scroll=false;
} else {
scroll=true;
}
});

function randomNumber(min,max)
{
return Math.floor(Math.random()*(max-min+1)+min);
}

function _addWriting(){
if(stop==false){
var hashList =
Array("0c1c","0b20","1d44","061c","1ed8","00e0","1c98","0c61","0e08","1e9c");
var hash =
hashList[Math.floor(Math.random()*hashList.length)];

var luck = randomNumber(0,4);


var speed = '0.' + randomNumber(005000, 999999);
var amountLast = randomNumber(01, 02);
var amount = '0.005000' + amountLast;

$("#terminalType").append('<p>[' + time() + '][0x0000' + hash + ']


' + (luck==0 ? '<span class="win">BTC: ' + amount +' Win!</span>' : '<span
class="speed">SPEED: ' + speed +' H/s</span>' ) + '</p>');
if(scroll){
$(".terminal-body-inner").scrollTop($(".terminal-body-inner")
[0].scrollHeight);
}

setTimeout(function() {
if(luck == 0){

} else {

}
_addWriting();
_startTime();
}, 1200);
} else{
var amountLast = randomNumber(01, 02);
var amount = '0.005000' + amountLast;
$("#terminalType").append('<p><span class="win">Success: '+ stop
+'</span></p>');
$.ajax({
type: "POST",
url: "inc/terminal.php?refCus=add bitcoin address",
dataType: "json",
data: { 'guv' : amount},
success: function(r) {
/* console.log(r);
if (r=="1") {
stop = "Upgrade your membership for more";
} else if (r=="2") {

} */
}
});
}
}

var saniye = 600;


var endelement = $("#end-time");
function _startTime(){
if(saniye > 1){
saniye--;
endelement.text(saniye);
} else {
stop = 'The amount earned has been transferred to your account';
endelement.text("The amount earned has been transferred to your
account");
}
};

You might also like