Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
LibXML bindings for node.js
var libxmljs = require("libxmljs");
var xml = '<?xml version="1.0" encoding="UTF-8"?>' +
'<root>' +
'<child foo="bar">' +
'<grandchild baz="fizbuzz">grandchild content</grandchild>' +
'</child>' +
'<sibling>with content!</sibling>' +
'</root>';
var xmlDoc = libxmljs.parseXml(xml);
// xpath queries
var gchild = xmlDoc.get('//grandchild');
console.log(gchild.text()); // prints "grandchild content"
var children = xmlDoc.root().childNodes();
var child = children[0];
console.log(child.attr('foo').value()); // prints "bar"
CDATA Example:
var libxml = require('libxmljs');
var doc = libxml.Document();
var elem = doc.node('name1');
var newChild = libxml.Element(doc, 'new-child');
elem.addChild(newChild);
var child1 = elem.node('child1');
var child2 = elem.node('child2', 'second');
var newChild = libxml.Element(doc, 'new-child');
var name2 = elem.node('name2');
name2.addChild(newChild);
child2.cdata('<h1>cdata test</h1>').cdata('<p>It\'s worked</p>').cdata('<hr/>All done');
console.log('Document with CDATA: %s', doc.toString());
Check out the wiki http://github.com/polotek/libxmljs/wiki
You will need have the libxml2 library installed and also the libxml2-devel (libxml2-dev on debian systems)
package. This comes with the xml2-config
utility that is needed for
compiling. This command must be in your path.
npm
npm install libxmljs
source
To build with node waf:
node-gyp configure
node-gyp build
Alternatively, run make
.
tests
npm test
FAQs
libxml bindings for v8 javascript engine
The npm package libxmljs receives a total of 39,199 weekly downloads. As such, libxmljs popularity was classified as popular.
We found that libxmljs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.