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.
tawakkalna-api
Advanced tools
npm package that facilitate calls to TWK APIs and wrap the additional security configurations
npm install tawakkalna-api
import TawakkalnaApi from "twk-ts";
let result: Record<string, any> = {};
TawakkalnaApi.requestUserFullName()
.requestUserBloodType()
.sendAll()
.then((values) => {
for (const value of values) {
if ("data" in value) {
const json = JSON.parse(value.data as string);
if (Array.isArray(json)) {
//handle gallery image or video
Object.assign(result, json[0]);
} else if (json.mime_type)
//handle raw data
console.log(json.data);
else {
Object.assign(result, json); //handle user full name, blood type,...etc
}
}
}
console.log(result); //{full_name:"الإسم الكامل","blood_type:":1}
})
.catch((error) => alert(error));
The TawakkalnaApi
is a wrapper around an HTTP client, providing a chainable methods to make API calls (requests) and handle responses.
requestUserFullName()
and requestUserBloodType()
are chained methods for adding Tawakkalna’s endpoints to pending requests list.
sendAll()
Triggers all pending requests sequentially
then
block is executed after all requests are completed.for (const value of values)
It iterates over the array of responses values
.Remark Each response object contains a data property if the request was successful.
FAQs
npm package that facilitate calls to TWK APIs and wrap the additional security configurations
The npm package tawakkalna-api receives a total of 115 weekly downloads. As such, tawakkalna-api popularity was classified as not popular.
We found that tawakkalna-api 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’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.