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.
This is a library for creating progressive bots for Telegram. Based on the principle of MVS (Model, View, Service).
#TgAirBot
This is a library for creating progressive bots for Telegram. Based on the principle of MVS (Model, View, Service).
Uses TypeScript and in particular the extensive system of decorators.
####Work has just begun!!! ##Install
npm install tgairbot
##Install dependencies
npm i node-telegram-bot-api @types/node-telegram-bot-api
npm i @types/color colors
npm i dotenv
##Using
you project dir
|
+--dist (generated folder by typescript)
|
+--node_modules
|
+--src (folder for your bot)
| |
| |
| +--...folders module
| |
| +--you module folder
| | |
| | +-- *.module.ts (module file)
| | |
| | +-- *.view.ts (view file)
| | |
| | +-- *.service.ts (service file)
| |
| +--main.ts (input file)
|
+--.env
|
+--package.json
|
+--tsconfig.json
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
}
}
{
...,
"scripts": {
"start": "node ./dist/main.js",
"start:dev": "tsc && npm run start"
},
...,
"dependencies": {
"@types/color": "^3.0.1",
"@types/node-telegram-bot-api": "^0.50.2",
"colors": "^1.4.0",
"dotenv": "^8.2.0",
"node-telegram-bot-api": "^0.50.0"
}
}
At the root of the project you need an .env file with the submitted fields
TELEGRAM_TOKEN=you telegram bot token
import { Airbot } from 'tgairbot/airbot'
import { HelloModule } from "./hello/hello.module"
const bot = new Airbot({polling: true})
bot.Create(HelloModule)
import { Module } from "tgairbot/module/module"
import { HelloView } from "./hello.view"
@Module({
name: "HelloModule",
imports: [],
views: [HelloView],
services: []
})
export class HelloModule {
constructor(...args: any[]) {}
}
import { View } from 'tgairbot/view/view'
import { HelloService } from './hello.service'
@View({
name: "HelloView",
service: [HelloService]
})
export class HelloView {
constructor(private helloService: HelloService) {}
first_message() {
return this.helloService.first_message()
}
}
import { Service } from "tgairbot/service/service"
@Service({
name: "HelloService"
})
export class HelloService {
first_message() {
return console.log("Hello")
}
}
FAQs
This is a library for creating progressive bots for Telegram. Based on the principle of MVS (Model, View, Service).
The npm package tgairbot receives a total of 1 weekly downloads. As such, tgairbot popularity was classified as not popular.
We found that tgairbot 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.