Ticket #118 (closed defect: invalid)

Opened 1 month ago

Last modified 2 weeks ago

Scapy-win: raw ANSI escape sequences instead of colored output

Reported by: hk36@bezeqint.net Assigned to: pbi
Priority: major Milestone:
Component: scapy Version:
Keywords: Cc:

Description

when i run scay i get this promt: ☺←[32m←[1m☻>>> ☺←[0m☻

and no matter what modeule i use i keep seeing these symbols. for example:

☺←[32m←[1m☻>>> ☺←[0m☻IP() ←[0m<←[0m←[33m←[1mIP←[0m ←[0m|←[0m←[0m>←[0m ☺←[32m←[1m☻>>> ☺←[0m☻ the version is: (1.2.0.2-win)

Attachments

Change History

(in reply to: ↑ description ) 07/16/08 18:07:05 changed by lobo@c3a.de

Replying to hk36@bezeqint.net:

when i run scay i get this promt: ...

Hi,

there is to less information in your to ticket to troubleshoot your problem. 1.) On which OS (Debian Linux, OS X, Windows, ...) are you running scapy? 2.) Scapy version? 3.) http://www.secdev.org/projects/scapy/portability.html Do you have all required software packages installed?

You can try to disable the color theme as workaround until the real problem is found, maybe that helps.

conf.color_theme=NoTheme?()

best regards,

jochen

(follow-up: ↓ 3 ) 07/16/08 20:48:43 changed by Dirk Loss

The original poster said his version is 1.2.0.2-win, so he most definitely has got a problem with Scapy on Windows. ANSI color support on Windows is an ugly hack (by me) that works most of the time but has some bugs (see ticket #98 for example) :-(. I don't have access to a Windows machine at the moment, so it's quite hard for me to help you debugging. Are you calling scapy.py from another script? What version of Python are you using?

As a workaround I suggest using BasicTheme. This is a special Scapy-win color theme that works better with nsummary() than NoTheme (see [1]).

I guess the easiest way to permanently change the color theme is to open scapy.py with a text editor and replace line 14418

color_theme = ColorOnBlackTheme()

with

color_theme = BasicTheme()

[1] http://hg.secdev.org/scapy-win/rev/4212949af3c4

(in reply to: ↑ 2 ) 07/16/08 22:05:37 changed by anonymous

Replying to Dirk Loss:

The original poster said his version is 1.2.0.2-win, so he most definitely has got a problem with Scapy on Windows.

I should open my eyes before posting ;-) I have the latest mercurial version of scapy-win running here on a Windows XP (SP3) machine with all the stuff installed mentioned in the WindowsInstallationGuide. But I can't reproduce the problem. The colors work very well.

07/16/08 23:03:56 changed by Dirk Loss

  • summary changed from problem with text output to Scapy-win: raw ANSI escape sequences instead of colored output.

Hi Jochen, nice to hear that the ANSI colors work for you.

On the other hand, it would be helpful of course if someone could reproduce the problem. Hm.

08/15/08 15:40:27 changed by pbi

  • status changed from new to closed.
  • resolution set to invalid.

The problem comes from the terminal which does not interpret ansi sequences. 2 solutions : change your terminal or use a color theme without ansi sequences (i.e. without colors): conf.color_theme=NoTheme()


Add/Change #118 (Scapy-win: raw ANSI escape sequences instead of colored output)




Change Properties
Action