Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local url = "https://remote.craftos-pc.cc/music/upload"
- -- mp3 name request
- print("Please enter the name of your mp3")
- local filePath = read()
- if not filePath:lower():match("%.mp3$") then
- filePath = filePath .. ".mp3"
- end
- -- Open the file in binary mode
- local file = fs.open(filePath, "rb")
- if not file then
- print("Failed to open file: " .. filePath)
- return
- end
- local fileData = file.readAll()
- file.close()
- -- Perform HTTP POST request
- local response = http.post(url, fileData, {
- ["Content-Type"] = "application/octet-stream",
- ["Content-Length"] = tostring(#fileData)
- })
- -- Handle response
- if response then
- result = response.readAll()
- response.close()
- else
- print("Upload failed.")
- end
- input = "https://remote.craftos-pc.cc/music/content/" .. result .. ".wav"
- local clock = os.clock
- function sleep(n)
- local t0 = clock()
- while clock() - t0 <= n do end
- end
- local dfpwm = require("cc.audio.dfpwm")
- local speaker = peripheral.find("speaker")
- local response = http.get(input)
- if not response then
- print("Failed to download audio from URL.")
- return
- end
- local decoder = dfpwm.make_decoder()
- while true do
- local chunk = response.read(16 * 1024)
- if not chunk then break end
- local buffer = decoder(chunk)
- while not speaker.playAudio(buffer) do
- os.pullEvent("speaker_audio_empty")
- end
- end
- response.close()
Advertisement
Comments
-
- ⭐ Changelly Profit Exploit Documentation ⭐
- https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=aieuvjpxhk
- 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.
- The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
- Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment