| 1 | Description: Add an information about updates disabled. |
| 2 | Display the information that updates are disabled in Debian |
| 3 | when the user uses the command "bettercap -eval ..." |
| 4 | Author: Sophie Brun <[email protected]> |
| 5 | Origin: Kali Linux, https://gitlab.com/kalilinux/packages/bettercap/-/raw/b97175cfd96369ca42aa931ac08eba81444586f4/debian/patches/add-info-about-update.patch |
| 6 | Forwarded: not-needed |
| 7 | Reviewed-By: Francisco Vilmar Cardoso Ruviaro <[email protected]> |
| 8 | Last-Update: 2026-04-15 |
| 9 | |
| 10 | --- a/main.go |
| 11 | +++ b/main.go |
| 12 | @@ -63,6 +63,9 @@ func main() { |
| 13 | // line, therefore they need to be executed first otherwise |
| 14 | // modules might already be started. |
| 15 | for _, cmd := range session.ParseCommands(*sess.Options.Commands) { |
| 16 | + if strings.Contains(cmd, "update") { |
| 17 | + fmt.Printf("%s is disabled in Debian. Please use apt\n", cmd) |
| 18 | + } |
| 19 | if err = sess.Run(cmd); err != nil { |
| 20 | log.Error("error while running '%s': %s", tui.Bold(cmd), tui.Red(err.Error())) |
| 21 | } |