go lint fix

This commit is contained in:
Mzack9999 2020-11-16 20:15:43 +01:00
parent c9ef0a7afc
commit 18c88a46ce
3 changed files with 8 additions and 4 deletions

View File

@ -9,11 +9,11 @@ func main() {
// Parse the command line flags and read config files
options := runner.ParseOptions()
runner, err := runner.New(options)
run, err := runner.New(options)
if err != nil {
gologger.Fatalf("Could not create runner: %s\n", err)
}
runner.RunEnumeration()
runner.Close()
run.RunEnumeration()
run.Close()
}

View File

@ -1,10 +1,11 @@
package customport
import (
"github.com/projectdiscovery/gologger"
"strconv"
"strings"
"github.com/projectdiscovery/gologger"
"github.com/projectdiscovery/httpx/common/httpx"
)

View File

@ -13,6 +13,7 @@ import (
"time"
"github.com/logrusorgru/aurora"
// automatic fd max increase if running as root
_ "github.com/projectdiscovery/fdmax/autofdmax"
"github.com/projectdiscovery/gologger"
customport "github.com/projectdiscovery/httpx/common/customports"
@ -154,10 +155,12 @@ func New(options *Options) (*Runner, error) {
return runner, nil
}
// Close runner instance
func (runner *Runner) Close() {
runner.hp.Dialer.Close()
}
// RunEnumeration on targets
func (runner *Runner) RunEnumeration() {
// Try to create output folder if it doesnt exist
if runner.options.StoreResponse && !fileutil.FolderExists(runner.options.StoreResponseDir) {