const fetch = require('node-fetch'); const SocksProxyAgent = require('socks-proxy-agent'); const fs = require("fs") const randomize = require('randomatic'); const random = require('random-name'); const readline = require("readline-sync"); const functionAdd = async (email,nickname,device,port) => new Promise((resolve, reject) => { fetch('https://appapi.handypick.io/user/add-with-device-id', { agent:new SocksProxyAgent(`socks5://127.0.0.1:${port}`), method: 'POST', body: JSON.stringify({ "email":email, "phone":`+82${randomize('0', 9)}`, "isPhone":true, "password":"Kmaway87aaa@", "pin_code":randomize('0', 6), "nickname":nickname, "lang_code":"en", "fbuid": "xd1Vfc2oeTgVzr4CkgHMZnaDU153", "deviceID":device }), headers: { 'accept': 'application/json, text/plain, */*', 'Content-Type': 'application/json;charset=utf-8', 'Content-Length': 226, 'Host': 'appapi.handypick.io', 'Connection': 'Keep-Alive', 'Accept-Encoding': 'gzip', 'User-Agent': 'okhttp/3.14.3' } }) .then(res => res.json()) .then(result => { resolve(result); }) .catch(err => reject(err)) }); const functionLogin = (email, device,port) => new Promise((resolve, reject) => { fetch('https://appapi.handypick.io/user/login', { agent:new SocksProxyAgent(`socks5://127.0.0.1:${port}`), method: 'POST', body: JSON.stringify({ "email":email,"password":"Kmaway87aaa@","deviceID":device }), headers: { 'accept': 'application/json, text/plain, */*', 'authorization': `Bearer null`, 'Content-Type': 'application/json;charset=utf-8', 'Content-Length': 226, 'Host': 'appapi.handypick.io', 'Connection': 'Keep-Alive', 'Accept-Encoding': 'gzip', 'User-Agent': 'okhttp/3.14.3' } }) .then(res => res.json()) .then(result => { resolve(result); }) .catch(err => reject(err)) }); const functionReff = (email, device, token, codreff,port) => new Promise((resolve, reject) => { fetch('https://appapi.handypick.io/user/confirm-invite-code', { agent:new SocksProxyAgent(`socks5://127.0.0.1:${port}`), method: 'POST', body: JSON.stringify({ "receiver_email":email,"code":codreff,"deviceID":device }), headers: { 'accept': 'application/json, text/plain, */*', 'authorization': `Bearer ${token}`, 'Content-Type': 'application/json;charset=utf-8', 'Content-Length': 226, 'Host': 'appapi.handypick.io', 'Connection': 'Keep-Alive', 'Accept-Encoding': 'gzip', 'User-Agent': 'okhttp/3.14.3' } }) .then(res => res.json()) .then(result => { resolve(result); }) .catch(err => reject(err)) }); (async () => { const codreff = readline.question('[?] Kode reff: ') console.log("") const fileport = fs.readFileSync("./port.txt","utf-8") const port = fileport.split("\n") for (var i = 0; i <= port.length; i++){ try { const device = randomize('a0', 16) const name = random.first() const rand = randomize('0', 5) const email = `${name}${rand}@gmail.com` console.log(`[+] Email: ${email}`) const nickname = `${name}${rand}` const add = await functionAdd(email, nickname, device,`${port[i]}`) if(add.hasOwnProperty('user')){ console.log('[+] Berhasil regist') const log = await functionLogin(email, device,`${port[i]}`) const token = log.auth_token const addReff = await functionReff(email, device, token, codreff,`${port[i]}`) if(addReff.message == 'success'){ console.log('[+] Berhasil reff\n') fs.appendFileSync("./result.txt",`${email}|${token}|${device}\n`) } else { console.log('[!] Gagal reff\n') } } else { console.log('[!] Gagal regist\n') } } catch (e) { console.log(e) } } })()