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.
@tikkhun/cli-core
Advanced tools
用于创建cli的简便工具
import { Command } from '../lib';
const cli = new Command({
// 版本
version: '1.1.1',
// 描述
description: 'hahaha',
// 默认选项
defaultOptions: {
n: 1,
s: '123',
b: true,
o: {
n: 1,
s: '123',
b: true,
},
},
// 排除选项
excludeOptions: ['o.b'],
// 选项类型
optionTypes: {
n: 'number',
s: 'string',
b: 'boolean',
o: {
n: 'number',
s: 'string',
b: 'boolean',
},
},
// 选项标题
optionTitles: {
n: 'numbertitle',
s: 'stringtitle',
b: 'booleantitle',
o: {
n: 'numbertitleooo',
s: 'stringtitleooo',
b: 'booleantitleooo',
},
},
});
// 开始运行
cli.start((option) => {
// 取出选项并执行相应逻辑
console.log(`option`, option);
});
获取参数的形式有多种形式
你可以通过new Cli的 option 中的types 去决定启用哪几种功能形式
xxx-cli --help # 可查看全部命令行参数
xxx-cli prompts # 即可进入问答列表
xxx-cli config init -p xxx.config.json # 生成配置文件到本地
xxx-cli config -c xxx.config.json # 将 xxx.config.json 作为配置文件将配置导入
FAQs
用于创建cli的简便工具
We found that @tikkhun/cli-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.