File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package runner
33import (
44 "flag"
55 "os"
6+ "path/filepath"
67 "strings"
78
89 "github.com/projectdiscovery/gologger"
@@ -91,3 +92,11 @@ func (options *Options) configureOutput() {
9192 gologger .DefaultLogger .SetMaxLevel (levels .LevelSilent )
9293 }
9394}
95+
96+ func (o Options ) FolderAbsPath () string {
97+ abspath , err := filepath .Abs (o .Folder )
98+ if err != nil {
99+ return o .Folder
100+ }
101+ return abspath
102+ }
Original file line number Diff line number Diff line change @@ -72,11 +72,11 @@ func (r *Runner) Run() error {
7272 }
7373
7474 if r .options .HTTPS {
75- gologger .Print ().Msgf ("Serving %s on https://%s/... " , r .options .Folder , r .options .ListenAddress )
75+ gologger .Print ().Msgf ("Serving %s on https://%s/" , r .options .FolderAbsPath () , r .options .ListenAddress )
7676 return r .httpServer .ListenAndServeTLS ()
7777 }
7878
79- gologger .Print ().Msgf ("Serving %s on http://%s/... " , r .options .Folder , r .options .ListenAddress )
79+ gologger .Print ().Msgf ("Serving %s on http://%s/" , r .options .FolderAbsPath () , r .options .ListenAddress )
8080 return r .httpServer .ListenAndServe ()
8181}
8282
You can’t perform that action at this time.
0 commit comments