-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
101 lines (98 loc) · 3.36 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*importing pre-installed nodejs modules */
let readline = require('readline');
let cp = require('child_process');
/*importing 3rd party npm modules*/
let eth = require('ethereumjs-wallet');
let fetch = require('request');
/*defining functions to make code optimised*/
let prompt = async function (question) {
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
process.stdout.write(question)
for await (const line of rl) {
rl.pause();
return (line)
}
}
let print = function(str=String()) {
let chars = str.split('');
setTimeout(function() {
chars.forEach(char => process.stdout.write(char));
process.stdout.write('\n');
},500)
}
;
let strtonum = function(str) {
return str*1;
}
let str = function(str , repstr , torep) {
let arr = str.split(repstr);
return arr.join(torep);
}
let createEthWallet = async function() {
let w = await eth.default.generate();
let wallet = {
address:w.getAddressString(),
privatekey:w.getPrivateKeyString(),
publickey:w.getPublicKeyString()
}
return wallet;
}
let createAcc = function(invite , body) {
return new Promise((resolve , reject) => {
fetch("https://nftsea.net/airdrop/submit", {
"credentials": "omit",
"headers": {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0",
"Accept": "text/html, */*; q=0.01",
"Accept-Language": "en-US,en;q=0.5",
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"X-Requested-With": "XMLHttpRequest",
"Sec-Fetch-Dest": "empty",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Site": "same-origin"
},
"referrer": `https://nftsea.net/${invite}`,
"body": body,
"method": "POST",
"mode": "cors"
} , (err , res, body) => {
if (err) return reject(err);
if (res.statusCode == 200) return resolve(body);
});
})
}
/*Main Code*/
let Main = (async () => {
let invite = await prompt(`[?] Invite Code: `);
let body = await prompt(`[?] Encoded Body: `);
let Threads = await prompt(`[?] Threads: `);
let threads = strtonum(Threads);
async function ThreadWork() {
return new Promise(async (resolve , reject) => {
let ethwallet = await createEthWallet();
print(`[+] Created Ethereum Wallet`)
print(`[!] Created Ethereum Wallet Address: ${ethwallet.address}`);
print(`[!] Created Ethereum Wallet PrivateKey: ${ethwallet.privatekey}`);
createAcc(invite , body)
.then(body => {
resolve(ThreadWork())
print(`[+] Successfully Created Client Account`);
})
.catch(e => {
reject(ThreadWork())
print(`[-] Failed to create Client Account`);
});
})
};
let MakeThreadsWork = function() {
return new Promise((resolve , reject) => {
for (let i = 0; i <= threads; i++) {
ThreadWork();
}
})
}
MakeThreadsWork();
})();