From 7535d433b3f11974daca3c193c989dc86adbc65d Mon Sep 17 00:00:00 2001 From: Marek Maskarinec <42782325+marekmaskarinec@users.noreply.github.com> Date: Tue, 11 May 2021 15:02:27 +0200 Subject: [PATCH] use filepath.Abs and filepath.FromSlash on input (#25) --- exploits.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/exploits.go b/exploits.go index 7028877..a167ac4 100644 --- a/exploits.go +++ b/exploits.go @@ -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":