Sepehr0Day / CaptchaGenerator

Captcha Generator for Telegram bot or another bots

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Captcha Generator




About Project

The project is designed for Captcha telegram robot to make it easier to authenticate users.
Of course you can use this project elsewhere and this project is not just for telegram robots.

برای خواندن داکیومنت فارسی اینجا کلیک کنید.

Install


You Can Get Project From pip use this command :

pip install CaptchaGenerator

How To Work?

This library has 7 function for Captcha Generator:

  • 1- CaptchaGenerat
    • Numbergen
    • ValueScaptcha
    • NameExport
    • PathEXport
    • Fonts
    • Colors
    • Backgrounds
  • 2- CaptchaGeneratRandom
    • Numbergen
    • ValueScaptcha
    • NUMBERVARIANTS
    • Backgrounds
    • Fonts
    • NameExport
    • PathExport
  • 3- CaptchaGeneratorImageRandom (Only Use In Bots)
    • PathFolder
    • NumberRandomSelect
  • 4- CaptchaGeneratorImageDirectionRandom (CaptchaGeneratorIDR) (Only Use In Bots)
    • FolderImagesAddress
  • 5- CaptchaGeneratorAudio (Only Use In Bots)
    • NumberGen
    • ValuesCaptcha
    • NameExport
    • PathExport
  • 6- CaptchaGeneratorMath (Only Use In Bots)
    • Not have argument
  • 7- CaptchaGeneratRandomWord (Only Use In Bots)
    • Backgrounds
    • PathWords
    • Fonts
    • FontSize
    • NameExport
    • PathExport

Example CaptchaGenerat :

from CaptchaGenerator.CaptchaGenerator import Captcha
def main():
    NumberGen = 5
    NameExport = "CaptchaGenerat"  
    ValuesCaptcha = "012356789QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm!@#$%&*"  
    PathExport = r"C:\Path" 
    Fonts = ["fonts/BrunoAce-Regular.ttf" , "fonts/AmaticSC-Bold.ttf"]
    Colors = ["red" , "blue"] 
    Backgrounds = ["C:/Path/Background1.png", "C:/Path/Background2.png", "C:/Path/Background3.png"]
    choiceFromValues = Captcha.CaptchaGenerat(NumberGen=NumberGen, ValuesCaptcha=ValuesCaptcha, NameExport=NameExport, PathExport=PathExport, Fonts=Fonts, Colors=Colors, Backgrounds=Backgrounds)
    print("Generated captcha : " + choiceFromValues)
if __name__ == "__main__":
    main()

Example CaptchaGeneratRandom :

from CaptchaGenerator.CaptchaGenerator import Captcha
def main():
    NumberGen = 5
    NameExport = "CaptchaGenerat"  
    ValuesCaptcha = "012356789QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm!@#$%&*"  
    PathExport = r"C:\Path" 
    Fonts = ["fonts/BrunoAce-Regular.ttf" , "fonts/AmaticSC-Bold.ttf"]
    Backgrounds = ["C:/Path/Background1.png", "C:/Path/Background2.png", "C:/Path/Background3.png"]
    correct_answer, variants = Captcha.CaptchaGeneratRandom(NumberGen=NumberGen , ValuesCaptcha=ValuesCaptcha , NumberVariants=5 , Backgrounds=Backgrounds , Fonts=Fonts , NameExport=NameExport , PathExport=PathExport)
    print("correct answer : " , correct_answer)
    print("variants : " , variants)
if __name__ == "__main__":
    main()

You can see examples code for pyrogram in Examples folder here

Image CaptchaGenerat in Telegram(Pyrogram) :

Image1

Vidoe Test CaptchaGeneratRandom in Telegram(Pyrogram) :

TestCaptchaGeneratorRandom-Pyrogram.mp4

Image CaptchaGeneratorImageRandom in Telegram(Pyrogram) :

Image2

Vidoe Test CaptchaGeneratorImageDirectionRandom in Telegram(Pyrogram) :

TestCaptchaIDM.mp4

Vidoe Test CaptchaGeneratorAudio in Telegram(Pyrogram) :

TestCaptchaAudio.mp4

Vidoe Test CaptchaGeneratorMath in Telegram(Pyrogram) :

TestCapthaMath.mp4

Vidoe Test CaptchaGeneratRandomWord in Telegram(Pyrogram) :

TestCaptchaRandomText.mp4

update in coming...

Star this repository if you found it useful ⭐

About

Captcha Generator for Telegram bot or another bots

License:MIT License


Languages

Language:Python 100.0%