Skip to content

gwill1337/Telegram-Password-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Telegram Password Bot

PyPI PyPI

Telegram Password Bot - this telegram bot for generating passwords with 8/16/32 symbols and which uses pyTelegramBotAPI 4.27.0

API Documentation - https://pytba.readthedocs.io/en/latest/index.html

Requirements

Install the current version PyPI:

pip install pyTelegramBotAPI

or with Git:

pip install git+https://github.com/eternnoir/pyTelegramBotAPI.git

Usage

  1. Create Virtualenv environment (Venv).
  2. Create Telegram Bot in @BotFather, take API token, then paste it instead "bot's API"
bot = telebot.TeleBot("bot's API")
  1. Also if you want you can write /setcommands in @BotFather, choose your bot and set comand "start - start", in order to when you enter bot at first, in the left corner was shown menu with command "/start".

Generation

This Bot uses module secrets to generate passwords.

def gen_password(len):
    a = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789'[]{},./_-()"
    return "".join(secrets.choice(a)for i in range(len))

It also has generation with only letters, numbers and symbols.

def only_numbers(len):
    num = "0123456789"
    return "".join(secrets.choice(num)for i in range(len))


def only_letters(len):
    a = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM"
    return "".join(secrets.choice(a) for i in range(len))


def only_symbols(len):
    sym = "'[]{},./_-()"
    return "".join(secrets.choice(sym) for i in range(len))

About

Just a simple passwords generation bot

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages