Skip to content

Commit

Permalink
added flags
Browse files Browse the repository at this point in the history
  • Loading branch information
pry0cc committed Mar 15, 2022
1 parent d68c519 commit cc34da0
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
package main

import (
"flag"
"fmt"
"github.com/n0ncetonic/nmapxml"
"os"
)

func main() {
input := os.Args[1]
var inputArg = flag.String("x", "", "Nmap XML Input File (Required)")
var dnsxArg = flag.String("dnsx", "", "dnsx -resp output data (TODO)")
flag.Parse()

input := *inputArg
dnsx := *dnsxArg

if input == "" {
flag.PrintDefaults()
os.Exit(1)
}

if dnsx != "" {
if _, err := os.Stat(dnsx); err != nil {
fmt.Printf("dnsx file does not exist\n")
}
}

if _, err := os.Stat(input); err != nil {
fmt.Printf("File does not exist\n")
}

scanData, _ := nmapxml.Readfile(input)
ParseNmap(scanData)
}
Expand Down

0 comments on commit cc34da0

Please sign in to comment.