Comments (10)
Yes I have the same problem. Frankly I don't know how to fix it tho.
from viper.
I think I found a solution. The bug is documented here: http://bugs.python.org/issue17337
There is a link to a possible fix: https://stackoverflow.com/questions/9468435/look-how-to-fix-column-calculation-in-python-readline-if-use-color-prompt
So, if in viper/common/colors.py the color is returned as:
return "\x01\x1b[%dm\x02%s\x01\x1b[0m\x02" % (color_code, text)
The linebreaking works. Unfortunately, if you output colors that way without using readline, it will print bogus chars. My quick and dirty fix was to add a default argument escape=False
to the color functions and set this only to true when building the prompt. Its not really beautiful. Surely you can think of something better ;)
from viper.
Just changing the return line works for me. didnt set escape= anywhere. and have yet to see bogus chars.
Ubuntu 14.04 x64 server via putty0.63
Although Scrolling through the history now removes the prompt
from viper.
Please let me know which one is the best solution you guys encounter so that we can fix it.
If we need to tradeoff between things, we might even decide to get rid of the colors in the prompt (although that would be sad).
from viper.
Maybe the broken output happens only with zsh. I will test this and provide screenshots when I get around to it. Might take some days, though.
from viper.
No, happens with bash as well.
from viper.
Indeed it does.
Bogus chars with zsh:
And with bash:
My system is an up-to-data Arch Linux with Openbox. I also tested multiple terminal emulators, all have the same problem.
Note that there seem to be no problems with the conditional solution I proposed above, other than that it might not be the most elegant one.
from viper.
if it works commit :)
from viper.
I created a pull request: #129
It's my first, so bear with me if I did something wrong ;)
from viper.
think this can be closed now
from viper.
Related Issues (20)
- update-modules fails when behind a http proxy HOT 1
- viper template improvement request - search_result.html HOT 1
- viper note - need to add created_at and format with <xmp> tag. HOT 1
- authtoken HOT 1
- Module pydns moved to py3dns for Python 3 HOT 3
- Can't found MISP command in the Viper Framework HOT 8
- pydeep on macOS
- Enable users to change their password HOT 5
- can't find viper-web anymore HOT 6
- update-modules fails
- Viper requires old version of asn1crypto, which breaks pip on macOS Catalina HOT 2
- Submit File to Cuckoo through CLI or GUI Not working HOT 2
- Website viper.li returning HTTP status 403 HOT 5
- ERROR: django.template.exceptions.TemplateSyntaxError: 'staticfiles' is not a registered tag library. Must be one of: HOT 1
- using apikey to access cuckoo from viper-web HOT 1
- Unable to launch Viper HOT 4
- How can be new modules such as CAPA(by fireEye) can be added to viper? HOT 1
- "misp tag -l" -> NameError: name 'Taxonomies' is not defined HOT 2
- IndexError when outputting Base64 strings to a table
- Further maintenance of Viper HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from viper.