scapy

How to make scapy UI in color


How can I make scapy be colored, like this: https://upload.wikimedia.org/wikipedia/commons/1/1c/Windows_scapy_screenshot.png

When I am trying to edit the color theme with the following commad:

conf.color_theme = ColorOnBlackTheme()

It makes everything gibberish:

http://prntscr.com/ntcdq2

How can I fix it?


Solution

  • See https://scapy.readthedocs.io/en/latest/usage.html#customizing-the-terminal
    (archive.org version because the latest in 2024 is missing this section, but the information is still valid)

    Customizing the Terminal
    Before you actually start using Scapy, you may want to configure Scapy to properly render colors on your terminal. To do so, set conf.color_theme to one of of the following themes: DefaultTheme, BrightTheme, RastaTheme, ColorOnBlackTheme, BlackAndWhite, HTMLTheme, LatexTheme
    For instance: conf.color_theme = BrightTheme()
    Other parameters such as conf.prompt can also provide some customization. Note Scapy will update the shell automatically as soon as the conf values are changed.

    1- Make sure you're using the latest version (or try the github version)

    2- Make sure you have IPython Installed