mirror of
https://github.com/Schmenn/discord-exploits.git
synced 2024-12-22 20:05:34 +00:00
use filepath.Abs and filepath.FromSlash on input (#25)
This commit is contained in:
parent
15ab2268a4
commit
7535d433b3
|
@ -6,6 +6,7 @@ import (
|
||||||
"github.com/Schmenn/discord-exploits/modules"
|
"github.com/Schmenn/discord-exploits/modules"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
"path/filepath"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -39,7 +40,11 @@ func handleArgs(args []string, quiet *bool) {
|
||||||
|
|
||||||
// Input File
|
// Input File
|
||||||
case "-i":
|
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
|
// Mode Selection
|
||||||
case "-m":
|
case "-m":
|
||||||
|
|
Loading…
Reference in a new issue