mirror of
https://github.com/Schmenn/discord-exploits.git
synced 2024-12-22 20:15:41 +00:00
106 lines
2.3 KiB
Go
106 lines
2.3 KiB
Go
|
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()
|
||
|
}
|
||
|
|
||
|
fmt.Println(inputFile)
|
||
|
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")
|
||
|
fmt.Println("-m <mode> provide a mode")
|
||
|
fmt.Println("")
|
||
|
fmt.Println("modes:")
|
||
|
fmt.Println(" expandingvideo takes input video (.webm) and edits it so discord will keep making it longer")
|
||
|
fmt.Println(" virusimage takes an image (.png) and makes other users' windows defender think it's a virus (not yet implemented)")
|
||
|
}
|
||
|
|
||
|
func initCommand(inputFile string, mode string) {
|
||
|
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")
|
||
|
}
|
||
|
}
|
||
|
}
|