Exemplo n.º 1
0
def menu():
    os.system("clear")
    banner.banner()
    banner.menu()
    print()
    zet = input("# Get user : "******"/me").find_all("a", string="Teman")
        for x in fr:
            if "friends/center" in x["href"]:
                continue
            else:
                users = run.friendlist(x["href"])
                print()
                start.sorting(users)
    elif zet == "2":
        url = input("# url post: ")
        if "https://www.facebook.com" in url:
            url = url.replace("https://www.facebook.com", '')
        elif "https://m.facebook.com" in url:
            url = url.replace("https://m.facebook.com", '')
        elif "https://mbasic.facebook.com" in url:
            url = url.replace("https://mbasic.facebook.com", '')
        else:
            exit("# url invalid")
        like = run.parser.get(url)
        try:
            react = re.findall('href="(/ufi.*?)"', str(like))[0]
        except IndexError:
            exit("# invalid")
        users = run.likes(react)
        print()
        start.sorting(users)
    elif zet == "3":
        username = run.bysearch("/search/people/?q=" + input("# query : "))
        print()
        start.sorting(username)
    elif zet == '4':
        grub = input("# ID group : ")
        users = run.fromGrub("/browse/group/members/?id=" + grub)
        print()
        if len(users) == 0:
            exit("# wrong Id")
        start.sorting(users)
    elif zet == '5':
        zet = input("# enter username/Id : ")
        if zet.isdigit():
            user = "******" + zet
        else:
            user = "******" + zet
        try:
            user = run.parser.get(user).find('a', string="Teman")["href"]
            username = run.friendlist(user)
            start.sorting(username)
        except TypeError:
            exit("# user not found ")
    elif zet == '6':
        query = input("# Hashtag : ")
        username = run.hashtag("/hashtag/" + query)
        print()
        if len(username) == 0:
            exit("# no results")
        start.sorting(username)
    elif zet == '7':
        r = open("results-check.txt").read().strip()
        c = open("results-life.txt").read().strip()
        res = r + c
        final = set(res.split("\n"))
        print(f"# {str(len(final))} accounts to check")
        start.sorting(final, True)
    else:
        exit("# wrong choice")
Exemplo n.º 2
0
def menu():
    os.system("clear")
    banner.banner()
    print("\n   ! Login as : " + DATA)
    print("   ! Expired  : %s" % user_logged["expired"])
    banner.menu()
    print()
    zet = input("  { ? } Get user : "******"":
        menu()
    elif zet == "1":
        users = run.friendlist(
            url_find(run.parser.get("/profile.php"), 'friends?lst'))
        print()
        start.sorting(users)
    elif zet == "2":
        url = input("  { ? } url post : ")
        if "https://www.facebook.com" in url:
            url = url.replace("https://www.facebook.com", "")
        elif "https://m.facebook.com" in url:
            url = url.replace("https://m.facebook.com", "")
        elif "https://mbasic.facebook.com" in url:
            url = url.replace("https://mbasic.facebook.com", "")
        else:
            exit("  { ! } Url invalid")
        if '/videos/' in url:
            url = url_find(
                run.parser.get(
                    '/watch/?v=' +
                    str(re.findall('(\d+)',
                                   url.split('videos/')[1])[0]) + '&_rdr'),
                '#footer_action_list')[0]
        like = run.parser.get(url)
        try:
            url = url_find(like, 'browser')[0]
        except IndexError:
            exit("  { ! } invalid url")
        users = run.likes(url)
        print()
        if len(users) != 0:
            start.sorting(users)
        else:
            getpass('  { ! } Can\'t dump users from link. Enter...')
            main()
    elif zet == "3":
        username = run.bysearch("/search/people/?q=" +
                                input("  { ? } Query : "))
        if len(username) == 0:
            getpass("  { ! } Can't dump. Please check your account. Enter...")
            menu()
        start.sorting(username)
    elif zet == "4":
        print()
        current = []
        asu = 0
        raw = run.parser.get("/groups/?seemore")
        for group in url_find(raw, "groups", text=True):
            if "category" in str(group["url"]) or "create" in str(
                    group["url"]):
                continue
            else:
                current.append(group["url"].replace("?refid=27", ""))
                asu += 1
            print(f'      [{str(asu)}] {group["text"]}')
        grub = input("  { ? } Select : ")
        choice = "".join(re.findall("\d*", current[int(grub) - 1]))
        users = run.fromGrub("/browse/group/members/?id=" + choice)
        print()
        if len(users) == 0:
            exit("  { ! } Wrong Id")
        start.sorting(users)
    elif zet == "5":
        zet = input(" { ? } Enter username/Id : ")
        if zet.isdigit():
            user = "******" + zet
            tipe = "friends&"
        else:
            user = "******" + zet
            tipe = "friends?"
        try:
            user = run.parser.get(user)
            if "php?rand" in str(user):
                exit("  { ! } User not found")
            user = url_find(user, tipe)
            username = run.friendlist(user[1] if type(user) == list else user)
            if len(user) == 0:
                getpass(
                    "  { ! } Can't dump username. maybe friends has private. Enter..."
                )
            print()
            start.sorting(username)
        except TypeError:
            exit("  { ! } User not found ")
        except IndexError:
            getpass(
                "  { ! } Can't dump username.\n  { ! } your account only takes username from your friendlist only. Enter..."
            )
            menu()
    elif zet == "6":
        query = input("  { ? } Hashtag : ")
        username = run.hashtag("/hashtag/" + query)
        print()
        if len(username) == 0:
            getpass("  { ! } No results. Enter...")
            menu()
        start.sorting(username)
    elif zet == "7":
        check = open("results-check").read() if os.path.exists(
            "results-check") else []
        life = open("results-life").read() if os.path.exists(
            "results-life") else []
        final = check + life
        print("  { ! } %s accounts to check" % str(len(final)))
        start.checker(final)
    else:
        getpass("  { ! } Wrong choice. Enter...")
        menu()