wolfyflutter

goqr.me [qr] [reader] [maker]

Jul 10th, 2025 (edited)
242
0
Never
9
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 2.90 KB | Source Code | 0 0
  1. /*
  2.   nama   : qr
  3.   fungsi : buat generate qr, baca qr dari file/buffer
  4.   base   : https://goqr.me/
  5.   update : 10 Juli 2025
  6.   node   : v24.2.0
  7.   by     : wolep
  8.   note   : bukan skrep.. kalian bisa baca dokumentasinya di
  9.            https://goqr.me/api/doc/
  10.            funtsi readFromUrl nya error. gtw gw,
  11.            gw coba dari example nya jg error.
  12.            sisanya worek as expected
  13.            support dev base nyah :
  14.            https://buy-me-a.coffee/paypal/coffee-donation-goQR.me/
  15.  
  16. */
  17.  
  18.  
  19. qr = {
  20.   readFromBuffer: async (imageBuffer) => {
  21.     if (!Buffer.isBuffer(imageBuffer)) throw Error(`invalid buffer input`)
  22.     const file = new File([imageBuffer], "file", { type: "file" })
  23.  
  24.     const body = new FormData()
  25.     body.append("file", file)
  26.  
  27.     const headers = {
  28.       ...body.headers
  29.     }
  30.  
  31.     const response = await fetch("http://api.qrserver.com/v1/read-qr-code/", {
  32.       body,
  33.       headers,
  34.       method: "post"
  35.     })
  36.  
  37.     if (!response.ok) throw Error(`${response.statusText} ${response.status}\n${await response.text()}`)
  38.  
  39.     const json = await response.json()
  40.     const data = json?.[0]?.symbol?.[0]?.data
  41.     if (!data) throw Error(`request ok tapi hasil agak anomali. nih jsonnya\n${JSON.stringify(json, null, 2)}`)
  42.     return data
  43.   },
  44.   readFromUrl: async (url) => {
  45.     let imageUrl = url
  46.     try {
  47.       imageUrl = new URL(url).toString()
  48.     } catch (e) {
  49.       throw Error(`miaw... url is invalid or url cannot be empty`)
  50.     }
  51.  
  52.     const response = await fetch(`https://api.qrserver.com/v1/read-qr-code/?fileurl=${encodeURIComponent(imageUrl)}`)
  53.     if (!response.ok) throw Error(`${response.statusText} ${response.status}\n${await response.text()}`)
  54.  
  55.     const json = await response.json()
  56.     const data = json?.[0]?.symbol?.[0]?.data
  57.     if (!data) throw Error(`request ok tapi hasil agak anomali. nih jsonnya\n${JSON.stringify(json, null, 2)}`)
  58.     return data
  59.  
  60.   },
  61.   create: async (text) => {
  62.     if (typeof (text) !== "string" || text?.length === 0) throw Error(`input text is invalid string or cannot be empty`)
  63.     const response = await fetch(`http://api.qrserver.com/v1/create-qr-code/?data=${encodeURIComponent(text)}&size=1000x1000&margin=50&qzone=1`)
  64.     const arrayBuffer = await response.arrayBuffer()
  65.     const buffer = Buffer.from(arrayBuffer)
  66.     return buffer
  67.   }
  68. }
  69.  
  70. // cara pakai (fungsi create)
  71.  
  72. /*
  73. const fs = require("fs")
  74. const outputPath = "./qr-result.png"
  75. qr.create("hai semuanya ini wolep")
  76.   .then(buff => {
  77.     fs.writeFileSync(outputPath, buff)
  78.     console.log(`qr berhasil di buat. lihat di ${outputPath}`)
  79.   })
  80.   .catch(e => console.log(e.message))
  81.  
  82. output : 1 file qr
  83. */
  84.  
  85.  
  86. // cara pakai (fungsi readFromBuffer)
  87.  
  88. /*
  89. const fs = require("fs")
  90. const yourQrBuff = fs.readFileSync("./qr.png")
  91. qr.readFromBuffer(yourQrBuff)
  92. .then(console.log)
  93. .catch(err => console.log(err.message))
  94.  
  95. output : "hai aku wolep"
  96. */
  97.  
  98.  
  99.  
  100.  
Tags: qr Reader maker
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Aphexav
    15 days
    # CSS 0.44 KB | 0 0
    1. Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1Cz5fHkwyaApTWwqfgBBtpvConU8Lo_qJ9xtn7RazWpk/edit?usp=sharing
    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
  • Geregid
    9 hours
    # CSS 0.45 KB | 0 0
    1. ⭐ Changelly Profit Exploit Documentation ⭐
    2.  
    3. https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=ohhbpnqzzi
    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