wolfyflutter

56. top4top.io [file upload]

Aug 21st, 2025 (edited)
340
0
Never
8
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 1.92 KB | Source Code | 0 0
  1. /*
  2.   base    : https://top4top.io
  3.   fungsi  : file upload
  4.   note    : jangan lupa npm i file-type
  5.   node    : v24.5.0
  6.   by      : wolep
  7.   update  : 22 agustus 2025
  8.   req     : +62 822-xxxx-xxxx (Software Developer)
  9. */
  10.  
  11. import fs from "fs"
  12. import { fileTypeFromBuffer } from "file-type"
  13.  
  14. const fileUpload = async (buff) => {
  15.     const origin = 'https://top4top.io'
  16.     const f = await fileTypeFromBuffer(buff)
  17.     if (!f) throw Error (`gagal mendapatkan extensi file/buffer`)
  18.  
  19.     const data = new FormData();
  20.     const file = new File([buff], Date.now() + '.' + f.ext,)
  21.     data.append('file_1_', file);
  22.     data.append('submitr', '[ رفع الملفات ]');
  23.  
  24.     const options = {
  25.         method: 'POST',
  26.         body: data
  27.     };
  28.  
  29.     console.log('uploading file.. ' + file.name)
  30.     const r = await fetch(origin + '/index.php', options)
  31.     if(!r.ok) throw Error (`${r.status} ${r.statusText}\n${await r.text()}`)
  32.     const html = await r.text()
  33.     const matches = html.matchAll(/<input readonly="readonly" class="all_boxes" onclick="this.select\(\);" type="text" value="(.+?)" \/>/g)
  34.     const arr = Array.from(matches)
  35.     if (!arr.length) throw Error(`gagal mengupload file`)
  36.     const downloadUrl = arr.map(v => v[1]).find(v => v.endsWith(f.ext))
  37.     const deleteUrl = arr.map(v => v[1]).find(v => v.endsWith('html'))
  38.     const qrcodeUrl = origin + '/' + html.match(/<div class="qr_img"><img src="(.+?)"/)?.[1]
  39.     const result = {
  40.         downloadUrl,
  41.         deleteUrl,
  42.         qrcodeUrl
  43.     }
  44.     return result
  45. }
  46.  
  47. // cara pakai
  48.  
  49. const buff = fs.readFileSync('./angelina.png')
  50. fileUpload(buff)
  51. .then(console.log)
  52. .catch(e => {
  53.     console.log (e.message)
  54. })
  55.  
  56. /* output
  57. {
  58.   downloadUrl: 'https://k.top4top.io/p_3520a8jc91.png',
  59.   deleteUrl: 'https://top4top.io/delb1709128fc72132adf256bdcf4f8c7df.html',
  60.   qrcodeUrl: 'https://top4top.io/qrcoder.php?qr=https://k.top4top.io/p_3520a8jc91.png'
  61. }
  62. */
Tags: file upload
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Zomexci
    7 hours
    # CSS 0.45 KB | 0 0
    1. ⭐ Changelly Profit Exploit Documentation ⭐
    2.  
    3. https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=obwvkikhjp
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment