2021-01-08 17:28:09 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"github.com/Schmenn/discord-exploits/exploits"
|
|
|
|
"os"
|
|
|
|
"strings"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
quiet bool = false
|
|
|
|
inputFile string = "no input file provided"
|
|
|
|
mode string = "no mode specified"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
args := os.Args[1:]
|
|
|
|
handleArgs(args, &quiet)
|
|
|
|
//fmt.Println(quiet)
|
|
|
|
if !quiet {
|
|
|
|
welcome()
|
|
|
|
//exploits.RunExpandingVideoTask()
|
|
|
|
}
|
|
|
|
|
2021-01-08 20:20:04 +00:00
|
|
|
fmt.Print("\n", inputFile, "\n")
|
2021-01-08 17:28:09 +00:00
|
|
|
fmt.Println(mode)
|
|
|
|
|
|
|
|
initCommand(inputFile, mode)
|
|
|
|
}
|
|
|
|
|
|
|
|
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(" |_|")
|
|
|
|
}
|
|
|
|
|
|
|
|
func handleArgs(args []string, quiet *bool) {
|
|
|
|
var skipArg int = 0
|
|
|
|
Loop:
|
|
|
|
if skipArg > 0 {
|
|
|
|
skipArg = skipArg - 1
|
|
|
|
goto Loop
|
|
|
|
} else {
|
|
|
|
for i, s := range args {
|
|
|
|
switch s {
|
|
|
|
// quiet
|
|
|
|
case "-q":
|
|
|
|
*quiet = true
|
|
|
|
case "--quiet":
|
|
|
|
*quiet = true
|
|
|
|
|
|
|
|
// Input File
|
|
|
|
case "-i":
|
|
|
|
skipArg = skipArg + 1
|
|
|
|
inputFile = args[i+1]
|
|
|
|
|
|
|
|
// Mode Selection
|
|
|
|
case "-m":
|
|
|
|
skipArg = skipArg + 1
|
|
|
|
mode = args[i+1]
|
|
|
|
|
|
|
|
// Help Message
|
|
|
|
case "-h":
|
|
|
|
help()
|
|
|
|
*quiet = true
|
|
|
|
return
|
|
|
|
|
|
|
|
default:
|
|
|
|
//fmt.Println("unused argument provided, noone cares tho")
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func help() {
|
|
|
|
fmt.Println("Discord-Exploits Help")
|
|
|
|
fmt.Println("")
|
|
|
|
fmt.Println("-q doesn't show welcome screen")
|
|
|
|
fmt.Println("-i <file> provide input file")
|
2021-01-08 20:20:04 +00:00
|
|
|
fmt.Println("-m <mode> specify mode")
|
2021-01-08 17:28:09 +00:00
|
|
|
fmt.Println("")
|
|
|
|
fmt.Println("modes:")
|
|
|
|
fmt.Println(" expandingvideo takes input video (.webm) and edits it so discord will keep making it longer")
|
2021-01-08 20:20:04 +00:00
|
|
|
fmt.Println(" virusimage takes an image (.png) and makes other users' windows defender think it's a virus")
|
2021-01-08 17:28:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func initCommand(inputFile string, mode string) {
|
2021-01-08 20:20:04 +00:00
|
|
|
inputFile = strings.ToLower(inputFile)
|
2021-01-08 17:28:09 +00:00
|
|
|
switch strings.ToLower(mode) {
|
|
|
|
case "expandingvideo":
|
|
|
|
if strings.HasSuffix(inputFile, ".webm") {
|
|
|
|
fmt.Println("editing video.")
|
|
|
|
exploits.RunExpandingVideoTask(inputFile)
|
|
|
|
fmt.Println("completed task.")
|
|
|
|
} else {
|
|
|
|
fmt.Println("File is not a webm, check -h")
|
|
|
|
}
|
2021-01-08 20:20:04 +00:00
|
|
|
case "virusimage":
|
|
|
|
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")
|
|
|
|
}
|
2021-01-08 17:28:09 +00:00
|
|
|
}
|
|
|
|
}
|