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.
nodejs-tg-bot-api
Advanced tools
Nodejs tools for using Telegram Bot Api with only one peer dependency (axios)
npm i nodejs-tg-bot-api
import { TelegramApi, Button, Md } from "nodejs-tg-bot-api";
const api = new TelegramApi('YOUR_TELEGRAM_BOT_TOKEN');
(async function main() {
try {
const botInfo = await api.getMe();
const allUpdates = await api.getUpdates();
const lastUpdate = await api.getLastUpdate(); // same as getUpdates({ limit: 1, offset: -1 })
if (!lastUpdate) {
console.log('Have not updates...');
return process.exit(1);
}
await api.sendMessage({
chat_id: TelegramApi.getSenderChatId(lastUpdate),
text: Md.lines(
Md.bold('Bold text'),
Md.url('https://ya.ru', 'Some text link'),
Md.url('https://google.com'), // link without text
Md.spacer(3), // just empty lines
Md.spoiler('Danger spoiler'), // hidden message
),
});
await api.sendMessage({
chat_id: TelegramApi.getSenderChatId(lastUpdate),
text: 'Some text with buttons',
reply_markup: {
inline_keyboard: [
[ Button.withCallback('Some button with callback data', { test: 123 }) ], // Buttons row
],
keyboard: [
[ Button.contact('🤙🏻 Send Contact'), Button.justText('Text button'), Button.justText('2') ], // Buttons row
[ Button.location('Location button') ], // Buttons row
]
}
});
} catch (error) {
console.error('Some error', error);
}
})();
FAQs
Nodejs tools for using Telegram Bot Api with only one peer dependency (axios)
The npm package nodejs-tg-bot-api receives a total of 1 weekly downloads. As such, nodejs-tg-bot-api popularity was classified as not popular.
We found that nodejs-tg-bot-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.