-
Notifications
You must be signed in to change notification settings - Fork 15
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
Wrong file type identification - Python as INI #213
Comments
I took a look at it and am impressed by that utf-8 trick.
I was thinking of adding Since we are also trusting libmagic's python detection, the (probably better) approach is to see if they could improve libmagic to detect that case too. If I'm right, this would be libmagic's bug tracker. I'll be glad to create a ticket for you, if you do not want to create an account. 🙂 In the meantime, you could apply those three steps to your own instance, but that would usually stop any new improvements that we make to our Identify from being updated to your instance. You would need to reset your changes and reapply them to get the latest changes. |
Hey, I think the best way would be to ask I think I saw some other code detected as
It's an old Python feature... which I haven't seen used besides malicious cases yet :D If you were interested, I wrote briefly about the package it comes from on a blog |
After a few more tests, it turns out that the utf-8 is well handled by libmagic. |
O, nice! Thanks for digging in, it may be than a little easier to fix |
Describe the bug
I've come across wrong identification of a Python code. It's identified as INI script, by both AL and the mimetype. My suspicious is that UTF chars used to evade static analyzers tricked the libmagic as well.
To Reproduce
Expected behavior
Identification should be set as
code/python
.Screenshots
As above.
Environment (please complete the following information if pertinent):
The text was updated successfully, but these errors were encountered: