use filepath.Abs and filepath.FromSlash on input

This commit is contained in:
Marek Maskarinec 2021-05-10 08:50:28 +02:00
parent 15ab2268a4
commit ae796f37d4

View file

@ -6,6 +6,7 @@ import (
"github.com/Schmenn/discord-exploits/modules"
"os"
"strings"
"path/filepath"
)
var (
@ -39,7 +40,11 @@ func handleArgs(args []string, quiet *bool) {
// Input File
case "-i":
inputFile = args[i+1]
absPath, err := filepath.Abs(args[i+1])
if err != nil {
absPath = args[i+1]
}
inputFile = filepath.FromSlash(absPath)
// Mode Selection
case "-m":