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.
a website-crawler library for nodejs
Documentation of the library in a summarized and precise way.
const craw = require('craw');
async function start () {
const result = await craw("https://2lstudios.dev/");
console.log(result.toJSON());
}
start();
Get the content of the website as headers, paragraphs, paragraphs and all the text in general.
Output:
{
text: "....", // String
h1: [], // Array
h2: []. // Array
h3: [], // Array
h4: [], // Array
h5: [], // Array
h6: [], // Array
words: [] // Array
}
Get a list with iframes from the website.
Output:
[...] // Array
Get a list of imports from the website. (like css, favicon and js)
Output:
{
scripts: [ // Array
{
integrity: "...", // String
src: "...", // String
async: ... // Boolean
}
],
styles: [ // Array
{
integrity: "...", // String
href: "...", // String
rel: "..." // String
}
],
favicon: {
type: "...", // String
href: "..." // String
}
}
Get a list of hyperlinks from the website.
Output:
[ // Array
{
url: "...", // String
anchor: "...", // String
rel: [ ... ] // Array of Strings
}
]
Get a list of multimedia elements from the website. (Like images, audios and videos)
Output:
{
audios: [ // Array
{
src: "...", // String
type: "..." // String
}
],
images: [ // Array
{
src: "...", // String
alt: "...", // String
loading: "..." // String
}
],
videos: [ ... ] // Array of strings
}
Get a list of metadata tags from the website.
Output:
{
author: "...", // String
viewport: "...", // String
robots: "...", // String
description: "...", // String
keywords: [], // Array of strings
image: "...", // String (Favicon)
charset: "...", // String
... any other metadata tag like OG or Twitter ...
}
Get the title of the website.
Output:
"..." // String
Run all functions and add the results of each one in the same object.
FAQs
a website-crawler library for nodejs
The npm package craw receives a total of 2 weekly downloads. As such, craw popularity was classified as not popular.
We found that craw 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.