Beispiel #1
0
def help_en(lang, module, homedir):
    os.system('clear')
    print(color.GREEN + linec)
    print(color.YELLOW + '\n\t HELP')
    print(
        color.ENDC +
        '[{}] Attack A: Sends authentication frames to all APs found in range. Too many clients can freeze or reset several APs. '
        .format(color.RED + str(1) + color.ENDC))
    print(
        '[{}] Attack B: Sends beacon frames to show fake APs at clients. This can sometimes crash network scanners and even drivers!'
        .format(color.RED + str(2) + color.ENDC))
    print(
        '[{}] Attack C: Reworked WiFi-jammer (Crash all networks around you)'.
        format(color.RED + str(3) + color.ENDC))
    print(
        '[{}] Attack D: Sends deauthentication and disassociation packets to stations based on data traffic to disconnect all clients from an AP.'
        .format(color.RED + str(4) + color.ENDC))
    print('[{}] Attack E: Crashes the certain WiFi network'.format(color.RED +
                                                                   str(5) +
                                                                   color.ENDC))
    print(color.YELLOW + '\n[9] EXIT')
    print(color.GREEN + '\n' + linec)
    try:
        num = int(
            input(color.CYAN + color.UNDERL + '\nWKBYA' + color.ENDC + ' > '))
    except KeyboardInterrupt:
        print(color.YELLOW + '\n[*] Detected (CTRL + C)')
        sleep(1)
        print(color.RED + '[-] Exit')
        sys.exit()
    if num == 9:
        from lib.menu import menu
        menu(lang, module, homedir)
Beispiel #2
0
def ccg(e):
    if e == 'visa':
        while True:
            try:
                print(' How many ?')
                c = int(input(' HXYA>CCG>Visa>'))
                for i in range(c):
                    credit_card_number(visaPrefixList)
                input(' Please type ENTER')
                clear()
                menu()
                print(printMenu.ccgMenu)
                break

            except ValueError:
                print(' Please type a number between 1-∝')
    elif e == 'mastercard':
        while True:
            try:
                print(' How many ?')
                c = int(input(' HXYA>CCG>MasterCard>'))
                for i in range(c):
                    credit_card_number(mastercardPrefixList)
                input(' Please type ENTER')
                clear()
                menu()
                print(printMenu.ccgMenu)
                break

            except ValueError:
                print(' Please type a number between 1-∝')
Beispiel #3
0
def help_ru(lang, module, homedir):
    os.system('clear')
    print(color.GREEN + linec)
    print(color.YELLOW + '\n\t Помощь')
    print(
        color.ENDC +
        '[{}] Атака A: Отправляет фреймы аутентификации всем ТД найденным в диапазоне доступности. Слишком много клиентов может привести к зависанию или перезагрузке ТД. '
        .format(color.RED + str(1) + color.ENDC))
    print(
        '[{}] Атака B: Отправляет фреймы маяков для создания видимости присутствия множества Точек Доступа. Это иногда может вывести из строя сканеры сети и драйверы!'
        .format(color.RED + str(2) + color.ENDC))
    print(
        '[{}] Атака C: Переделанный скрипт WIFI-jammer (Глушит все WIFI точки в радиусе вашего WIFI адаптера)'
        .format(color.RED + str(3) + color.ENDC))
    print(
        '[{}] Атака D: Отправляет пакеты деаутентификации и деассоциации станциям на основе трафика данных для отключения всех клиентов от ТД.'
        .format(color.RED + str(4) + color.ENDC))
    print('[{}] Атака E: Глушит определенную точку WIFI'.format(color.RED +
                                                                str(5) +
                                                                color.ENDC))
    print(color.YELLOW + '\n[9] EXIT')
    print(color.GREEN + '\n' + linec)
    try:
        num = int(
            input(color.CYAN + color.UNDERL + '\nWKBYA' + color.ENDC + ' > '))
    except KeyboardInterrupt:
        print(color.YELLOW + '\n[*] Обнаруженно (CTRL + C)')
        sleep(1)
        print(color.RED + '[-] Выход')
        sys.exit()
    if num == 9:
        from lib.menu import menu
        menu(lang, module, homedir)
Beispiel #4
0
def bomber():
    nostop = 0

    while True:
        try:
            user = input(" Enter the victim's IG Username then press ENTER: ")
            url = "https://www.instagram.com/web/search/topsearch/?context=blended&query=" + user + "&rank_token=0.3953592318270893&count=1"
            response = requests.get(url)
            respJSON = response.json()
            user_id = str(respJSON['users'][0].get("user").get("pk"))
            break
        except:
            print(' Please type real Instagram username')

    message = input(
        " Put the message you want the software send and press ENTER: ")

    times = int(input(" How many messages do you want to send? "))

    print(" You are gonna STRESS", times, "times", user_id,
          "with the message: ", message, ".")
    input(" Are you sure?")

    try:
        while times > nostop:
            nostop = nostop + 1
            try:
                api.sendMessage(user_id, message)
            except:
                clear()
                menu()
                print(
                    " An error occurred. Be sure that your Instagram creditentials are true. Else, modify them into the Config Menu"
                )
                clear()
                menu()
                print(printMenu.instagramMenu)

            print(" " + str(nostop), ">> Sent to", user, ": ", message)
        input(" Please type ENTER")
        clear()
        menu()
        print(printMenu.instagramMenu)
    except:
        clear()
        menu()
        print(
            " An error occurred. You probably didn't install InstagramAPI correctly"
        )
        input(" Please type ENTER")
        clear()
        menu()
        print(printMenu.instagramMenu)
Beispiel #5
0
def avaPse():
    list_ask = input(
        " Do you want to use 'path/Instagram/pseudo.txt' ? (y/Enter) ")
    if not list_ask:
        liner = input(" Paste a Instagram Username here: ")
        url = 'https://instagram.com/' + liner + '/?__a=1'
        response = requests.get(url)
        try:
            availablepseudosfile = open(
                "path/instagram/AvailablePseudos/" + stwo + ".txt", "w+")
            clear()
            menu()
            try:
                respJSON = response.json()
                user_id = str(respJSON['graphql'].get("user").get("id"))
                print(' ' + liner + ' >> X')
            except:
                print(' ' + liner + ' >> V')
                availablepseudosfile.write(liner + "\n")
            input(' Please type ENTER')
            clear()
            menu()
            print(printMenu.instagramMenu)
        except (FileNotFoundError):
            sys.exit(
                ' Folder is missing. Reinstall HXYA here : https://github.com/gumbraise/HXYA'
            )
    elif (list_ask == 'y'):
        try:
            availablepseudosfile = open(
                "path/instagram/AvailablePseudos/" + stwo + ".txt", "w+")
            clear()
            menu()
            try:
                with open("path/instagram/pseudos.txt") as s:
                    for line in s:
                        liner = line.replace('\n',
                                             ' ').replace('\r',
                                                          '').replace(' ', '')
                        url = 'https://instagram.com/' + liner + '/?__a=1'
                        response = requests.get(url)
                        try:
                            respJSON = response.json()
                            user_id = str(
                                respJSON['graphql'].get("user").get("id"))
                            print(' ' + liner + ' >> X')
                        except:
                            print(' ' + liner + ' >> V')
                            availablepseudosfile.write(liner + "\n")
                    input(' Please type ENTER')
                    clear()
                    menu()
                    print(printMenu.instagramMenu)
            except (FileNotFoundError):
                f = open("path/instagram/pseudos.txt", "w+")
                print(' Error, retest now please')
        except (FileNotFoundError):
            sys.exit(
                ' Folder is missing. Reinstall HXYA here : https://github.com/gumbraise/HXYA'
            )
Beispiel #6
0
def unfollow():

    try:
        following = insta.api.getSelfUsersFollowing()
    except:
        clear()
        menu()
        print(
            " An error occurred. Be sure that your Instagram creditentials are true. Else, modify them into the Config Menu"
        )
        input(" Please type ENTER")
        clear()
        menu()
        print(printMenu.instagramMenu)

    try:
        for item in following["users"]:
            user = item["pk"]
            username = item["username"]

            insta.api.unfollow(user)
            print(" " + username + " is now unfollowed")
    except:
        clear()
        menu()
        print(
            " An error occurred. You probably didn't install InstagramAPI correctly"
        )
        input(" Please type ENTER")
        clear()
        menu()
        print(printMenu.instagramMenu)
Beispiel #7
0
def wdnfm():
    following_list = []
    followers_list = []

    try:
        following = insta.api.getSelfUsersFollowing()
        followers = insta.api.getSelfUserFollowers()
    except:
        clear()
        menu()
        print(
            " An error occurred. Be sure that your Instagram credentials are true. Else, modify them into the Config Menu"
        )
        input(" Please type ENTER")
        clear()
        menu()
        print(printMenu.instagramMenu)

    try:
        for item in following["users"]:
            following_list.append(item["username"])
        for item2 in followers["users"]:
            followers_list.append(item2["username"])

        print((set(following_list) - set(followers_list)))
        input(" Please type ENTER")
        clear()
        menu()
        print(printMenu.instagramMenu)
    except:
        clear()
        menu()
        print(
            " An error occurred. You probably didn't install InstagramAPI correctly"
        )
        input(" Please type ENTER")
        clear()
        menu()
        print(printMenu.instagramMenu)
Beispiel #8
0
def mail():
    clear()
    API_KEY = input('Mail API: ')
    To = input('To: ')
    Subject = input('Subject: ')
    Message = input('Message: ')

    try:
        url = 'http://mail.kellis.fr/?key=' + API_KEY + '&mail=simple'
        data = {'to': To, 'subject': Subject, 'message': Message}

        print('Flood in progress. Type CTRL+C to stop flooding')

        r = requests.post(url=url, data=data)

        data2 = r.json()

        try:
            if (str(data2['code']) == '200'):
                pass
        except:
            clear()
            print('An error has occurred')
            print('Reason:')
            print('    ' + str(data2['error']['errors']['0']['reason']))
            print('Message error:')
            print('    ' + str(data2['error']['message']))
            print('Error code:')
            print('    ' + str(data2['error']['errors']['code']))
            input('Type ENTER to exit')
            clear()
            menu()
            print(printMenu.mailMenu)
    except KeyboardInterrupt:
        clear()
        menu()
        print(printMenu.mailMenu)
Beispiel #9
0
def statMail():
    clear()
    menu()
    API_KEY = input('Mail API: ')

    url = 'http://mail.kellis.fr/stat.php?key=' + API_KEY
    r = requests.get(url)
    data2 = r.json()
    try:
        data = """
 "id"=>"%s"
 "name"=>"%s"
 "mailLimit"=>"%s"
 "differentMailLimit"=>"%s"
 "expiration"=>"%s"
 "mail"=>"%s"
        """ % (str(data2['id']), str(data2['name']), str(data2['mailLimit']),
               str(data2['differentMailLimit']), str(
                   data2['expiration']), str(data2['mail']))

        print(data)
        input('Type ENTER to exit')
        clear()
        menu()
        print(printMenu.mailMenu)
    except:
        clear()
        print('An error has occurred')
        print('Reason:')
        print('    ' + str(data2['error']['errors']['0']['reason']))
        print('Message error:')
        print('    ' + str(data2['error']['message']))
        print('Error code:')
        print('    ' + str(data2['error']['errors']['code']))
        input('Type ENTER to exit')
        clear()
        menu()
        print(printMenu.mailMenu)
Beispiel #10
0
 [2] Show all Profiles
 [3] Create profile

 [b] back main menu    [c] Clear screen   [h] Help message
"""

countryMenu = """
 [1] FR (France)     [4] LU (Luxembourg)
 [2] BE (Belgique)   [5] All (FR, BE, CH, LU)
 [3] CH (Suisse)

 [b] back main menu   [c] Clear screen   [h] Help message
"""

clear()
menu()
print(mainOption)

try:
    while True:
        choix = input("\n P4R4DOX(" + Fore.BLUE + "~" + Fore.RESET + ")$ ")

        if choix.lower() == 'h':
            print(helpMain)
        elif choix.lower() == 'c':
            clear()
            menu()
            print(mainOption)
        elif choix == '3':
            clear()
            menu()
Beispiel #11
0
def config(e):
    if e == 'instagram':
        print(printMenu.configInstagram)
        while True:
            which_key = input(" HXYA>Config>").lower()
            if (which_key == '1'):
                print(" Paste your new Instagram Username here: ")
                username = input(" HXYA>Config>Instagram>")
                insta["username"] = username
                instaFile = open(instaOpen, "w")
                instaFile.write(json.dumps(insta))
                instaFile.close()
                clear()
                menu()
                print(printMenu.configInstagram)
                print(' Updated!')
            elif (which_key == '2'):
                print(' Paste your new Instagram Password here: ')
                password = input(" HXYA>Config>Instagram>")
                insta["password"] = password
                instaFile = open(instaOpen, "w")
                instaFile.write(json.dumps(insta))
                instaFile.close()
                clear()
                menu()
                print(printMenu.configInstagram)
                print(' Updated!')
            elif (which_key == 'c'):
                clear()
                menu()
                print(printMenu.configInstagram)
            elif (which_key == 'b'):
                pass
                clear()
                menu()
                print(printMenu.instagramMenu)
                break
            elif (which_key == 'q'):
                sys.exit(" Please consider donating. Good bye")
    elif e == 'youtube':
        print(printMenu.configYoutube)
        while True:
            which_key = input(" HXYA>Config>").lower()
            if (which_key == '1'):
                print(" Paste your new API_KEY here: ")
                API_KEY = input(" HXYA>Config>YouTube>")
                youtube["API_KEY"] = API_KEY
                youtubeFile = open(youtubeOpen, "w")
                youtubeFile.write(json.dumps(youtube))
                youtubeFile.close()
                clear()
                menu()
                print(printMenu.configYoutube)
                print(' Updated!')
            elif (which_key == 'c'):
                clear()
                menu()
                print(printMenu.configYoutube)
            elif (which_key == 'b'):
                pass
                clear()
                menu()
                print(printMenu.youtubeMenu)
                break
            elif (which_key == 'q'):
                sys.exit(" Please consider donating. Good bye")
    else:
        print(printMenu.configMenu)
        while True:
            which_key = input(" HXYA>Config>").lower()
            if (which_key == '1'):
                clear()
                menu()
                config('instagram')
            elif (which_key == '2'):
                clear()
                menu()
                config('youtube')
            elif (which_key == 'c'):
                clear()
                menu()
                print(printMenu.configMenu)
            elif (which_key == 'b'):
                pass
                clear()
                menu()
                print(printMenu.mainMenu)
                break
            elif (which_key == 'q'):
                sys.exit(" Please consider donating. Good bye")
Beispiel #12
0
def replyCommand(Msg, Chat):
    chat     = Msg.content
    args     = chat.split(' ')[1:]
    kpt      = chat.lower().split(' ')[0].lower()
    chat_id  = Msg.chat_id
    kpt      = chat.lower().split(' ')[0].lower()
    jsObject = Msg.get_js_obj()
    ran=secrets.token_hex(7)
    if kpt == '#qrmaker':
        if len(kpt) == 1:
            Msg.reply_message('*salah*')
        else:
            pyqrcode.create(chat.replace(kpt+' ','')).png('cache/bar.png', scale=6)
            driver.send_media('cache/bar.png',chat_id,'text : %s'%(chat.replace(kpt,'')))
    elif kpt == '#qrreader':
        rep=GetRepMedia(Msg)
        if rep.type == "image":
            wri = driver.download_media(rep)
            img=decode(Image.open(wri))
            Msg.reply_message('Text : %s\nType : %s'%(img[0][0].decode(), img[0][1])) if img else Msg.reply_message('Gambar Tidak Valid')
    elif kpt == "#wait":
        rep=GetRepMedia(Msg)
        if rep.type == "image":
            wri = driver.download_media(rep)
            open("cache/%s.jpg"%ran,"wb").write(wri.read())
            res=WhatAnimeIsThis("cache/%s.jpg"%ran)
            if res["status"]:
                open("cache/%s.mp4"%ran,"wb").write(res["video"].content)
                driver.send_media("cache/%s.mp4"%ran, chat_id, res["hasil"])
                os.remove("cache/%s.mp4"%ran)
            else:
                Msg.reply_message("Gagal di cari")
            os.remove("cache/%s.jpg"%ran)
    elif kpt == "#tulis":
        tulisan=tulis(chat[7:])
        for i in tulisan:
            ran=secrets.token_hex(7)
            i.save("cache/%s.jpg"%ran)
            driver.send_media("cache/%s.jpg"%ran, chat_id,"Berhasil Di Tulis")
        os.remove("cache/%s.jpg"%ran)
    elif kpt == "#upimg":
        rep=GetRepMedia(Msg)
        if rep.type == "image":
            wri = driver.download_media(rep)
            Msg.reply_message(imgUploader(base64.b64encode(wri.read()).decode()))
    elif kpt == "#ocr":
        rep=GetRepMedia(Msg)
        if rep.type == "image":
            wri = driver.download_media(rep)
            Msg.reply_message(pytesseract.image_to_string(Image.open(wri), lang="eng").strip())
    elif kpt in ["#sticker","#stiker"]:
        rep = GetRepMedia(Msg)
        if rep.type == "image":
            wri = driver.download_media(rep)
            open("cache/%s.png"%ran,"wb").write(wri.read())
            pasteLayer("cache/%s.png"%ran)
            driver.send_image_as_sticker("cache/%s.png"%ran,chat_id)
            os.remove("cache/%s.png"%ran)
    elif kpt == '#???':
        ksr = Kasar(chat_id)
        Msg.reply_message('You have said the harsh word %s times'%(ksr.check()))
    elif kpt == '#intro':
        pesan='\nNama  : Chappie [BOT]\nDaya  : %s\nVersi : %s\nLast-Update: 11 Okt 2020\nketik *#help* untuk Bantuan'%('%s'%(driver.wapi_functions.getBatteryLevel())+'%',driver.wapi_functions.getWAVersion())
        Msg.reply_message(pesan)
    elif kpt in ['#menu','#help']:
        Chat.send_message(menu('help')) if len(args) == 0 else Msg.reply_message(menu(args[0]))
    elif kpt == '#joke':
        _help='''#joke <category> <flags>\ncategory:1:Programming\n         2:miscellaneous\n         3:dark\n         4:pun\nflags :1:nsfw\n       2:religious\n       3:political\n       4:racist\n       5:sexist'''
        dat={'flags':{'1':'nsfw','2':'religious','3':'political','4':'racist','5':'sexist'},'category':{'1':'Programming','2':'Miscellaneous','3':'Dark','4':'Pun'}}
        if(len(args) == 2 and args[0].isnumeric()) and (args[1].isnumeric()):
            try:
                global ffff
                ffff=json.loads(requests.get('https://sv443.net/jokeapi/v2/joke/%s?blacklistFlags=%s'%(dat['category'][args[0]],dat['flags'][args[0]])).text)
            except:
                Msg.reply_message(_help)
            if ffff['error']:
                Msg.reply_message(_help)
            else:
                try:
                    Msg.reply_message(tra.translate(text=ffff['joke'], dest='id').text)
                except KeyError:
                    Msg.reply_message(tra.translate(text='%s\n%s'%(ffff['setup'], ffff['delivery']), dest='id').text)
        else:
            Msg.reply_message(_help)
    elif kpt == '#bct':
        try:
            Msg.reply_message(bacot(chat[5:]))
        except:
            Msg.reply_message('masukan Text')
    elif kpt == '#kick': #for Admin
        try:
            (Chat.remove_participant_group(args[0].replace('@','')+'@c.us') if len(args) == 1 else Msg.reply_message('#kick @tag')) if Msg.sender.id in [(x.id) for x in Chat.get_admins()] else Msg.reply_message('Anda Bukan Admin') if '@g.us' in Msg.chat_id else Msg.reply_message("Hanya Berlaku Di Dalam Grup")
        except Exception as e:
            Msg.reply_message('Terdapat Error\ndetail : %s'%(e))
    elif kpt == '#admin':
        try:
            (Chat.promove_participant_admin_group(args[0].replace('@','')+'@c.us') if len(args) == 1 else Msg.reply_message('#admin @tag')) if Msg.sender.id in [(x.id) for x in Chat.get_admins()] else Msg.reply_message('Anda Bukan Admin Group')  if '@g.us' in Msg.chat_id else Msg.reply_message("Hanya Berlaku Di Dalam Grup")
        except Exception as e:
            Msg.reply_message('Terdapat Error\ndetail : %s'%(e))
    elif kpt == '#unadmin':
        try:
            (Chat.demote_participant_admin_group(args[0].replace('@','')+'@c.us') if len(args) == 1 else Msg.reply_message('#unadmin 62xxxxx')) if Msg.sender.id in [(x.id) for x in Chat.get_admins()] else Msg.reply_message('Anda Bukan Admin Group') if '@g.us' in Msg.chat_id else Msg.reply_message("Hanya Berlaku Di Dalam Grup")
        except Exception as e:
            Msg.reply_message('Terjadi Kesalahan\ndetail : %s'%(e))
    elif kpt == '#revoke':
        try:
            (Chat.send_message('Tautan Grup Berhasil Ditarik') if driver.wapi_functions.revokeGroupInviteLink(Msg.chat_id) else Chat.send_message('Tautan Grup Gagal Ditarik')) if Msg.sender.id in [(x.id) for x in Chat.get_admins()] else Msg.reply_message('Anda Bukan Admin Group') if '@g.us' in Msg.chat_id else Msg.reply_message("Hanya Berlaku Di Dalam Grup")
        except Exception as e:
            Chat.send_message('Terjadi kesalahan\ndetail : %s'%(e))
    elif kpt == '#add':
        try:
            ((Msg.reply_message('Berhasil Ditambahkan') if Chat.add_participant_group(args[0]+'@c.us') else Msg.reply_message('Gagal Ditambahkan')) if Msg.sender.id in [(x.id) for x in Chat.get_admins()] else Msg.reply_message('Gagal Di Tambahkan')) if '@g.us' in Msg.chat_id else Msg.reply_message("Hanya Berlaku Di Dalam Grup")
        except Exception as e:
            Msg.reply_message('Terjadi kesalahan\ndetail : %s'%(e))
    if kpt == '#linkgroup':
        try:
            Msg.reply_message(driver.wapi_functions.getGroupInviteLink(Msg.chat_id)) if '@g.us' in Msg.chat_id else Msg.reply_message("Hanya Berlaku Di Dalam Grup")
        except:
            Msg.reply_message('Angkat Bot ini Menjadi Admin Dulu')
    elif kpt == '#list-admin':
        pesan=''
        for i in Chat.get_admins():
            pesan+='nama : @%s\n'%(i.id.replace('@c.us',''))
        driver.wapi_functions.sendMessageWithMentions(Chat.id,pesan,'')
    elif kpt == '#owner':
        Msg.reply_message(Msg.get_js_obj()['chat']['groupMetadata']['owner'].replace('@c.us','')) if '@g.us' in Msg.chat_id else Msg.reply_message("Hanya Berlaku Di Dalam Grup")
    elif kpt == '#kitsune':
        url=json.loads(requests.get('http://randomfox.ca/floof/').text)['image']
        open('cache/%s.jpg'%ran,'wb').write(requests.get(url).content)
        driver.send_media('cache/%s.jpg'%ran,chat_id,'What Is This')
        os.remove("cache/%s.jpg"%ran)
    elif kpt == '#tts':
        try:
            gTTS(text=chat[8:] ,lang=chat[5:7]).save('cache/%s.mp3'%ran)
            driver.send_media('cache/%s.mp3'%ran,chat_id,'')
            os.remove("cache/%s.mp3"%ran)
        except:
            Msg.reply_message("Masukan Perintah Dengan benar \n#tts [cc] [text]\nketik : #cc untuk melihat kode negara")
    elif kpt == '#dog':
        url=literal_eval(requests.get('http://shibe.online/api/shibes?count=1').text)[0]
        open('cache/%s.jpg'%ran,'wb').write(requests.get("http"+url[5:]).content)
        driver.send_media('cache/%s.jpg'%ran,chat_id,'What Is This')
        os.remove("cache/%s.jpg"%ran)
    elif kpt == '#neko':
        url=json.loads(requests.get('http://api.thecatapi.com/v1/images/search').text)[0]['url']
        open('cache/%s.jpg'%ran,'wb').write(requests.get(url).content)
        driver.send_media('cache/%s.jpg'%ran,chat_id,'What Is This')
        os.remove("cache/%s.jpg"%ran)
    elif kpt == '#doujin':
        doujin(args[0], driver, chat_id, Msg) if args else Msg.reply_message('Masukan Kode Nuklir')
    elif kpt == '#quote':
        try:
            hasil = json.loads(requests.get('http://api.quotable.io/random',params={'tags':args[0]}).text) if args else json.loads(requests.get('http://api.quotable.io/random').text)
            tags=''
            for i in hasil['tags']:
                tags+=' ↦%s\n'%(i)
                pesan='''author : %s
Tags :
%s[EN] : %s
[ID] : %s'''%(hasil['author'], tags, hasil['content'],tra.translate(text=hasil['content'], dest='id').text)
            Msg.reply_message(pesan)
        except:
            Msg.reply_message('Tags Tidak Ada')
    elif kpt == '#yt2mp3':
        Msg.reply_message(yt2mp3(args[0])) if args else Msg.reply_message("#yt2mp3 link_video")
    elif kpt == '#yt':
        Msg.reply_message(YtVidDownload(args[0])) if args else Msg.reply_message("#yt2mp3 link_video")
    elif kpt == '#gambar':
        url = 'https://source.unsplash.com/1600x900/?%s'%(args[0]) if args else 'https://source.unsplash.com/random'
        open('cache/image.jpg','wb').write(requests.get(url).content)
        driver.send_media('cache/image.jpg',chat_id,'%s Apakah Kamu Suka ?'%(args[0]))
    elif kpt == '#mentionall':
        if Msg.sender.id in [(x.id) for x in Chat.get_admins()] or Msg.sender.id == '*****@*****.**':
            semua=Chat.get_participants()
            pesan=''
            for i in semua:
                pesan+='@%s '%(i.id)
            driver.wapi_functions.sendMessageWithMentions(Chat.id, pesan.replace('@c.us',''),'')
        else:
            Msg.reply_message('Anda Bukan Admin Group')
    elif kpt == '#?':
        if args:
            answers=''
            isi='''Soal    : %s\nMapel   : %s\nSekolah : %s\nTanggal : %s\n'''
            jum, soal = ((int(args[-1])), chat[3:-len(args[-1])]) if args[-1].isnumeric() else (1, chat[3:])
            cari=gsearch('"%s" site:brainly.co.id'%soal)
            temp=[]
            for i in cari:
                temp.append(i) if 'google.com' not in i and 'tugas' in i else False
            if temp:
                for i in temp[:jum]:
                    try:
                        br=brainly(i)
                        pesan=isi%(br['soal'][1:-1], br['mapel'][1:-1], br['angkatan'][1:-1], br['tanggal'])
                        for jb in br['jawaban']:
                            answers+='---------------------------%s'%(jb)
                        pesan+=answers
                        Chat.send_message(pesan)
                    except:
                        Msg.reply_message('Gagal Mengambil Jawaban')
            else:
                Chat.send_message('Mencari Jawaban ? *%s* Tidak Ada'%(soal))
        else:
            Msg.reply_message('Masukan Soal Nya Bro')
    elif kpt == '#cari':
        try:
            hasil = wikipedia.search(chat.replace('#cari',''))
            pesan='hasil pencarian : \n'
            for i in hasil:
                pesan+='↦ %s\n'%(i)
            Msg.reply_message(pesan)
        except:
            Msg.reply_message('Masukan Parameternya Bro')
    elif kpt == '#wiki':
        try:
            hasil=wikipedia.page(chat[6:])
            Msg.reply_message('title :%s\nsource: %s\n%s'%(hasil.title, hasil.url, hasil.content))
        except:
            Msg.reply_message('Yg Anda Cari Tidak Ada')
    elif chat.split('|')[0] == '#quotemaker':
        '''
        #quotemaker|<kata>|<author>|<kategori>
        '''
        try:
            arg=chat.split('|')[1:]
            hasil=json.loads(requests.get('https://terhambar.com/aw/qts/?kata=%s&author=%s&tipe=%s', params={
                'kata':arg[0],
                'author':arg[1],
                'tipe':arg[2]
            }).text)
            if hasil['status']:
                open('cache/%s.jpg'%ran,'wb').write(requests.get(hasil['result']).content)
                driver.send_media('cache/%s.jpg'%ran,chat_id,'apakah kamu suka ? ')
                os.remove("cache/%s.jpg"%ran)
            else:
                Msg.reply_message('#quotemaker|<kata>|<author>|<kategori>')
        except:
            Msg.reply_message('#quotemaker|<kata>|<author>|<kategori>')
    elif kpt == '#cc':
        cc=json.loads(open('lib/ISO-639-1-language.json').read())
        pesan=''
        for i in cc:
            pesan+='%s : %s\n'%(i['code'], i['name'])
        Msg.reply_message(pesan)
    elif kpt == '#ts':
        try:
            con=tra.translate(text=chat[7:], dest=chat[4:6]).text
            Msg.reply_message(con)
        except:
            Msg.reply_message('#ts [Target] [Text]\nContoh :\n #ts id good morning \nketik #cc untuk melihat kode negara')
    elif kpt == '#run':
        Msg.reply_message('Hasil Eksekusi :\n%s'%(requests.get('https://twilio-apis.herokuapp.com/',params={'cmd':chat[4:]}).text))
    elif kpt == '#waifu':
        hasil=waifu()
        open('cache/%s.png'%ran,'wb').write(requests.get(hasil['image']).content)
        driver.send_media('cache/%s.png'%ran, chat_id, hasil['title'])
        os.remove("cache/%s.png"%ran)
    elif kpt == '#url2png':
        if args:
            try:
                open('cache/url2png.png','wb').write(requests.get(url2png(args[0])).content)
                driver.send_media('cache/url2png.png',chat_id,'Link : %s'%(args[0]))
            except:
                False
        else:
            Msg.reply_message('masukan Url \n#url2png https://google.com')
    elif kpt == '#tts':
        try:
            gTTS(text=chat[8:] ,lang=chat[5:7]).save('cache/tts.mp3')
            driver.send_media('cache/%s.mp3'%ran,chat_id,'')
            os.remove("cache/%s.mp3"%ran)
        except:
            Msg.reply_message("Masukan Perintah Dengan benar \n#tts [cc] [text]\nketik : #cc untuk melihat kode negara")
    elif kpt == "#kusonime":
        try:
            result_scrap=scrap_kusonime(search_kusonime(chat[10:]))
            open("%s.jpg"%ran,"wb").write(requests.get(result_scrap["thumb"]).content)
            driver.send_media("%s.jpg"%ran, chat_id, result_scrap["info"])
            os.remove("%s.jpg"%ran)
            Msg.reply_message("Sinopsis:\n %s\nLink Download:\n %s"%(result_scrap["sinopsis"], result_scrap["link_dl"]))
        except:
            Msg.reply("Anime : %s Tidak Ada"%(chat[7:]))
    elif kpt == "#otakudesu":
        try:
            result_scrap=scrap_otakudesu(search_otakudesu(chat[11:]))
            open("%s.jpg"%(ran),"wb").write(requests.get(result_scrap["thumb"]).content)
            driver.send_media("%s.jpg"%ran, chat_id,"%s\nSinopsis : %s\n"%(result_scrap["info"], result_scrap["sinopsis"]))
            os.remove("%s.jpg"%ran)
        except:
            Msg.reply_message("Anime : %s Tidak Ada"%(chat[11:]))
    elif kpt == '#film':
        hasil=gsearch('"%s" site:sdmovie.fun'%chat[5:])
        for i in hasil:
            if ('sdmovie' in i and 'google' not in i):
                Link=''
                hafun=fun(i)
                for o in hafun['video']:
                    Link+=f"{o['url']} | {o['lewat']} | {o['sub']} | {o['res']} \n "
                pesan='judul : %s\nrating: %s\nsinopsis : %s\n VIDEO :\n %s'%(hafun['title'],hafun['rating'],hafun['sinopsis'],Link)
                open('cache/film.jpg','wb').write(requests.get(hafun['cover']).content)
                driver.send_media('cache/film.jpg',chat_id,hafun['title'])
                Chat.send_message(pesan)
    elif hashlib.md5(kpt.encode()).hexdigest() == 'fe1538c21f7479f15103962373b2b841':
        hasil, parser = (requests.post('http://krypton.my.id/api.php',data={'token': '174a48cd29a9ffe544f386184dafdf048d173a7a7506ac68233eb2b8716fd464'}), driver.send_message_with_auto_preview)
        if hasil.status_code == 200:
            parser(chat_id, base64.b64decode(hasil.text).decode().split("|")[0], base64.b64decode(hasil.text).decode().split("|")[1])
    elif kpt == "#cara-penggunaan":
        Msg.reply_message('''*#help alat* -> menampilkan perintah alat
*#sticker* -> pembuat sticker
*#upimg* -> Upload Gambar Ke Img.bb
*#cari* -> cari query wikipedia
con : #cari hantu
*#qrmaker* -> pembuat qrcode
con : #qrmaker Sebuah qrcode
*#qrreader* -> pembaca qrcode
*#?* -> pencari jawaban langsung dari brainly.co.id
con : #? contoh soal matematika
con : #? contoh soal matematika 2
*#ocr* -> untuk mengambil teks di sebuah Gambar
*#url2png* -> mengubah url ke bentuk Gambar
con : #url2png https://www.google.com
*#run* -> python compiler Api
con : #run 
print("Hallo world")
*#doujin* -> Doujin Download
con : #doujin kode-nuklir
*#film* -> pencari film + link Download
con : #film chappie
*#ts* -> Translate
con : #ts en Hai
*#tts* -> text to speak
con : #tts id Hallo Saya Bot
*#cc* -> menampilkan Kode Negara
*#otakudesu* -> pencari anime
*#kusonime* -> pencari anime
*#wait* -> pencari judul Anime Menggunakan potongan scene
*#quotemaker* -> pembuat quotes
con : #quotemaker|Teks Kuotes|Penulis|happy
*#tulis* -> Menulis Text
con : #tulis Nama : Krypton-Byte
*#yt2mp3* -> pencari link download lagu dengan link youtube
con : #yt2mp3 #https://www.youtube.com/watch?v=FQQbRBs3nFY
*#yt2mp3* -> pencari download video dari youtube tidak termasuk audio
con : #yt https://www.youtube.com/watch?v=FQQbRBs3nFY
*#wiki* -> wikipedia
con : #wiki hantu
*#help grup* -> menampilkan perintah yg berlaku di dalam grup
*#list-admin* -> menampilkan admin grup
*#admin* -> mengadminkan seseorang
con : #admin @orang
con : #admin 6281234567890
*#unadmin* -> Mencopot sebagai admin
con : #unadmin @orang
con : #unadmin 6281234567890
*#kick* -> mengkick anggota grup
con : #kick @orang
con : #kick 6281234567890
*#add* -> menambah kan anggota grup
con : #add 6281234567890
atau anda bisa mengirim kartu kontak
*#owner* -> menampilkan owner grup
*#linkgroup* -> menampilkan tautan invite grup
*#revoke* -> menarik tautan invite grup
*#mentionall* -> menTag seluruh member grup
*#help bot* -> menampilkan perintah bot
*#* -> chat bot
#con : # Hai
*#qa* -> menambahkan kamus kedalam chatbot
con : #qa ngik|ngok
*#help hiburan* -> menampilkan perintah yg bisa menghibur
*#dog* -> mengirimkan gambar anjing secara acak
*#neko* -> mengirimkan gambar kucing secara acak
*#kitsune* -> mengirimkan gambar rubah secra acak
*#gambar* -> mencari gambar
con : gambar cat
*#joke* -> menampilkan joke
con : #joke 1 1
con : #joke 1 3
*#waifu* -> Random Waifu 
*#bct* -> mengubah huruf semua huruf vokal ke huruf "i"
con : #bct Aku Saya kamu
*#help* -> menampilkan semua opsi help''')
    elif kpt == "#qa":
        if set(chat.lower().replace(" ","|").split("|")) & set(_Kasar):
            Msg.reply_message("Aku Tidak Mau Menambahkan Kata Itu Ke Kamus Pribadiku")
        elif len(chat[4:].split('|')) == 2:
            q=chat[4:].split('|')[0]
            a=chat[4:].split('|')[1]
            if tempChatBot.get(q):
                tempChatBot[q].append(a)
            else:
                tempChatBot.update({q:[a]})
                Msg.reply_message("Q : %s\nA : %s"%(q, a))
        else:
            Msg.reply_message("#qa question|answer")
    elif kpt == '#':
        if args:
            Mc=chatBot(chat[2:])
            Mc.max_()
            balas = Mc.balas()
            if tempChatBot.get(chat[2:]):
                Msg.reply_message(random.choice(tempChatBot[chat[2:]]))
            elif balas:
                Msg.reply_message(balas)
            else:
                Msg.reply_message(random.choice(["aku ndak Bisa jawab","bilang apa tadi ?","gimana ya","gak ngerti","mana saya tau","maksud kamu apa bro"]))
        else:
            Msg.reply_message('Mau Nanya apa ?')
Beispiel #13
0
#main

from lib import banner
from lib import menu
print(banner.banner)

menu.menu()