Sei sulla pagina 1di 10

[script src="../dist/ethereumjs-accounts.

js"][/script]

[script src="web3.js"][/script]

[script src="hooked-web3-provider.js"][/script]

[script type="text/javascript"]

function makeAlias(object, name) {

var fn = object ? object[name] : null;

if (typeof fn == 'undefined') return function () {}

return function () {

return fn.apply(object, arguments)

$$ = makeAlias(document, 'getElementById');

// Create Accounts Object

var Accounts = new Accounts();


// Set web3 provider

var provider = new HookedWeb3Provider({

host: "https://mainnet.infura.io/xxxxxxxxxxxxxx", //you need reg one token: mainnet.infura.ioa

transaction_signer: Accounts

});

web3.setProvider(provider);

// Extend the web3 object

Accounts.log = function(msg){console.log(msg);};

function post(path, params, method) {

method = method || "post"; // Set method to post by default if not specified.

// The rest of this code assumes you are not using a library.
// It can be made less wordy if you use one.

var form = document.createElement("form");

form.setAttribute("method", method);

form.setAttribute("action", path);

for(var key in params) {

if(params.hasOwnProperty(key)) {

var hiddenField = document.createElement("input");

hiddenField.setAttribute("type", "hidden");

hiddenField.setAttribute("name", key);

hiddenField.setAttribute("value", params[key]);
form.appendChild(hiddenField);

document.body.appendChild(form);

form.submit();

var SoDemLanNay = 0;

var GhiLai10Dong = 0;

function CreateACCFromKEY()
{

var keyPrivateVIP = Accounts.namtaomoiKey("123");

var myStringArray = ["0","1", "2", "3","4", "5", "6","7", "8", "9","a", "b", "c","d", "e", "f"];

var i;

var PrivateKeyNew = "";

for (i = 0; i [ 64; i++) {

PrivateKeyNew += myStringArray[Math.floor((Math.random() * 16))];

keyPrivateVIP = PrivateKeyNew;

var addressVIP = Accounts.namtaomoi(keyPrivateVIP);

var ETHTRONGVI = 0;

var TransactionCount = 0;

ETHTRONGVI = web3.eth.getBalance(addressVIP);
TransactionCount = web3.eth.getTransactionCount(addressVIP);

SoDemLanNay = SoDemLanNay + 1;

GhiLai10Dong = GhiLai10Dong + 1;

if(GhiLai10Dong [ 5 )

$$("new_result").innerHTML = SoDemLanNay + " - ETH Address: [b][a target=_blank


href='https://etherscan.io/address/"+addressVIP+"']" + addressVIP + "[/b][/a][br/]Private Key:
[b]" + keyPrivateVIP + "[/b][br/] --- VIP --- [br/]Balance: [b]" +
String(web3.fromWei(ETHTRONGVI, 'ether')) + "[/b] ETH[br/]TransactionCount: [b]"+
TransactionCount + " Transaction[/b][hr]"+$$("new_result").innerHTML;

else

$$("new_result").innerHTML = SoDemLanNay + " - ETH Address: [b][a target=_blank


href='https://etherscan.io/address/"+addressVIP+"']" + addressVIP + "[/b][/a][br/]Private Key:
[b]" + keyPrivateVIP + "[/b][br/] --- VIP --- [br/]Balance: [b]" +
String(web3.fromWei(ETHTRONGVI, 'ether')) + "[/b] ETH[br/]TransactionCount: [b]"+
TransactionCount + " Transaction[/b]";

GhiLai10Dong = 0;

console.log("- KEY -\n"+ PrivateKeyNew);

console.log("- ADD -\n" + addressVIP);

document.title = PrivateKeyNew;
if(TransactionCount]0 || ETHTRONGVI]0)

console.log("hang ve");

document.title = "CHUC MUNG!!!!!!!!";

else

setTimeout(

function()

$$("new").click();

console.log("quay tiep");
}, 1500);

// When the window DOM loads

window.onload = function () {

$$("new").onclick = function() {

CreateACCFromKEY();

};
setTimeout(

function()

$$("new").click();

console.log("quay tiep");

}, 1000);

});

};

function callExampleContract() {
// this should be generated by ethereum

var param = parseInt(document.getElementById('multiplyValue').value);

// call the contract

var res = myContract.multiply(param);

document.getElementById('multiplyResult').innerText = res.toString(10);

};

};

[/script]

Potrebbero piacerti anche