![Malicious npm Package Typosquats react-login-page to Deploy Keylogger](https://cdn.sanity.io/images/cgdhsj6q/production/007b21d9cf9e03ae0bb3f577d1bd59b9d715645a-1024x1024.webp?w=400&fit=max&auto=format)
Research
Security News
Malicious npm Package Typosquats react-login-page to Deploy Keylogger
Socket researchers unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
edit-google-spreadsheet
Advanced tools
Readme
Currently, there are about 3 different node modules which allow you to read data off Google Spreadsheets, though none with a good write API. Enter edit-google-spreadsheet
. A simple API for reading and updating Google Spreadsheets.
Warning: There have been API changes since last release. See below.
npm install edit-google-spreadsheet
Create sheet:
var Spreadsheet = require('edit-google-spreadsheet');
Spreadsheet.create({
debug: true,
username: '...',
password: '...',
spreadsheetName: 'node-edit-spreadsheet',
worksheetName: 'Sheet1',
callback: sheetReady
});
Note: Using the options spreadsheetName
and worksheetName
will cause lookups for spreadsheetId
and worksheetId
. Use spreadsheetId
and worksheetId
for improved performance.
Update sheet:
function sheetReady(err, spreadsheet) {
if(err) throw err;
spreadsheet.add({ 3: { 5: "hello!" } });
spreadsheet.send(function(err) {
if(err) throw err;
console.log("Updated Cell at row 3, column 5 to 'hello!'");
});
}
Read sheet:
function sheetReady(err, spreadsheet) {
if(err) throw err;
spreadsheet.recieve(function(err, rows) {
if(err) throw err;
console.log("Found rows:", rows);
// Found rows: { '3': { '5': 'hello!' } }
});
}
Batch edit:
spreadsheet.add([[1,2,3],
[4,5,6]]);
Batch edit starting from row 5:
spreadsheet.add({
5: [[1,2,3],
[4,5,6]]
});
Batch edit starting from row 5, column 7:
spreadsheet.add({
5: {
7: [[1,2,3],
[4,5,6]]
}
});
Named cell references:
spreadsheet.add({
3: {
4: { name: "a", val: 42 },
5: { name: "b", val: 21 },
6: "={{ a }}+{{ b }}" //forumla adding row3,col4 with row3,col5 => '=D3+E3'
}
});
Note: cell a
and b
are looked up on send()
add( obj | array )
Add cells to the batch. See examples.
send( callback( err, result ) )
Sends off the batch of add()
ed cells. Clears all cells once complete.
recieve( callback( err , rows , info ) )
Recieves the entire spreadsheet. The rows
object returned is in the same object format as the cells you add()
, so add(rows)
will be valid. The info
object looks like { totalRows: 1, totalCells: 1, lastRow: 3, nextRow: 4 }
.
If true
, will display colourful console logs outputing current actions
Google account - Be careful about committing these to public repos
The spreadsheet you wish to edit. Either the Name or Id is required.
The worksheet you wish to edit. Either the Name or Id is required.
Function returning the authenticated Spreadsheet instance
info
object returned from get()
, one could always begin add()
ing at the nextRow
, thereby appending to the spreadsheet.Thanks to googleclientlogin
for easy Google API ClientLogin Tokens
FAQs
Unknown package
We found that edit-google-spreadsheet 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 researchers unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
Security News
The JavaScript community has launched the e18e initiative to improve ecosystem performance by cleaning up dependency trees, speeding up critical parts of the ecosystem, and documenting lighter alternatives to established tools.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.