Facebook
From Mature Sloth, 2 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 46
  1. const fetch = require('node-fetch');
  2. const SocksProxyAgent = require('socks-proxy-agent');
  3. const fs = require("fs")
  4. const randomize = require('randomatic');
  5.  
  6. const random = require('random-name');
  7. const readline = require("readline-sync");
  8.  
  9.  
  10.  
  11. const functionAdd = async (email,nickname,device,port) =>  new Promise((resolve, reject) => {  
  12.        fetch('https://appapi.handypick.io/user/add-with-device-id', {
  13.         agent:new SocksProxyAgent(`socks5://127.0.0.1:${port}`),
  14.         method: 'POST',
  15.         body: JSON.stringify({
  16.             "email":email,
  17.             "phone":`+82${randomize('0', 9)}`,
  18.             "isPhone":true,
  19.             "password":"Kmaway87aaa@",
  20.             "pin_code":randomize('0', 6),
  21.             "nickname":nickname,
  22.             "lang_code":"en",
  23.             "fbuid": "xd1Vfc2oeTgVzr4CkgHMZnaDU153",
  24.             "deviceID":device
  25.         }),
  26.         headers: {
  27.             'accept': 'application/json, text/plain, */*',
  28.             'Content-Type': 'application/json;charset=utf-8',
  29.             'Content-Length': 226,
  30.             'Host': 'appapi.handypick.io',
  31.             'Connection': 'Keep-Alive',
  32.             'Accept-Encoding': 'gzip',
  33.             'User-Agent': 'okhttp/3.14.3'
  34.         }
  35.        })
  36.        .then(res => res.json())
  37.        .then(result => {
  38.            resolve(result);
  39.        })
  40.        .catch(err => reject(err))
  41. });
  42.  
  43. const functionLogin = (email, device,port) => new Promise((resolve, reject) => {
  44.        fetch('https://appapi.handypick.io/user/login', {
  45.         agent:new SocksProxyAgent(`socks5://127.0.0.1:${port}`),
  46.         method: 'POST',
  47.         body: JSON.stringify({
  48.             "email":email,"password":"Kmaway87aaa@","deviceID":device
  49.         }),
  50.         headers: {
  51.             'accept': 'application/json, text/plain, */*',
  52.             'authorization': `Bearer null`,
  53.             'Content-Type': 'application/json;charset=utf-8',
  54.             'Content-Length': 226,
  55.             'Host': 'appapi.handypick.io',
  56.             'Connection': 'Keep-Alive',
  57.             'Accept-Encoding': 'gzip',
  58.             'User-Agent': 'okhttp/3.14.3'
  59.         }
  60.        })
  61.        .then(res => res.json())
  62.        .then(result => {
  63.            resolve(result);
  64.        })
  65.        .catch(err => reject(err))
  66. });
  67.  
  68.  
  69. const functionReff = (email, device, token, codreff,port) => new Promise((resolve, reject) => {
  70.        fetch('https://appapi.handypick.io/user/confirm-invite-code', {
  71.         agent:new SocksProxyAgent(`socks5://127.0.0.1:${port}`),
  72.         method: 'POST',
  73.         body: JSON.stringify({
  74.             "receiver_email":email,"code":codreff,"deviceID":device
  75.         }),
  76.         headers: {
  77.             'accept': 'application/json, text/plain, */*',
  78.             'authorization': `Bearer ${token}`,
  79.             'Content-Type': 'application/json;charset=utf-8',
  80.             'Content-Length': 226,
  81.             'Host': 'appapi.handypick.io',
  82.             'Connection': 'Keep-Alive',
  83.             'Accept-Encoding': 'gzip',
  84.             'User-Agent': 'okhttp/3.14.3'
  85.         }
  86.        })
  87.        .then(res => res.json())
  88.        .then(result => {
  89.            resolve(result);
  90.        })
  91.        .catch(err => reject(err))
  92. });
  93.  
  94.  
  95. (async () => {
  96.     const codreff = readline.question('[?] Kode reff: ')
  97.     console.log("")
  98.     const fileport = fs.readFileSync("./port.txt","utf-8")
  99.     const port = fileport.split("\n")
  100.     for (var i = 0; i <= port.length; i++){
  101.         try {
  102.  
  103.             const device = randomize('a0', 16)
  104.             const name = random.first()
  105.             const rand = randomize('0', 5)
  106.             const email = `${name}${rand}@gmail.com`
  107.             console.log(`[+] Email: ${email}`)
  108.             const nickname = `${name}${rand}`
  109.             const add = await functionAdd(email, nickname, device,`${port[i]}`)
  110.             if(add.hasOwnProperty('user')){
  111. console.log('[+] Berhasil regist')
  112. const log = await functionLogin(email, device,`${port[i]}`)
  113. const token = log.auth_token
  114. const addReff = await functionReff(email, device, token, codreff,`${port[i]}`)
  115. if(addReff.message == 'success'){
  116.     console.log('[+] Berhasil reff\n')
  117.     fs.appendFileSync("./result.txt",`${email}|${token}|${device}\n`)
  118. } else {
  119.     console.log('[!] Gagal reff\n')
  120. }
  121.             } else {
  122. console.log('[!] Gagal regist\n')
  123.             }
  124.         } catch (e) {
  125.             console.log(e)
  126.    }
  127. }
  128. })()
  129.