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.
danger-coin-api
Advanced tools
Node.JS библиотека для взаимодействия с API Danger Coin
$ npm i danger-coin-api
const DangerCoin = require('danger-coin-api');
const api = new DangerCoin();
Узнаём информацию о юзере
(async () =>{
const result = await api.getUserInfo(268868084)
if(result.status != `OK`) return console.log(`Ошибка ${result.error.id} - ${result.error.msg}`)
console.log(result)
})()
268868084 - VK ID пользователя
На выходе вы должны получить результат формата:
{
status: 'OK',
id: 268868084,
name: 'Алексей',
balance: 1
}
Изменение названия магазина
(async () =>{
const result = await api.ReNameMerchant(1, "token", "NewName")
if(result.status != `OK`) return console.log(`Ошибка ${result.error.id} - ${result.error.msg}`)
console.log(result)
})()
1 - Merchant ID "token" - Merchant Token "NewName" - любое название для вашего магазина (до 16 символов)
На выходе вы должны получить результат формата:
{
status: 'OK',
event_result: {
newMerchantName: 'NewName'
}
}
Перевод (из магазина)
(async () =>{
const result = await api.CreateTransfer(1, "token", peerId, amount)
if(result.status != `OK`) return console.log(`Ошибка ${result.error.id} - ${result.error.msg}`)
console.log(result)
})()
1 - Merchant ID "token" - Merchant Token peerId - VK ID пользователя, которому совершается перевод amount - сумма перевода
На выходе вы должны получить результат формата:
{
status: 'OK',
event_result: {
newMerchantName: 'NewName'
}
}
Информация о магазине
(async () =>{
const result = await api.GetMerchantInfo(1, "token")
if(result.status != `OK`) return console.log(`Ошибка ${result.error.id} - ${result.error.msg}`)
console.log(result)
})()
1 - Merchant ID "token" - Merchant Token
На выходе вы должны получить результат формата:
{
status: 'OK',
event_result: {
id: 1,
name: "Магазин #1",
key: "token",
balance: 100,
owner: 268868084,
lastdepId: null,
lastdepAmount: null
}
}
В скором времени, в апи добавится еще больше функций :3
1.0.6 (Release)
FAQs
Апи для данжер койна :3
The npm package danger-coin-api receives a total of 0 weekly downloads. As such, danger-coin-api popularity was classified as not popular.
We found that danger-coin-api 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.