Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
tty工具库,包含对数据的快速处理、数组操作等
npm i tty-utils --save
import tty from 'tty-utils'
tty.copyText()
tty.copyText('文本', () => {
alert('复制成功');
})
说明:复制文本
由于浏览器自身限制,必须在点击事件等回调中使用
@param text: string 文本内容
@param callback?: () => void 复制完成回调
tty.storage()
tty.storage('token', '4757aabce3633c316c6d6a4b0dd04648');
tty.storage('token')
说明:读写localstorage
传一个参数为获取,两个参数为写入
@param key: string 键名
@param value?: any 键值
tty.sessionStorage()
tty.sessionStorage('token', '4757aabce3633c316c6d6a4b0dd04648');
tty.sessionStorage('token')
说明:读写sessionstorage
传一个参数为获取,两个参数为写入
@param key: string 键名
@param value?: any 键值
tty.pick()
const form = { a:1, b:2, c:3 };
tty.pick(form, ['a:aa', 'b', 'c:ccc'])
返回值:{ aa:1, b:2, ccc:3 }
说明:提取或转换对象的键名
keyArr传入['a:aa', 'b:bb']表示把原始对象的a和b键名转换成aa,bb返回,不加冒号只提取不转换
@param obj: Object 原始对象数据
@param keyArr: string[] 需要提取或转换的key
FAQs
tty工具库,包含对数据的快速处理、数组操作等
We found that tty-utils 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.