use filepath.Abs and filepath.FromSlash on input (#25)

pull/27/merge
Marek Maskarinec 2021-05-11 15:02:27 +02:00 committed by GitHub
parent 15ab2268a4
commit 7535d433b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

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":