mirror of
https://github.com/OJ/gobuster.git
synced 2026-10-12 02:07:17 +00:00
27 lines
507 B
Go
27 lines
507 B
Go
package libgobuster
|
|
|
|
import (
|
|
"fmt"
|
|
"runtime/debug"
|
|
)
|
|
|
|
const (
|
|
// VERSION contains the current gobuster version
|
|
VERSION = "3.7"
|
|
)
|
|
|
|
func GetVersion() string {
|
|
version := VERSION
|
|
if info, ok := debug.ReadBuildInfo(); ok {
|
|
for _, setting := range info.Settings {
|
|
if setting.Key == "vcs.revision" {
|
|
version = fmt.Sprintf("%s Revision %s", version, setting.Value)
|
|
}
|
|
if setting.Key == "vcs.time" {
|
|
version = fmt.Sprintf("%s from %s", version, setting.Value)
|
|
}
|
|
}
|
|
}
|
|
return version
|
|
}
|