Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow Unicode output from NSE scripts #1415
Recently, I'm using
It seems, however, nmap incorrectly return the
After adding the command
Nmap tries to sanitize text output to prevent terminal control characters, homoglyph attacks, or decoding errors ("mojibake") in the terminal. The script receives raw bytes from the network; in order to display these correctly, it would have to detect the correct encoding, decode to Unicode code points, then re-encode to the appropriate encoding for the terminal.
This is something we'd like to do better, but it will probably require including a portable (cross-platform) Unicode library.
Thanks for reply~
Sorry to say I didn't catch your meaning quite much
In my test of
I personally don't think this has any business with "terminal control characters, homoglyph attacks, or decoding errors" since printing results to terminal is such a simple and easy work and we'd better not make it too complex(like converting to hex format if it's UTF-8?).
BTW, does your reply suggest that currently it's not possible to solve this problem?
I don't know much about
But in 2018, I expect any program to have a good consistency with UTF-8 encoded string
When one of the most active Nmap devs tells you your issue is hard to solve, and takes the time to explain you why, in details, you should probably try to understand what he says before giving your "personal" opinion on the matter. Especially when you have no idea what you are talking about.
In 2018, I expect open-source software users to have a good behavior toward open-source developers.
Anyway, I also understand coming to publish complaints without knowing much about
That's why I would close this issue since it seems not useful at all for the develop
But with a version of
Hopes you can find a way to solve this problem and I will probably go to find some personal workarounds like re-parsing the
@bkkgbkjb I really do appreciate the ideas, though. I tend to be too conservative: if it's not broken, don't fix it. But this is something that could be really useful, and I know @rewanth1997 has been looking into other Unicode-related interfaces in Nmap.
You should check the XML output from the script (
@p-l- Thanks for the defense, but we can handle some criticism. It may not have been worded in the most diplomatic manner, but there's some valid ideas here that are worth considering.
Thanks for your kind reply
I apologize for any offensive in my previous reply.
Anyway, I did a quick test
I agree there should be escape in