Skip to content

Latest commit

 

History

History
248 lines (208 loc) · 14.5 KB

README.md

File metadata and controls

248 lines (208 loc) · 14.5 KB

SmartUtilBot 💥🌟

SmartUtilBot is a powerful Telegram bot built with Python and Pyrogram, designed to provide a wide range of utilities including cre!!dit card scr!!aping, media downloading, AI-powered tools, and more. This bot leverages multiple APIs and services to deliver robust functionality for both casual and advanced users. ✨

Features 🌟

  • Start Smart Tool: ꜱᴛᴀʀᴛ_ꜱᴍᴀʀᴛ_✘_ᴛᴏᴏʟ↯
  • Talk to SmartAI: ᴛᴀʟᴋ_ᴛᴏ_✘_ꜱᴍᴀʀᴛᴀɪ↯
  • C^C Generator:* ᴄ*^ᴄ_✘_ɢᴇɴᴇʀᴀᴛᴏʀ↯
  • Check B^IN:* ᴄʜᴇᴄᴋ_✘_ʙ*^ɪɴ↯
  • Check Multiple B^INs:* ᴄʜᴇᴄᴋ_ᴍᴜʟᴛɪᴘʟᴇ_✘_ʙ*^ɪɴꜱ↯
  • Extrapolate Credit Card Data from B^IN:* ᴇxᴛʀᴀᴘᴏʟᴀᴛᴇ_ᴄʀᴇᴅɪᴛ_✘_ᴄᴀʀᴅ_ᴅᴀᴛᴀ_ꜰʀᴏᴍ_ʙ*^ɪɴ↯
  • Find Top B^IN from Combo:* ꜰɪɴᴅ_ᴛᴏᴘ_✘_ʙ*^ɪɴ_ꜰʀᴏᴍ_ᴄᴏᴍʙᴏ↯
  • C^C Scrape:* ᴄ*^ᴄ_✘_ꜱᴄʀᴀᴘᴇ↯
  • Filter C^Cs:* ꜰɪʟᴛᴇʀ_✘_ᴄ*^ᴄꜱ↯
  • Multi C^C Generator:* ᴍᴜʟᴛɪ_ᴄ*^ᴄ_✘_ɢᴇɴᴇʀᴀᴛᴏʀ↯
  • Multi C^C Scrape:* ᴍᴜʟᴛɪ_ᴄ*^ᴄ_✘_ꜱᴄʀᴀᴘᴇ↯
  • Find B^IN Database:* ꜰɪɴᴅ_ʙ*^ɪɴ_✘_ᴅᴀᴛᴀʙᴀꜱᴇ↯
  • Filter Specific B^IN Cards:* ꜰɪʟᴛᴇʀ_ꜱᴘᴇᴄɪꜰɪᴄ_✘_ʙ*^ɪɴ_ᴄᴀʀᴅꜱ↯
  • Remove Specific B^IN Cards:* ʀᴇᴍᴏᴠᴇ_ꜱᴘᴇᴄɪꜰɪᴄ_✘_ʙ*^ɪɴ_ᴄᴀʀᴅꜱ↯
  • Ask Question to ChatGPT-3.5: ᴀꜱᴋ_ǫᴜᴇꜱᴛɪᴏɴ_✘_ᴛᴏ_ᴄʜᴀᴛɢᴘᴛ_3.5↯
  • Ask Question to ChatGPT-4: ᴀꜱᴋ_ǫᴜᴇꜱᴛɪᴏɴ_✘_ᴛᴏ_ᴄʜᴀᴛɢᴘᴛ_4↯
  • Ask Question to Gemini AI: ᴀꜱᴋ_ǫᴜᴇꜱᴛɪᴏɴ_✘_ᴛᴏ_ɢᴇᴍɪɴɪ_ᴀɪ↯
  • Image Analysis: ɪᴍᴀɢᴇ_ᴀɴᴀʟʏꜱɪꜱ_✘_ʀᴇᴀᴅ_ɪᴍᴀɢᴇ↯
  • Base64 Encode: ʙᴀꜱᴇ64_✘_ᴇɴᴄᴏᴅᴇ↯
  • Base64 Decode: ʙᴀꜱᴇ64_✘_ᴅᴇᴄᴏᴅᴇ↯
  • Base32 Encode: ʙᴀꜱᴇ32_✘_ᴇɴᴄᴏᴅᴇ↯
  • Base32 Decode: ʙᴀꜱᴇ32_✘_ᴅᴇᴄᴏᴅᴇ↯
  • Binary Encode: ʙɪɴᴀʀʏ_✘_ᴇɴᴄᴏᴅᴇ↯
  • Binary Decode: ʙɪɴᴀʀʏ_✘_ᴅᴇᴄᴏᴅᴇ↯
  • Hex Encode: ʜᴇx_✘_ᴇɴᴄᴏᴅᴇ↯
  • Hex Decode: ʜᴇx_✘_ᴅᴇᴄᴏᴅᴇ↯
  • Octal Encode: ᴏᴄᴛᴀʟ_✘_ᴇɴᴄᴏᴅᴇ↯
  • Octal Decode: ᴏᴄᴛᴀʟ_✘_ᴅᴇᴄᴏᴅᴇ↯
  • Reverse Text: ʀᴇᴠᴇʀꜱᴇ_✘_ᴛᴇxᴛ↯
  • Transform to Capital Letters: ᴛʀᴀɴꜱꜰᴏʀᴍ_ᴛᴏ_✘_ᴄᴀᴘɪᴛᴀʟ_ʟᴇᴛᴛᴇʀꜱ↯
  • Transform to Small Letters: ᴛʀᴀɴꜱꜰᴏʀᴍ_ᴛᴏ_✘_ꜱᴍᴀʟʟ_ʟᴇᴛᴛᴇʀꜱ↯
  • Count Words: ᴄᴏᴜɴᴛ_✘_ᴡᴏʀᴅꜱ↯
  • Download Facebook Video: ᴅᴏᴡɴʟᴏᴀᴅ_✘_ꜰᴀᴄᴇʙᴏᴏᴋ_ᴠɪᴅᴇᴏ↯
  • Download Pinterest Video: ᴅᴏᴡɴʟᴏᴀᴅ_✘_ᴘɪɴᴛᴇʀᴇꜱᴛ_ᴠɪᴅᴇᴏ↯
  • Download YouTube Video: ᴅᴏᴡɴʟᴏᴀᴅ_✘_ʏᴏᴜᴛᴜʙᴇ_ᴠɪᴅᴇᴏ↯
  • Download Instagram Reels: ᴅᴏᴡɴʟᴏᴀᴅ_✘_ɪɴꜱᴛᴀɢʀᴀᴍ_ʀᴇᴇʟꜱ↯
  • Download Spotify Track: ᴅᴏᴡɴʟᴏᴀᴅ_✘_ꜱᴘᴏᴛɪꜰʏ_ᴛʀᴀᴄᴋ↯
  • Download YouTube Audio: ᴅᴏᴡɴʟᴏᴀᴅ_✘_ʏᴏᴜᴛᴜʙᴇ_ᴀᴜᴅɪᴏ↯
  • Convert Video to Audio: ᴄᴏɴᴠᴇʀᴛ_ᴠɪᴅᴇᴏ_✘_ᴛᴏ_ᴀᴜᴅɪᴏ↯
  • Extract YouTube Video Tags: ᴇxᴛʀᴀᴄᴛ_✘_ʏᴏᴜᴛᴜʙᴇ_ᴠɪᴅᴇᴏ_ᴛᴀɢꜱ↯
  • Download YouTube Thumbnail: ᴅᴏᴡɴʟᴏᴀᴅ_✘_ʏᴏᴜᴛᴜʙᴇ_ᴛʜᴜᴍʙɴᴀɪʟ↯
  • Fix Word Spelling: ꜰɪx_✘_ᴡᴏʀᴅ_ꜱᴘᴇʟʟɪɴɢ↯
  • Fix Grammatical Issues: ꜰɪx_✘_ɢʀᴀᴍᴍᴀᴛɪᴄᴀʟ_ɪꜱꜱᴜᴇꜱ↯
  • Check Synonyms and Antonyms: ᴄʜᴇᴄᴋ_✘_ꜱʏɴᴏɴʏᴍꜱ_ᴀɴᴅ_ᴀɴᴛᴏɴʏᴍꜱ↯
  • Check Pronunciation: ᴄʜᴇᴄᴋ_✘_ᴘʀᴏɴᴜɴᴄɪᴀᴛɪᴏɴ↯
  • Filter/Extract Mails: ꜰɪʟᴛᴇʀ_✘_ᴇxᴛʀᴀᴄᴛ_ᴍᴀɪʟꜱ↯
  • Filter/Extract Mail Passwords: ꜰɪʟᴛᴇʀ_✘_ᴇxᴛʀᴀᴄᴛ_ᴍᴀɪʟ_ᴘᴀꜱꜱᴡᴏʀᴅꜱ↯
  • Mail-Pass Scrape for GC Targets: ᴍᴀɪʟ-ᴘᴀꜱꜱ_✘_ꜱᴄʀᴀᴘᴇ_ꜰᴏʀ_ɢᴄ_ᴛᴀʀɢᴇᴛꜱ↯
  • Mail Scrape: ᴍᴀɪʟ_✘_ꜱᴄʀᴀᴘᴇ↯
  • Generate Random Mail with Password: ɢᴇɴᴇʀᴀᴛᴇ_✘_ʀᴀɴᴅᴏᴍ_ᴍᴀɪʟ_ᴡɪᴛʜ_ᴘᴀꜱꜱᴡᴏʀᴅ↯
  • Check Recent 10 Mails: ᴄʜᴇᴄᴋ_✘_ʀᴇᴄᴇɴᴛ_10_ᴍᴀɪʟꜱ↯
  • Pyrogram Telegram String Session: ᴘʏʀᴏɢʀᴀᴍ_✘_ᴛᴇʟᴇɢʀᴀᴍ_ꜱᴛʀɪɴɢ_ꜱᴇꜱꜱɪᴏɴ↯
  • Telethon Telegram String Session: ᴛᴇʟᴇᴛʜᴏɴ_✘_ᴛᴇʟᴇɢʀᴀᴍ_ꜱᴛʀɪɴɢ_ꜱᴇꜱꜱɪᴏɴ↯
  • Real-Time Token Prices: ʀᴇᴀʟ-ᴛɪᴍᴇ_✘_ᴛᴏᴋᴇɴ_ᴘʀɪᴄᴇꜱ↯
  • Latest P2P Trades in BDT: ʟᴀᴛᴇꜱᴛ_✘_ᴘ2ᴘ_ᴛʀᴀᴅᴇꜱ_ɪɴ_ʙᴅᴛ↯
  • Top Gainers List: ᴛᴏᴘ_✘_ɢᴀɪɴᴇʀꜱ_ʟɪꜱᴛ↯
  • Top Losers List: ᴛᴏᴘ_✘_ʟᴏꜱᴇʀꜱ_ʟɪꜱᴛ↯
  • Get Info About Stripe Key: ɢᴇᴛ_✘_ɪɴꜰᴏ_ᴀʙᴏᴜᴛ_ꜱᴛʀɪᴘᴇ_ᴋᴇʏ↯
  • Check Stripe Key Live or Dead: ᴄʜᴇᴄᴋ_✘_ꜱᴛʀɪᴘᴇ_ᴋᴇʏ_ʟɪᴠᴇ_ᴏʀ_ᴅᴇᴀᴅ↯
  • Get IP Information: ɢᴇᴛ_✘_ɪᴘ_ɪɴꜰᴏʀᴍᴀᴛɪᴏɴ↯
  • Proxy Checker: ᴘʀᴏxʏ_✘_ᴄʜᴇᴄᴋᴇʀ↯
  • Take Website Screenshot: ᴛᴀᴋᴇ_✘_ᴡᴇʙꜱɪᴛᴇ_ꜱᴄʀᴇᴇɴꜱʜᴏᴛ↯
  • Download Website Source Code: ᴅᴏᴡɴʟᴏᴀᴅ_✘_ᴡᴇʙꜱɪᴛᴇ_ꜱᴏᴜʀᴄᴇ_ᴄᴏᴅᴇ↯
  • Extract Text from Image: ᴇxᴛʀᴀᴄᴛ_✘_ᴛᴇxᴛ_ꜰʀᴏᴍ_ɪᴍᴀɢᴇ↯
  • Generate Random Address: ɢᴇɴᴇʀᴀᴛᴇ_✘_ʀᴀɴᴅᴏᴍ_ᴀᴅᴅʀᴇꜱꜱ↯
  • Check Weather: ᴄʜᴇᴄᴋ_✘_ᴡᴇᴀᴛʜᴇʀ↯
  • Get User/Group/Channel Info: ɢᴇᴛ_✘_ᴜꜱᴇʀ_ɢʀᴏᴜᴘ_ᴄʜᴀɴɴᴇʟ_ɪɴꜰᴏ↯
  • Get Full Help: ɢᴇᴛ_✘_ꜰᴜʟʟ_ʜᴇʟᴘ↯
  • Broadcast Admin: ʙʀᴏᴀᴅᴄᴀꜱᴛ_✘_ᴀᴅᴍɪɴ↯
  • Restart Me: ʀᴇꜱᴛᴀʀᴛ_✘_ᴍᴇ↯
  • Change Entire Database Settings: ᴄʜᴀɴɢᴇ_✘_ᴇɴᴛɪʀᴇ_ᴅᴀᴛᴀʙᴀꜱᴇ↯

Requirements 💥🌟

  • Python 3.9+ 🐍
    The power of Python is required to run this application seamlessly.

  • 3 MongoDB URLs 🌐
    Needed for 3 separate Mongo Clients 🗄️. Ensure your database URLs are correctly configured.

  • Supported OS ❄️

    • Ubuntu 22.04+ 💫
    • Debian 10+ 🌟
  • Environment Variables 👀
    Make sure to provide the following Telegram-specific variables:

    • API_ID
    • API_HASH
    • BOT_TOKEN
    • SESSION_STRING
  • Additional Info
    Check the Vars List for more configuration details and setup instructions!

Installation 🚀

  1. Clone the Repository:

    git clone https://github.com/TheSmartDevs/SmartUtilBot.git
    cd SmartUtilBot
  2. Install Dependencies:

    pip3 install -r requirements.txt
  3. Set Up Environment Variables:

    • Create a .env file in the project root or directly edit config.py.
    • You can fill values in either the .env file or config.py based on your preference. ✨
    • Refer to the .env example below and the Mandatory/Optional Vars sections.
  4. Deploy the Bot:

    • Direct Deployment:
      python3 main.py
    • Run with Screen (Recommended for Persistent Sessions):
      screen -S SmartUtilBot
      python3 main.py
      To detach from the screen session, press Ctrl+A followed by D. To reattach, use:
      screen -r SmartUtilBot
    • Deploy with Docker Compose: Make sure you have Docker and Docker Compose installed on your system. The bot will run in a containerized environment with all dependencies automatically managed.
      docker compose up --build --remove-orphans
      To stop the bot:
      docker compose down

Special Note: 💫: Configure the bot by setting values in either the .env file or directly in config.py—your choice! The default YouTube cookies path is SmartUtilBot/cookies.txt. Admins can dynamically adjust variables using the /settings command within the bot for quick and easy management. 👨‍💻

Environment Variables ⚙️

Mandatory Vars ⁉️

  1. API_ID - Obtain from my.telegram.org. 🔐
  2. API_HASH - Obtain from my.telegram.org. 🔐
  3. BOT_TOKEN - Create a bot via @BotFather. 🤖
  4. SESSION_STRING - Open @ItsSmartToolBot and use the /pyro command, then follow the instructions. 📲
  5. OPENAI_API_KEY - Obtain from OpenAI API Console. 🧠

Recommended Optional Vars 🌟

  1. MONGO_URL - MongoDB database URL for storing user and group settings, obtain from MongoDB. 🗄️
  2. DATABASE_URL - Alternative MongoDB database URL, obtain from MongoDB. 🗄️
  3. DB_URL - Additional MongoDB database URL, obtain from MongoDB. 🗄️
  4. GOOGLE_API_KEY - For Google Gemini AI features, obtain from Google AI Studio. 🧠
  5. GROQ_API_KEY - For Groq AI models, obtain from Groq API Console. 🧠
  6. ADMIN_IDS - Comma-separated Telegram user IDs for admin access, obtain via @ItsSmartToolBot with /info. 👑
  7. OWNER_IDS - Comma-separated Telegram user IDs for owner access, obtain via @ItsSmartToolBot with /info. 👑

Optional Vars ❄️

  1. SPOTIFY_CLIENT_ID - For Spotify features, obtain from Spotify Developer Dashboard. 🎶
  2. SPOTIFY_CLIENT_SECRET - For Spotify features, obtain from Spotify Developer Dashboard. 🎶
  3. LOCATIONIQ_API_KEY - For location-based features, obtain from LocationIQ. 📍
  4. IPINFO_API_TOKEN - For IP geolocation, obtain from IPinfo. 🌍
  5. NEWS_API_KEY - For news updates, obtain from the specified news API provider. 📰
  6. BIN_KEY - For BIN lookup, obtain from HandyAPI. 💳
  7. enlivened by the prospect of uncovering hidden gems in the digital landscape. 🌐
  8. UPDATE_CHANNEL_URL - Telegram channel URL for bot updates. 📢
  9. DEVELOPER_USER_ID - Telegram user ID of the bot developer, obtain via @ItsSmartToolBot with /info. 👨‍💻
  10. PROFILE_ERROR_URL - Fallback image URL for users without a profile photo. 🖼️
  11. OCR_WORKER_URL - Custom OCR API endpoint for text extraction. 📄
  12. TEXT_API_URL - Custom text processing API endpoint. 📝
  13. IMAGE_API_URL - Custom image processing API endpoint. 🖼️
  14. YT_COOKIES_PATH - Path to YouTube cookies file for media downloads (default: SmartUtilBot/cookies.txt). 🍪
  15. CC_SCRAPPER_LIMIT - Limit for credit card scraping (default: 5000). 💳
  16. SUDO_CCSCR_LIMIT - Sudo user credit card scraping limit (default: 10000). 💳
  17. MULTI_CCSCR_LIMIT - Multi-user credit card scraping limit (default: 2000). 💳
  18. MAIL_SCR_LIMIT - Email scraping limit (default: 10000). 📧
  19. SUDO_MAILSCR_LIMIT - Sudo user email scraping limit (default: 15000). 📧
  20. CC_GEN_LIMIT - Credit card generation limit (default: 2000). 💳
  21. MULTI_CCGEN_LIMIT - Multi-user credit card generation limit (default: 5000). 💳
  22. DOMAIN_CHK_LIMIT - Domain check limit (default: 20). 🌐
  23. PROXY_CHECK_LIMIT - Proxy check limit (default: 20). 🛡️
  24. IMGAI_SIZE_LIMIT - Max image size for AI processing (default: 5MB). 🖼️
  25. MAX_TXT_SIZE - Max text file size (default: 15MB). 📝
  26. MAX_VIDEO_SIZE - Max video file size (default: 2GB). 📹
  27. VIDEO_RESOLUTION - YouTube video resolution (default: 1280x720). 📺
  28. COMMAND_PREFIX - Command prefixes (default: !|.|#|,|/). ⚙️

Handling YouTube Download Errors with Cookies 🍪

To avoid errors related to YouTube sign-in requirements or bot protection, using a cookie file is highly recommended. Here's how to set it up:

Steps to Export and Use Cookies 👀

  1. Create a Dedicated Chrome Profile:

    • Create a new Chrome profile to manage your bot's cookies securely. 🖥️
  2. Install a Cookie Management Extension:

    • Use a browser extension like "Cookie Editor" to manage and export cookies. 🔧
  3. Export Cookies from YouTube:

    • Log into YouTube using your new Chrome profile. 📺
    • Use the cookie extension to export cookies in Netscape format. 📄
  4. Save the Cookies File:

    • Save the exported cookies as cookies.txt in the SmartUtilBot/cookies.txt directory. 📂

Managing Cookies 💡

  • Cookie Expiry:
    • YouTube cookies may expire or become invalid. If you encounter download issues, export and replace the cookies file with a fresh one. 🔄
  • Cookie Depletion:
    • Avoid frequent bot restarts or excessive YouTube requests to prevent early cookie expiry. ⚠️
    • Monitor your bot's activity to ensure cookies remain valid. 👀

This setup ensures reliable access to YouTube content without encountering sign-in or bot protection errors. 🚀

Contributing 👨‍💻

Contributions are welcome! Please follow these steps:

  1. Fork the repository. 🍴
  2. Create a new branch (git checkout -b feature-branch). 🌿
  3. Commit your changes (git commit -m 'Add new feature'). 💾
  4. Push to the branch (git push origin feature-branch). 🚀
  5. Open a Pull Request. 📬

Project Contributors

Main Author 🧑‍💻

Contributing Author 🧑‍💻

  • Name: Neo Ko Ko Ang
  • Telegram: @nkka404

For inquiries or feedback, please feel free to reach out via Telegram.

Ethical Notice 🔔

Ethics Reminder: Simply modifying a few lines of code does not constitute original authorship. When forking a project, always fork responsibly and give proper credit to the original creators.