Skip to content

kOaDT/cyber-bot

Repository files navigation

πŸ€– Cyber Bot

Logo

Node.js Telegram Mistral AI GitHub

πŸ“– About

Cyber Bot is an Node.js project that helps users enhance their cybersecurity skills through automated Telegram messages. The bot runs on a VPS (OVH) and leverages Mistral AI to generate cybersecurity-related content.

🌐 Join Our Community

⚑ Features

🎯 Daily TryHackMe Reminders

npm run cron -- -c sendTHM

🎯 TryHackMe Challenges

npm run cron -- -c sendTHMCTF

πŸ“š AI-Enhanced Study Notes

Sends curated notes from a GitHub repository, enhanced by Mistral AI

npm run cron -- -c sendGithubNotes

πŸ“° Cybersecurity News Digest

Aggregates and summarizes news from our curated RSS feed

npm run cron -- -c sendNewsResume

πŸ” CVE Updates

Fetches and analyzes the latest CVE (Common Vulnerabilities and Exposures) entries

npm run cron -- -c sendCve

Using https://nvd.nist.gov/developers/vulnerabilities

πŸŽ™οΈ Darknet Diaries Podcast Summaries

Provides summaries of the latest Darknet Diaries podcast episodes

npm run cron -- -c sendDarknetDiariesResume

πŸŽ™οΈ Snyk Podcast Summaries

Provides summaries of the latest Snyk podcast episodes

npm run cron -- -c sendSnykResume

πŸŽ™οΈ Security Now Podcast Summaries

Provides summaries of the latest Security Now podcast episodes

npm run cron -- -c sendSecurityNowResume

πŸŽ™οΈ The Cyber Show Podcast Summaries

Provides summaries of the latest The Cyber Show podcast episodes

npm run cron -- -c sendCyberShowResume

πŸ’¬ Reddit Content

Fetches and summarizes posts from specified cybersecurity subreddit

npm run cron -- -c sendRedditPost

🎬 YouTube Content

Summarizes the latest videos from specified channels

npm run cron -- -c sendYoutubeResume -y https://www.youtube.com/[channel-name]

Curated Shorts

Shares relevant short-form videos based on customizable parameters (search period, queries, and blacklisted terms). Configure settings in the sendShort.js script.

npm run cron -- -c sendShort

πŸš€ Getting Started

Prerequisites

  • πŸ“¦ Node.js
  • πŸ€– Telegram Bot Token (BotFather)
  • 🧠 Mistral AI API Key (Register)
  • πŸ’» VPS (recommended)

Installation

  1. Clone and Initialize
git clone git@github.com:kOaDT/cyber-bot.git
cd cyber-bot

# Create tracking files
mkdir -p assets
touch assets/processedNotes.json       # GithubNotes tracking
touch assets/processedArticles.json    # News tracking
touch assets/processedShorts.json      # Shorts tracking
touch assets/processedDD.json          # Darknet Diaries Podcast tracking
touch assets/processedSnyk.json        # Snyk Podcast tracking
touch assets/processedYt.json          # YouTube tracking
touch assets/processedReddit.json      # Reddit post tracking
touch assets/processedCTF.json         # CTF tracking
touch assets/processedSecurityNow.json # Security Now Podcast tracking
touch assets/processedCyberShow.json   # The Cyber Show Podcast tracking
  1. Install Dependencies
npm install
  1. Configure Environment Create a .env file with the following variables:
# GitHub Settings
GITHUB_SECRET=
GITHUB_USERNAME=
GITHUB_REPO=
# Optional
EXCLUDED_GITHUB_FILES=

# Telegram Settings
TELEGRAM_BOT_TOKEN=
CHAT_ID=
# Optional Topic IDs for message organization
TELEGRAM_TOPIC_THM=
TELEGRAM_TOPIC_NEWS=
TELEGRAM_TOPIC_YOUTUBE=
TELEGRAM_TOPIC_PODCAST=
TELEGRAM_TOPIC_GITHUB=
TELEGRAM_TOPIC_REDDIT=
TELEGRAM_TOPIC_CVE=

# Mistral AI Settings
MISTRAL_API_KEY=
# Optional, comma-separated
AUTHORIZED_LANGUAGES=

# AssemblyAI - Text-to-Speech
ASSEMBLYAI_API_KEY=

# YouTube Settings
YOUTUBE_API_KEY=

# Reddit
REDDIT_SUBREDDITS=
REDDIT_DAYS_LOOKBACK=
REDDIT_CLIENT_ID=
REDDIT_CLIENT_SECRET=

# CVE
CVSS_SEVERITY_THRESHOLD=   # Default >= 7.0
HOURS_DELAY=               # Default 24 hours
TECHNOLOGIES_OF_INTEREST=

# Optional Database Settings
MYSQL_HOST=
MYSQL_USER=
MYSQL_PASSWORD=
MYSQL_DATABASE=
I_WANT_TO_SAVE_MESSAGES_IN_DB=true # Enable message logging in database

πŸ“ Note: This project is designed to work without a database by default. However, you can enable message logging in a MySQL database by setting I_WANT_TO_SAVE_MESSAGES_IN_DB=true and configuring the database connection variables defined in /config/dbConfig.js. The database should contain a TelegramLogs table with at least two columns: message and dateAdd. This feature uses the mysql2 package.

  1. Optional: Customize Mistral AI parameters
/crons/config/mistral.js
  1. Optional: Modify bot prompts
/crons/utils/prompts

πŸ› οΈ Usage

Basic Command

npm run cron -- -c <CRON_NAME>

With Language Specification

npm run cron -- -c <CRON_NAME> -l <language>

πŸ“ Note: Content language is restricted by the AUTHORIZED_LANGUAGES environment variable to avoid prompt injection. Default is English.

πŸ“š Documentation

For VPS deployment guidance, you can also check our deployment guide.

🀝 Contributing

We welcome contributions! Feel free to:

  • πŸ› Report issues
  • πŸ”€ Submit pull requests
  • πŸ’‘ Suggest new features

πŸ“„ License

This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).

This means you are free to share and adapt this work for non-commercial purposes, as long as you provide appropriate attribution. More information: LICENSE

License: CC BY-NC 4.0


Made by kOaDT

About

Cyber Bot is an Node.js project that helps users improve their cybersecurity skills through scheduled Telegram messages.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors 2

  •  
  •