Skip to content

Commit

Permalink
fix: no time to read fatal error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jm33-m0 committed Feb 8, 2025
1 parent a7a04e7 commit b8ddd50
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/cmd/cc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func main() {
// including config file location
err := cc.InitC2()
if err != nil {
log.Fatalf("DirSetup: %v", err)
log.Fatalf("C2 directory setup: %v", err)
}

// set up logger
Expand Down
2 changes: 1 addition & 1 deletion core/lib/cc/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func CliMain() {
Emp3r0rConsole.SetPrintLogo(CliBanner)

// History
histFile := fmt.Sprintf("%s/%s.history", AppName, EmpWorkSpace)
histFile := fmt.Sprintf("%s/%s.history", EmpWorkSpace, AppName)
mainMenu.AddHistorySourceFile(AppName, histFile)

// Commands
Expand Down
2 changes: 2 additions & 0 deletions core/lib/cc/tmux.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"os/exec"
"strconv"
"strings"
"time"

"github.com/fatih/color"
"github.com/jm33-m0/emp3r0r/core/lib/util"
Expand Down Expand Up @@ -384,6 +385,7 @@ func TmuxDeinitWindows() {
return
}

time.Sleep(3 * time.Second)
// kill session altogether
out, err := exec.Command("/bin/sh", "-c", "tmux kill-session -t emp3r0r").CombinedOutput()
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions core/lib/logging/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ func (l *Logger) Success(format string, a ...interface{}) {
func (l *Logger) Fatal(format string, a ...interface{}) {
l.helper(format, a, color.New(color.FgHiRed, color.Bold, color.Italic), "ERROR", true)
l.Msg("Run 'tmux kill-session -t emp3r0r' to clean up dead emp3r0r windows")
time.Sleep(2 * time.Second) // give user some time to read the error message
log.Fatal(color.New(color.Bold, color.FgHiRed).Sprintf(format, a...))
}

Expand Down

0 comments on commit b8ddd50

Please sign in to comment.