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.
برای خواندن داکیومنت فارسی اینجا کلیک کنید.
You Can Get Project From pip use this command :
pip install CaptchaGenerator
- 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
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()
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
TestCaptchaGeneratorRandom-Pyrogram.mp4
TestCaptchaIDM.mp4
TestCaptchaAudio.mp4
TestCapthaMath.mp4
TestCaptchaRandomText.mp4
By Sepehr0Day
Star this repository if you found it useful ⭐