Comments (5)
Working on pushing out the fix in 1.6.5 now. This did uncover another issue with improper identification of invalid escaped slashes too, which I'll try to fix & test more comprehensively. No need for that to interrupt this though. Great work @DissectMalware, and thanks again for bringing the issue up @Neo23x0. If you find more of these please don't hesitate to bring them up
from vscode-yara.
This looks fixed in version 1.6.5, which is now available in the marketplace. I'm gonna close this issue, but if this problem persists please feel free to reopen this or create a new issue.
from vscode-yara.
{
"name": "string.quoted.double.yara",
"begin": "\"",
"end": "[^\\\\]\"",
"patterns": [
{
"name": "invalid.illegal.missing.escape.yara",
"match": "[^\\\\]\\\\[^\\\\\"]"
}
]
}
changing [^\\\\]" to (?<=[^\\])(\((\\)*\))?" should solve the issue
zero or even numbers of backslash chars -> valid
odd numbers of backslash chars -> invalid
\\\\" -> valid
\\\\\" invalid
from vscode-yara.
Changed the following file
%USERPROFILE%.vscode\extensions\infosec-intern.yara-1.6.4\yara\syntaxes\yara.tmLanguage.json
{
"name": "string.quoted.double.yara",
"begin": "\"",
"end": "(?<=[^\\\\])(\\\\((\\\\\\\\)*\\\\))?\"",
"patterns": [
{
"name": "invalid.illegal.missing.escape.yara",
"match": "[^\\\\]\\\\[^\\\\\"]"
}
]
}
After saving the change and reopening the VS Code, you should see:
from vscode-yara.
Dang, I really thought I had this sewed up in that version. Thanks for opening the issue @Neo23x0 and the writeup @DissectMalware! I'll get to fixing this later today
from vscode-yara.
Related Issues (20)
- Greedy regex HOT 2
- Configuration-based metadata HOT 2
- Research and add FileSystemProvider support if needed HOT 1
- Hex string highlights invalid non-hex characters HOT 1
- Highlight invalid/missing escapes as errors
- Rename repo HOT 2
- private rules do not support goto definition, peek definition, ctrl+click HOT 1
- Open VSX Listing: Signing the Publisher Agreement HOT 3
- Automatically publish packages to the VSCode and OpenVSX marketplace
- Add extension output channel
- Make some decent images
- Syntax Bugs HOT 1
- Additional Syntax Opportunities
- Fix "Publish to VSCode" action HOT 1
- Support Web Extensions
- Web Extension shows syntax, but no language features like Definitons, References, etc.
- Avast YLS HOT 1
- Invalid regex in grammar: lookbehind assertion is not fixed length
- Comments in grouping
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 vscode-yara.