new: new -version command line argument to print version, build information and exit

This commit is contained in:
evilsocket 2019-03-09 16:22:35 +01:00
commit 027f4a3ccc
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
3 changed files with 16 additions and 2 deletions

View file

@ -173,6 +173,10 @@ func (s *Session) Module(name string) (err error, mod Module) {
}
func (s *Session) Close() {
if *s.Options.PrintVersion {
return
}
if *s.Options.Debug {
fmt.Printf("\nStopping modules and cleaning session state ...\n")
s.Events.Add("session.closing", nil)