func ParseOptions() *Options {
	options := &Options{}
	flag.StringVar(&options.ListenAddress, "listen", "0.0.0.0:8000", "Address:Port")
	flag.BoolVar(&options.EnableTCP, "tcp", false, "TCP Server")
	flag.BoolVar(&options.TCPWithTLS, "tls", false, "Enable TCP TLS")
	flag.StringVar(&options.RulesFile, "rules", "", "Rules yaml file")
	currentPath := "."
	if p, err := os.Getwd(); err == nil {
		currentPath = p
	}
	flag.StringVar(&options.Folder, "path", currentPath, "Folder")
	flag.BoolVar(&options.EnableUpload, "upload", false, "Enable upload via PUT")
	flag.BoolVar(&options.HTTPS, "https", false, "HTTPS")
	flag.StringVar(&options.TLSCertificate, "cert", "", "HTTPS Certificate")
	flag.StringVar(&options.TLSKey, "key", "", "HTTPS Certificate Key")
	flag.StringVar(&options.TLSDomain, "domain", "local.host", "Domain")
	flag.BoolVar(&options.Verbose, "verbose", false, "Verbose")
	flag.StringVar(&options.BasicAuth, "basic-auth", "", "Basic auth (username:password)")
	flag.StringVar(&options.Realm, "realm", "Please enter username and password", "Realm")
	flag.BoolVar(&options.Version, "version", false, "Show version of the software")
	flag.BoolVar(&options.Silent, "silent", false, "Show only results in the output")
	flag.BoolVar(&options.Sandbox, "sandbox", false, "Enable sandbox mode")
	flag.IntVar(&options.MaxFileSize, "max-file-size", 50, "Max Upload File Size")
	flag.Parse()
	options.configureOutput()
	showBanner()
	if options.Version {
		gologger.Info().Msgf("Current Version: %s\n", Version)
		os.Exit(0)
	}
	options.validateOptions()
	return options
}
ParseOptions parses the command line options for application
package runner
import (
	"flag"
	"os"
	"path/filepath"
	"strings"
	"github.com/projectdiscovery/gologger"
	"github.com/projectdiscovery/gologger/levels"
)
type Options struct {
	ListenAddress  string
	Folder         string
	BasicAuth      string
	username       string
	password       string
	Realm          string
	TLSCertificate string
	TLSKey         string
	TLSDomain      string
	HTTPS          bool
	Verbose        bool
	EnableUpload   bool
	EnableTCP      bool
	RulesFile      string
	TCPWithTLS     bool
	Version        bool
	Silent         bool
	Sandbox        bool
	MaxFileSize    int
}