Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Enc HTML

IbnuSyawall May 21st, 2020 (edited) 915 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.   - name: encHTML
  3.   - require: NODEJS [superagent, html-to-json, random]
  4.   - challange by: Rusmana ID
  5.   - install: wget https://pastebin.com/raw/2WqvLWvA -O enc.js
  6. */
  7.  
  8. const superagent = require('superagent');
  9. const h2json = require('html-to-json');
  10. const random = require('random')
  11. const fs = require('fs');
  12.  
  13. let __url;
  14.  
  15. class __encryptHTML {
  16.   constructor(url) {
  17.     this.url = 'https://www.smartgb.com/free_encrypthtml.php'
  18.     __url = this.url
  19.   }
  20.   _getKey(callback) {
  21.     superagent.get(this.url).end((err, res) => {
  22.       if (err) throw err;
  23.       const data = res.text
  24.       h2json.parse(data, {
  25.         'key': ['input', (key) => {
  26.            return key.attr('value')
  27.          }]
  28.       }, (err, result) => {
  29.         if (err) throw err
  30.         callback(undefined, {
  31.           dataKey: result['key']
  32.         })
  33.       })
  34.     })
  35.   }
  36. }
  37.  
  38. const main = new __encryptHTML()
  39.  
  40. console.log('          [ Encrypt HTML File by Ibnusyawall ]')
  41. console.log('                 Black Coder Rush         ')
  42.  
  43. main._getKey((error, {dataKey} = {}) => {
  44.   const _fileHTML   = process.argv[2]
  45.   if (typeof _fileHTML  === 'undefined') {
  46.     console.log('[!] Harap memberi argumen letak file.'); process.exit()
  47.   } else {
  48.     const key = dataKey
  49.     fs.readFile(`./${_fileHTML}`, (err, data) => {
  50.       if (err) throw err
  51.       superagent.post(`${__url}?do=crypt`).send({
  52.         h: `${data}`,
  53.         s: 'normal',
  54.         ch: `${key[2]}`,
  55.         Skicka: 'Encrypt+HTML'
  56.       }).set('content-type', 'application/x-www-form-urlencoded').end((err, res) => {
  57.         if (err) throw err
  58.         h2json.parse(res.text, {
  59.           'data': ['textarea', (dt) => {
  60.             return dt.text()
  61.           }]
  62.         }, (err, result) => {
  63.           if (err) throw err
  64.           const dtr = random.int(1, 1000)
  65.           const cnf = new Buffer.from(`|${dtr}y`).toString('base64')
  66.           const nmf = cnf.replace(/[\=]/gi, '')
  67.           fs.writeFile(`./${nmf}.html`, result['data'][0], (err) => {
  68.             try {
  69.               console.log(` [+] Encrypt Type: Normal\n [+] Status : Success\n [+] Save To: ${nmf}.html`)
  70.               return
  71.             } catch (err) {
  72.               throw err
  73.             }
  74.           })
  75.         })
  76.       })
  77.     })
  78.   }
  79. })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top