Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
htmltemplate-parser
Advanced tools
HTML::Template-like templating language parser, that can parse a pragmatic subset of HTML/TMPL tag combinations (see #1) and Perl expressions.
npm install htmltemplate-parser
$ htmltemplate-parser --help
Usage: htmltemplate-parser [options]
Options:
--path file to parse [string] [required]
--pretty output with colors [boolean]
--ignore-html treat HTML tags as text [boolean]
parse(string, options)
methodParse the supplied template string and return the corresponding AST. Available options:
ignoreHTMLTags
, (default false
) – do not attempt to parse HTML tags, treat them as text,reducePositionLookups
, (default false
) – do not calculate line, column and offset for most nodes,
this would speedup parsing of large files.var fs = require('fs');
var inspect = require('util').inspect;
var parser = require('htmltemplate-parser');
var tmpl = fs.readFileSync('./example.inc', 'utf8');
var ast = parser.parse(tmpl);
console.log(inspect(ast, { colors: true, depth: Infinity }));
FAQs
HTML::Template Parser
The npm package htmltemplate-parser receives a total of 4,399 weekly downloads. As such, htmltemplate-parser popularity was classified as popular.
We found that htmltemplate-parser demonstrated a not healthy version release cadence and project activity because the last version was released 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.