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 simple CSV writer and parser
$ npm install csv-wp
const csvwp = require('csv-wp')
//Optional. These are default values
const options = {
encoding: 'UTF-8',
delimiter: ',' //',' or ';'
}
//Print entire .csv file
csvwp.printLines('example.csv', options)
//Returns an Array with all lines
let lines = csvwp.getLines('example.csv', options);
//Returns an Array with the 5th line
let line = csvwp.getSingleLine('example.csv', 5, options);
//Returns .csv header (line 0)
let header = csvwp.getHeader('example.csv', options);
//Returns an Array with a given collumn
let atr = csvwp.getAttribute('example.csv', 'CONTACT', options);
//Find rows by searching a (key,value) pair
let found = csvwp.find('example.csv', 'CONTACT', 'example@example.com', options);
//Append a row to a .csv file
const data = ['03/24/2020 08:26','Testing','example@example.com','+553298','Verified'];
csvwp.appendRow('example.csv', data, options);
//Write a row to a .csv file (Current data will be overwritten)
const data = ['03/24/2020 08:26','Testing','example@example.com','+553298','Verified'];
csvwp.writeRow('example.csv', data, options);
//Write an entire .csv file with header and body
const header = ['Date','Name','Email','Contact','Status'];
let data = [['24/03/2020 08:26','Name 1','test@test.com','+553298','Verified'],
['18/10/2019 11:43','Name 2','mail@mail.com','+553298','Pending']];
csvwp.writeCSV('example.csv', header, data, options);
FAQs
A CSV writer and parser
We found that csv-wp 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.