Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCode support for bad chars #225

Open
lonix1 opened this issue Dec 9, 2021 · 7 comments
Open

VSCode support for bad chars #225

lonix1 opened this issue Dec 9, 2021 · 7 comments

Comments

@lonix1
Copy link

lonix1 commented Dec 9, 2021

VSCode now has built-in support for detecting "bad" characters.

Is this extension obsolete, or does it offer more features? I've been using it for a while and unsure whether to keep it or not?

@nhoizey
Copy link
Owner

nhoizey commented Dec 10, 2021

@lonix1 good catch,thanks! 👍

I guess this extension can still be useful, at least with some characters VSCode doesn't plan to highlight.

We have to define which characters should be removed from the extension.

@lonix1
Copy link
Author

lonix1 commented Dec 10, 2021

You're right - it would be good not to redo the work vscode already does, and handle only bad chars that vscode doesn't catch. But how would we even know how to detect that?

They say

All uncommon invisible characters in source code are now highlighted by default:
In addition, characters that can be confused with ASCII characters are also highlighted:

So it's not clear which chars they target.

@kaushalyap
Copy link

I am also interested in this

@TheSench
Copy link
Collaborator

TheSench commented Dec 11, 2021

There are some characters that this extension highlights by default that VSCode does not ( en dash, for instance). You can get VSCode to highlight those if you turn on editor.unicodeHighlight.nonBasicASCII though.

As far as features that this extension provides that VSCode does not, I can think of the following:

  1. Ability to display these characters in the Problems pane - currently, VSCode's built-in functionality will highlight them and display them in the gutter
  2. Ability to customize the list of highlighted characters (double-edged sword, as creating a custom list means you lose out on updates to the default list)
  3. Ability to adjust the severity of characters

Also, "Zap Gremlins" was on the roadmap, allowing for quick removal of special characters.

@lonix1
Copy link
Author

lonix1 commented Dec 11, 2021

@TheSench Thank you for the detailed overview. In fact in might be a good idea to add that list to the docs, because I'm sure many users will wonder about this now.

@AffluentOwl
Copy link

I want to use this extension to highlight certain characters I care about. Such as the letter "A", in certain situations where it isn't commonly invalid, just in the files / file formats I care about.

@villu164
Copy link

I just spent a lot of time trying to figure out, why one worked and the other didn't, just to find the old "en-dash vs hyphen" to be the gremlin.

nmap -p 139,445 -Pn -script smb-enum* 127.0.0.1
nmap -p 139,445 -Pn –script smb-enum* 127.0.0.1

It didn't blow up, it just didn't work 😫

True, the editor.unicodeHighlight.nonBasicASCII = true does highlight the en-dash, but then again, a lot of other things aswell, like

gremlin disabled and setting enabled
gremlin disabled and setting enabled

nothing enabled
nothing enabled

gremlin enabled and setting disabled
gremlin enabled and setting disabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants