mirror of
https://github.com/Schmenn/discord-exploits.git
synced 2024-12-22 15:05:28 +00:00
104 lines
2 KiB
Go
104 lines
2 KiB
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/Schmenn/discord-exploits/exploits"
|
|
"github.com/Schmenn/discord-exploits/modules"
|
|
"os"
|
|
"strings"
|
|
)
|
|
|
|
var (
|
|
quiet bool = false
|
|
inputFile string = "no input file provided"
|
|
mode string = "no mode specified"
|
|
//skipArg int = 0
|
|
)
|
|
|
|
func main() {
|
|
args := os.Args[1:]
|
|
handleArgs(args, &quiet)
|
|
//fmt.Println(quiet)
|
|
if !quiet {
|
|
modules.Welcome()
|
|
}
|
|
|
|
fmt.Println("input file: " + inputFile)
|
|
fmt.Println("mode: " + mode)
|
|
|
|
initCommand(inputFile, mode)
|
|
}
|
|
|
|
func handleArgs(args []string, quiet *bool) {
|
|
|
|
/*if skipArg > 0 {
|
|
skipArg = skipArg - 1
|
|
return
|
|
}*/
|
|
for i, s := range args {
|
|
switch s {
|
|
// quiet
|
|
case "-q", "--quiet":
|
|
*quiet = true
|
|
|
|
// Input File
|
|
case "-i":
|
|
//skipArg++
|
|
inputFile = args[i+1]
|
|
|
|
// Mode Selection
|
|
case "-m":
|
|
//skipArg++
|
|
mode = args[i+1]
|
|
|
|
// Help Message
|
|
case "-h":
|
|
modules.Help(os.Args[0])
|
|
*quiet = true
|
|
return
|
|
|
|
default:
|
|
break
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
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, 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")
|
|
}
|
|
}
|
|
}
|