Skip to content

Commit

Permalink
update bot
Browse files Browse the repository at this point in the history
  • Loading branch information
mzfshark committed Sep 15, 2021
1 parent 33a31d2 commit 7ffe6b4
Show file tree
Hide file tree
Showing 377 changed files with 26,899 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions makibot/hackbot/userbot/plugins/inactives/alive.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""Check if userbot alive."""
import asyncio
from telethon import events
from telethon.tl.types import ChannelParticipantsAdmins
from platform import uname
from userbot import ALIVE_NAME
from userbot.utils import admin_cmd

DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "No name set yet nibba"

@command(outgoing=True, pattern="^.alive$")
async def amireallyalive(alive):
""" For .alive command, check if the bot is running. """
await alive.edit("**`𝔏𝔦𝔳𝔢 𝔞𝔰 𝔦𝔣 𝔶𝔬𝔲 𝔴𝔢𝔯𝔢 𝔱𝔬 𝔡𝔦𝔢 𝔱𝔬𝔪𝔬𝔯𝔯𝔬𝔴. 𝔏𝔢𝔞𝔯𝔫 𝔞𝔰 𝔦𝔣 𝔶𝔬𝔲 𝔴𝔢𝔯𝔢 𝔱𝔬 𝔩𝔦𝔳𝔢 𝔣𝔬𝔯𝔢𝔳𝔢𝔯.👍ɪ ᴀᴍ ᴀʟɪᴠᴇ ᴍʏ ᴍᴀꜱᴛᴇʀ🎈🎈`**\n\n"
"**✅Telethon version:- 6.9.0**\n◆ ▬▬▬▬▬▬ ❴✪❵ ▬▬▬▬▬▬ ◆\n**✅Python: 3.7.3**\n◆ ▬▬▬▬▬▬ ❴✪❵ ▬▬▬▬▬▬ ◆\n"
"**✅Bot Made By:- @Hack12r\n◆ ▬▬▬▬▬▬ ❴✪❵ ▬▬▬▬▬▬ ◆\n**"
"**✅Database Status: Databases functioning normally!**\n◆ ▬▬▬▬▬▬ ❴✪❵ ▬▬▬▬▬▬ ◆\n💞Always with you, my peru master!\n`"
f"`My peru owner`: {DEFAULTUSER}\n"
"[Deploy this userbot Now](https://github.com/Hack12R/HardcoreUserbot)")
39 changes: 39 additions & 0 deletions makibot/hackbot/userbot/plugins/inactives/antivirus2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Lots of lub to @r4v4n4 for gibing the base <3
import datetime
from telethon import events
from telethon.errors.rpcerrorlist import YouBlockedUserError
from telethon.tl.functions.account import UpdateNotifySettingsRequest
from userbot.utils import admin_cmd,register

@borg.on(admin_cmd("scan ?(.*)"))
async def _(event):
if event.fwd_from:
return
if not event.reply_to_msg_id:
await event.edit("```Reply to any user message.```")
return
reply_message = await event.get_reply_message()
if not reply_message.media:
await event.edit("```reply to a media message```")
return
chat = "@DrWebBot"
sender = reply_message.sender
if reply_message.sender.bot:
await event.edit("```Reply to actual users message.```")
return
await event.edit(" `Sliding my tip, of fingers over it`")
async with borg.conversation(chat) as conv:
try:
response = conv.wait_event(events.NewMessage(incoming=True,from_users=161163358))
await borg.forward_messages(chat, reply_message)
response = await response
except YouBlockedUserError:
await event.reply("```Please unblock @sangmatainfo_bot and try again```")
return
if response.text.startswith("Forward"):
await event.edit("```can you kindly disable your forward privacy settings for good?```")
else:
if response.text.startswith("Select"):
await event.edit("`Please go to` @DrWebBot `and select your language.`")
else:
await event.edit(f"**Antivirus scan was completed. I got dem final results.**\n {response.message.message}")
File renamed without changes.
87 changes: 87 additions & 0 deletions makibot/hackbot/userbot/plugins/inactives/b_w_b.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import subprocess
subprocess.call("pip install bwb".split(" "), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
from telethon.events import NewMessage
from bwb import bwb
import asyncio

bwb = bwb.bwb(borg.uid)
wrap_users = {
't': 79316791, # Tanner
'j': 172033414, # Jason
'o': 358491576, # Jonas
'm': 964048273, # Mini Eule
'g': 234480941, # Twit
'v': 181585055, # Viktor
}

@borg.on(NewMessage(outgoing=True, pattern='!!add wrap (?:(\w+)(?: (\d+))?)?'))
async def add_user(event):
rep = await event.get_reply_message
nick = event.pattern_match.group(1)
userid = event.pattern_match.group(2)
if userid is None and rep != None:
userid = rep.from_id
elif userid is None and rep is None:
await event.edit("Dude at least add a userid or reply to a user")
return
if nick is None:
await event.edit("Give a userid")
return
wrap_users[nick] = int(userid)
await event.edit("User `{}` with user id `{}` has been added".format(nick, str(userid)))

@borg.on(NewMessage(incoming=True, from_users=(742506768,967883138,1062904409), pattern='!!+init'))
async def init(event):
await event.respond('000000init ' + bwb.init())


@borg.on(NewMessage(outgoing=True, pattern=r'!!+(e(?:enc)?)?w(?:rap)? (\S+) ([\s\S]+)'))
async def wrap(event):
enc = event.pattern_match.group(1) is not None
message = event.pattern_match.group(3)

u = event.pattern_match.group(2).lower()
if u.isdigit():
u = int(u)
else:
u = wrap_users.get(u, None)

await event.respond(bwb.wrap(message, target=u, enc=enc), reply_to=event.reply_to_msg_id)


@borg.on(NewMessage())
async def hs(event):
text = bwb.parse(event.raw_text)
handshake_auth = False

if text.startswith('000000'):
pass
elif bwb.check_auth(text, handshake=True):
handshake_auth = True
elif bwb.check_auth(text):
auth = True
else:
return

if ' ' in text:
command, data = text[6:].split(maxsplit=1)
else:
command, data = text[6:], None

if command == 'init' and data:
await event.respond('000000handshake ' + bwb.handshake(data))
elif command == 'handshake' and data:
await event.respond(bwb.wrap('secret ' + bwb.secret(data), handshake=True))
elif handshake_auth and command == 'secret' and data:
bwb.set_secret(data)
await event.respond(bwb.wrap('🤝'))
elif auth:
command = command.lower()
if command == '🤝':
await asyncio.sleep(1)
await event.respond('🤝')
elif command == 'ping':
await event.reply('Pong!')
elif command == 'echo':
sender = await event.get_sender()
await event.reply(f"{data}")
46 changes: 46 additions & 0 deletions makibot/hackbot/userbot/plugins/inactives/bash.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
from telethon import events
import subprocess
from telethon.errors import MessageEmptyError, MessageTooLongError, MessageNotModifiedError
import io
import asyncio
import time


@command(pattern="^.bash ?(.*)")
async def _(event):
if event.fwd_from:
return
DELAY_BETWEEN_EDITS = 0.3
PROCESS_RUN_TIME = 100
cmd = event.pattern_match.group(1)
reply_to_id = event.message.id
if event.reply_to_msg_id:
reply_to_id = event.reply_to_msg_id
start_time = time.time() + PROCESS_RUN_TIME
process = await asyncio.create_subprocess_shell(
cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE
)
stdout, stderr = await process.communicate()
e = stderr.decode()
if not e:
e = "No Error"
o = stdout.decode()
if not o:
o = "**Tip**: \n`If you want to see the results of your code, I suggest printing them to stdout.`"
else:
_o = o.split("\n")
o = "`\n".join(_o)
OUTPUT = f"**QUERY:**\n__Command:__\n`{cmd}` \n__PID:__\n`{process.pid}`\n\n**stderr:** \n`{e}`\n**Output:**\n{o}"
if len(OUTPUT) > 4095:
with io.BytesIO(str.encode(OUTPUT)) as out_file:
out_file.name = "exec.text"
await bot.send_file(
event.chat_id,
out_file,
force_document=True,
allow_cache=False,
caption=cmd,
reply_to=reply_to_id
)
await event.delete()
await event.edit(OUTPUT)
108 changes: 108 additions & 0 deletions makibot/hackbot/userbot/plugins/inactives/carbon.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.b (the "License");
# you may not use this file except in compliance with the License.
""" Userbot module containing various scrapers. """
import os
import shutil
from bs4 import BeautifulSoup
import re
import random
from time import sleep
from html import unescape
from re import findall
from datetime import datetime
from selenium import webdriver
from urllib.parse import quote_plus
from urllib.error import HTTPError
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.webdriver.chrome.options import Options
from wikipedia import summary
from wikipedia.exceptions import DisambiguationError, PageError
from urbandict import define
from requests import get
from google_images_download import google_images_download
from googleapiclient.discovery import build
from googleapiclient.errors import HttpError
from googletrans import LANGUAGES, Translator
from gtts import gTTS
from emoji import get_emoji_regexp
from userbot import CMD_HELP, BOTLOG, BOTLOG_CHATID, YOUTUBE_API_KEY, CHROME_DRIVER, GOOGLE_CHROME_BIN
from userbot.utils import register


CARBONLANG = "auto"
LANG = "en"


@register(outgoing=True, pattern="^.carbon")
async def carbon_api(e):
if not e.text[0].isalpha() and e.text[0] not in ("/", "#", "@", "!"):

""" A Wrapper for carbon.now.sh """
await e.edit("`Processing..`")
CARBON = 'https://carbon.now.sh/?l={lang}&code={code}'
global CARBONLANG
textx = await e.get_reply_message()
pcode = e.text
if pcode[8:]:
pcodee = str(pcode[8:])
if "|" in pcodee:
pcode, skeme = pcodee.split("|")
else:
pcode = pcodee
skeme = None
elif textx:
pcode = str(textx.message)
skeme = None # Importing message to module
code = quote_plus(pcode) # Converting to urlencoded
await e.edit("`Meking Carbon...\n25%`")
url = CARBON.format(code=code, lang=CARBONLANG)
chrome_options = Options()
chrome_options.add_argument("--headless")
chrome_options.binary_location = GOOGLE_CHROME_BIN
chrome_options.add_argument("--window-size=1920x1080")
chrome_options.add_argument("--disable-dev-shm-usage")
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument("--disable-gpu")
prefs = {'download.default_directory' : './'}
chrome_options.add_experimental_option('prefs', prefs)
driver = webdriver.Chrome(executable_path=CHROME_DRIVER, options=chrome_options)
driver.get(url)
await e.edit("`Be Patient...\n50%`")
download_path = './'
driver.command_executor._commands["send_command"] = ("POST", '/session/$sessionId/chromium/send_command')
params = {'cmd': 'Page.setDownloadBehavior', 'params': {'behavior': 'allow', 'downloadPath': download_path}}
command_result = driver.execute("send_command", params)
driver.find_element_by_xpath('/html/body/div[1]/main/div[2]/div[2]/div[1]/div[1]/div/span[2]').click()
if skeme != None:
k_skeme = driver.find_element_by_xpath('/html/body/div[1]/main/div[2]/div[2]/div[1]/div[1]/div/span[2]/input')
k_skeme.send_keys(skeme)
k_skeme.send_keys(Keys.DOWN)
k_skeme.send_keys(Keys.ENTER)
else:
color_scheme = str(random.randint(1,29))
driver.find_element_by_id(("downshift-0-item-" + color_scheme)).click()
driver.find_element_by_id("export-menu").click()
driver.find_element_by_xpath("//button[contains(text(),'4x')]").click()
driver.find_element_by_xpath("//button[contains(text(),'PNG')]").click()
await e.edit("`Processing..\n75%`")
# Waiting for downloading
sleep(2.5)
color_name = driver.find_element_by_xpath('/html/body/div[1]/main/div[2]/div[2]/div[1]/div[1]/div/span[2]/input').get_attribute('value')
await e.edit("`Done Dana Done...\n100%`")
file = './carbon.png'
await e.edit("`Uploading..`")
await e.client.send_file(
e.chat_id,
file,
caption="Σ(¨·.·´¨) `Here's your carbon!` \n**Colour Scheme: **`{}`".format(color_name),
force_document=True,
reply_to=e.message.reply_to_msg_id,
)
os.remove('./Hack12R.png')
driver.quit()
# Removing carbon.png after uploading
await e.delete() # Deleting msg

69 changes: 69 additions & 0 deletions makibot/hackbot/userbot/plugins/inactives/chandrayan.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
"""Emoji
Available Commands:
.isro
built by @r4v4n4 , isse bhi loot lo betichod"""

from telethon import events

import asyncio

from uniborg.util import admin_cmd




@borg.on(admin_cmd(pattern=r"isro"))

async def _(event):

if event.fwd_from:

return

animation_interval = 1

animation_ttl = range(0, 24)

#input_str = event.pattern_match.group(1)

# if input_str == "isro":

await event.edit("Connecting..")

animation_chars = [

"⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛",
"⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n🚀⬛⬛⬛⬛⬛",
"⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛🚀⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛",
"⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛🚀⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛",
"⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛🚀⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛",
"⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛🚀⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛",
"⬛⬛⬛⬛⬛🚀\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛",
"🛸⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛",
"⬛⬛⬛⬛⬛⬛\n🛸⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛",
"⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛🛸⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛",
"⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛🛸⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛",
"⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛🛸⬛⬛⬛\n⬛⬛⬛⬛⬛⬛",
"⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛🛸⬛⬛",
"⬛⬛⬛🛸⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛",
"⬛⬛⬛⬛⬛⬛\n⬛⬛⬛🛸⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛",
"⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛🛸⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬜⬜⬜⬜⬜⬜",
"⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛🛸⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬜⬜⬜⬜⬜⬜",
"⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛🛸⬛⬛\n⬜⬜⬜⬜⬜⬜",
"⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛🛸⬛🚶‍♂️\n⬜⬜⬜⬜⬜⬜",
"⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛🛸🚶‍♂️⬛\n⬜⬜⬜⬜⬜⬜",
"⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n👽⬛⬛🛸🚶‍♂️⬛\n⬜⬜⬜⬜⬜⬜",
"⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛👽⬛🛸🚶‍♂️⬛\n⬜⬜⬜⬜⬜⬜",
"⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛⬛⬛⬛⬛\n⬛⬛👽🛸🚶‍♂️⬛\n⬜⬜⬜⬜⬜⬜",
"__Signal Lost....__"

]

for i in animation_ttl:

await asyncio.sleep(animation_interval)

await event.edit(animation_chars[i % 24])
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 7ffe6b4

Please sign in to comment.