mirror of
https://github.com/Schmenn/discord-exploits.git
synced 2024-12-22 20:55:31 +00:00
a77abe5c32
a giant slice of bytes is never pretty
28 lines
537 B
Go
28 lines
537 B
Go
package exploits
|
|
|
|
import (
|
|
_ "embed" // embed
|
|
"fmt"
|
|
"github.com/Schmenn/discord-exploits/modules"
|
|
"os"
|
|
)
|
|
|
|
//go:embed twice.ogg
|
|
var twiceOgg []byte
|
|
|
|
// RunTwiceAudioTask edits audio file so it plays a different track when played again
|
|
func RunTwiceAudioTask(fileName string) {
|
|
data, err := os.ReadFile(fileName)
|
|
modules.Check(err)
|
|
|
|
twice := append(twiceOgg, data...)
|
|
|
|
name := modules.CreateName("ogg")
|
|
fmt.Println("Saved video to: " + name)
|
|
|
|
err = os.WriteFile(name, twice, os.FileMode(0777))
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|