Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
'use strict';
var q = require('qiao-file');
var test = function(){
var folderPath = './test/';
var filePath = './qiao-file.js'
// cp folder
q.cp(folderPath, './test1');
// cp file
q.cp(filePath, './1.js');
};
test();
'use strict';
var q = require('qiao-file');
var test = function(){
var oldPath = './test';
var newPath = './test1'
var res = q.mv(oldPath, newPath);
console.log(res);
};
test();
'use strict';
var q = require('qiao-file');
var test = function(){
var folderPath = 'd:/test1/';
var filePath = 'd:/test.png'
// rm folder
q.rm(folderPath);
// rm file
q.rm(filePath);
};
test();
'use strict';
var q = require('qiao-file');
var test = function(){
var foldersAndFiles = q.lsdir('z:/workspaces/qiao.plugin.coder/');
console.log(foldersAndFiles);
};
test();
'use strict';
var q = require('qiao-file');
var test = function(){
var fileTree = q.lstree('./', ['node_modules']);
console.log(JSON.stringify(fileTree));
};
test();
'use strict';
var q = require('qiao-file');
var test = function(){
var folder = 'd:/test1/test2/test3/test.js';
q.mkdir(folder);
};
test();
'use strict';
var q = require('qiao-file');
var test = function(){
var filePath = 'd:/test1/test2/test.js';
var s = q.extname(filePath);
console.log(s);
};
test();
'use strict';
var q = require('qiao-file');
var test = function(){
var filePath = './index.js';
var s = q.readFile(filePath);
console.log(s);
};
test();
'use strict';
// q
var q = require('qiao-file');
// run
async function test(){
var filePath = './rm.js';
q.readFileLineByLine(filePath, onLine, onClose);
}
test();
// on line
function onLine(line){
console.log(line);
}
// on close
function onClose(){
console.log('close');
}
'use strict';
// q
var q = require('qiao-file');
// run
async function test(){
var filePath = './rm.js';
var lines = await q.readFileLineByLineSync(filePath);
console.log(lines);
// clear
filePath = null;
lines = null;
}
test();
'use strict';
var q = require('qiao-file');
var test = function(){
var filePath = './1.js';
q.writeFile(filePath, '2');
};
test();
'use strict';
// q
var q = require('qiao-file');
// run
async function test(){
var filePath = './rm.js';
var destPath = '../dist/rm.js';
var lines = await q.readFileLineByLineSync(filePath);
q.writeFileFromLines(destPath, lines);
// clear
filePath = null;
destPath = null;
lines = null;
};
test();
'use strict';
var q = require('qiao-file');
var test = function(){
var fpath = 'z:/workspaces/qiao.plugin.coder/lib/qiao.plugin.coder.js';
var s = q.isExists(fpath);
console.log(s);
};
test();
FAQs
nodejs file tool
We found that qiao-file 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.