Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
haproxy-pygments-lexer
Advanced tools
This package enables the latest HAProxy configuration syntax highlighting for python Pygments and is used as the basis for the HAProxy lexer on the Pygments project.
The lexer keywords are maintained and updated manually using information from the documentation of the HAProxy Community version and the HAProxy Enterprise version.
To add the lexer on your already existing pygments installation run:
python setup.py install
This will install the lexer on your local system and create a python package.
To verify that the lexer is working use the sample HAProxy configuration file.
# Output the result on your command line
pygmentize -l haproxy -x haproxy.cfg
# Output the result in an HTML file
pygmentize -O full -l haproxy -o haproxy.html haproxy.cfg
The main grammar rules and keywords are located under haproxylexer
.
_haproxy_builtins.py
contains lists of keywords.lexer.py
contains all the grammar regexesTo quickly test your changes you can run:
pygmentize -l ./haproxylexer/lexer.py:HAProxyLexer -x haproxy.cfg
Pull requests and patches will be checked out by the maintainer and merged. Try to keep your commit messages precise and to the point.
Many thanks for the lovely Python, PyPi, and Pygments documentation.
Also a shout out to Bojan Marcovic for his vscode-haproxy-syntax and Alexander Bulimov for his atom-language-haproxy. Both were a great starting resources and the work done here will be also now easier to port for editors like VS Code, Atom, Sublime, etc.
The author, has never actually taken the time to learn python...
He just hacked away at this. Please forgive him for any coding "faux passes" he might have done :)
FAQs
A Pygments Lexer for the HAProxy configuration syntax
We found that haproxy-pygments-lexer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.