Giter Site home page Giter Site logo

stamusnetworks / suricata-language-server Goto Github PK

View Code? Open in Web Editor NEW
55.0 55.0 5.0 575 KB

Suricata Language Server is an implementation of the Language Server Protocol for Suricata signatures. It adds syntax check, hints and auto-completion to your preferred editor once it is configured.

License: GNU General Public License v3.0

Python 100.00%

suricata-language-server's People

Contributors

ozuriexv avatar regit avatar sonicold avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

suricata-language-server's Issues

Windows 10, VSCode, not enough values to unpack error in latest release with UNC path

Hi Eric,

Works great in Linux, however running into this error in Windows 10, VSCode below when using a UNC path (ie \server\share\rule.rules). From what I can tell, I think it's an issue with jsonrpc specifically (I can put in an issue over there if that makes sense to you).

I will put a PR in shortly to note this in the README.

Basically, any UNC paths get treated as file:///server/share/rule.rules.

The workaround is to use a mapped drive letter reference to open the file (or folder with rules in it). X:\Rules\rule.rules, instead of the UNC path. This works as expected.

Screenshot:
image

Traceback:
Traceback (most recent call last): File "C:\Python310\lib\site-packages\suricatals\langserver.py", line 99, in handle handler(request) File "C:\Python310\lib\site-packages\suricatals\langserver.py", line 322, in serve_onSave filepath = path_from_uri(uri) File "C:\Python310\lib\site-packages\suricatals\jsonrpc.py", line 24, in path_from_uri _, path = uri.split("file:///", 1) ValueError: not enough values to unpack (expected 2, got 1)

VSCode - Highlighting Problem

I have an installation of VS Code

Version: 1.87.2
Commit: 863d2581ecda6849923a2118d93a088b0745d9d6
Date: 2024-03-08T15:14:59.643Z
Electron: 27.3.2
ElectronBuildId: 26836302
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Linux x64 6.7.9-100.fc38.x86_64

Everything of Suricata completion and suggestions works except highlighting. It detects that the file is Suricata file. In other languages, highlighting it works just fine.

Do you know how I can fix it?
Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.