mirror of
https://github.com/OJ/gobuster.git
synced 2026-10-12 02:07:17 +00:00
warning
This commit is contained in:
@@ -35,6 +35,7 @@ All funds that are donated to this project will be donated to charity. A full lo
|
||||
- the version command now also shows some build variables for more info
|
||||
- switched to another pkcs12 library to support p12s generated with openssl3 that use SHA256 HMAC
|
||||
- comments in wordlists (strings starting with #) are no longer ignored
|
||||
- warn in vhost mode if the --append-domain switch might have been forgotten
|
||||
- allow to exclude status code in vhost mode
|
||||
|
||||
## 3.6
|
||||
|
||||
@@ -72,6 +72,8 @@ func messageWorker(g *libgobuster.Gobuster, wg *sync.WaitGroup) {
|
||||
g.Logger.Debug(msg.Message)
|
||||
case libgobuster.LevelError:
|
||||
g.Logger.Error(msg.Message)
|
||||
case libgobuster.LevelWarn:
|
||||
g.Logger.Warn(msg.Message)
|
||||
case libgobuster.LevelInfo:
|
||||
g.Logger.Info(msg.Message)
|
||||
default:
|
||||
|
||||
@@ -141,7 +141,7 @@ func (v *GobusterVhost) ProcessWord(ctx context.Context, word string, progress *
|
||||
v.once.Do(func() {
|
||||
if !strings.Contains(subdomain, ".") {
|
||||
progress.MessageChan <- libgobuster.Message{
|
||||
Level: libgobuster.LevelInfo,
|
||||
Level: libgobuster.LevelWarn,
|
||||
Message: fmt.Sprintf("the first subdomain to try does not contain a dot (%s). You might want to use the option to append the base domain otherwise the vhost will be tried as is", subdomain),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ type Logger struct {
|
||||
log *log.Logger
|
||||
errorLog *log.Logger
|
||||
debugLog *log.Logger
|
||||
warnLog *log.Logger
|
||||
infoLog *log.Logger
|
||||
debug bool
|
||||
}
|
||||
@@ -20,6 +21,7 @@ func NewLogger(debug bool) Logger {
|
||||
log: log.New(os.Stdout, "", 0),
|
||||
errorLog: log.New(os.Stderr, color.New(color.FgRed).Sprint("[ERROR] "), 0),
|
||||
debugLog: log.New(os.Stderr, color.New(color.FgBlue).Sprint("[DEBUG] "), 0),
|
||||
warnLog: log.New(os.Stderr, color.New(color.FgYellow).Sprint("[WARN] "), 0),
|
||||
infoLog: log.New(os.Stderr, color.New(color.FgCyan).Sprint("[INFO] "), 0),
|
||||
debug: debug,
|
||||
}
|
||||
@@ -39,6 +41,14 @@ func (l Logger) Debugf(format string, v ...any) {
|
||||
l.debugLog.Printf(format, v...)
|
||||
}
|
||||
|
||||
func (l Logger) Warn(v ...any) {
|
||||
l.warnLog.Print(v...)
|
||||
}
|
||||
|
||||
func (l Logger) Warnf(format string, v ...any) {
|
||||
l.warnLog.Printf(format, v...)
|
||||
}
|
||||
|
||||
func (l Logger) Info(v ...any) {
|
||||
l.infoLog.Print(v...)
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ type MessageLevel int
|
||||
const (
|
||||
LevelDebug MessageLevel = iota
|
||||
LevelInfo
|
||||
LevelWarn
|
||||
LevelError
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user