Example #1
0
def main():
    scanners = ['any', 'all', 'numverify', 'ovh', 'footprints']

    banner()

    # Ensure the usage of Python3
    if sys.version_info[0] < 3:
        print("(!) Please run the tool using Python 3")
        sys.exit()

    # If any param is passed, execute help command
    if not len(sys.argv) > 1:
        parser.print_help()
        sys.exit()
    elif args.version:
        print("Version {}".format(__version__))
        sys.exit()

    if not configFile.is_file():
        error("The config file does not exist. Please create it.")
        sys.exit()

    if args.output:
        sys.stdout = Logger()

    # Verify scanner option
    if not args.scanner in scanners:
        print(("Error: scanner doesn't exist."))
        sys.exit()

    if args.number:
        scanNumber(args.number)
    elif args.input:
        for line in args.input.readlines():
            scanNumber(line)
    else:
        parser.print_help()
        sys.exit()

    if args.output:
        args.output.close()

    closeBrowser()
Example #2
0
def main():
    scanners = ['any', 'all', 'numverify', 'ovh', 'footprints']

    if args.update:
        os.system("cd ~ && chmod +x phonia/bin/phonia && phonia/bin/phonia -u")
        sys.exit()

    banner()

    # Ensure the usage of Python3
    if sys.version_info[0] < 3:
        print("(!) Please run the tool using Python 3")
        sys.exit()

    # If any param is passed, execute help command
    if not len(sys.argv) > 1:
        parser.print_help()
        sys.exit()
    elif args.info:
        os.system("cat banner/banner1.txt")
        sys.exit()

    if args.output:
        sys.stdout = Logger()

    # Verify scanner option
    if not args.scanner in scanners:
        print(("Error: scanner doesn't exists."))
        sys.exit()

    if args.number:
        scanNumber(args.number)
    elif args.input:
        for line in args.input.readlines():
            scanNumber(line)
    else:
        parser.print_help()
        sys.exit()

    if args.output:
        args.output.close()

    closeBrowser()
Example #3
0
def youtube_hunt(channel_url):
    banner()

    if not channel_url:
        exit(
            "Please give a valid channel URL.\nExample : https://www.youtube.com/user/PewDiePie"
        )

    if not isfile(config.data_path):
        exit(
            "Please generate cookies and tokens first, with the check_and_gen.py script."
        )

    internal_auth = ""
    internal_token = ""

    cookies = {}

    with open(config.data_path, 'r') as f:
        out = json.loads(f.read())
        internal_auth = out["internal_auth"]
        internal_token = out["keys"]["internal"]
        cookies = out["cookies"]

    if not "PREF" in cookies:
        pref_cookies = {
            "PREF": "tz=Europe.Paris&f6=40000000&hl=en"
        }  # To set the lang in english
        cookies = {**cookies, **pref_cookies}

    client = httpx.Client(cookies=cookies, headers=config.headers)

    is_within_docker = within_docker()
    if is_within_docker:
        print("[+] Docker detected, profile pictures will not be saved.")

    geolocator = Nominatim(user_agent="nominatim")

    print("\n📌 [Youtube channel]")

    channel_data = ytb.get_channel_data(client, channel_url)
    if channel_data:
        is_channel_existing = True
        print(f'[+] Channel name : {channel_data["name"]}\n')
    else:
        is_channel_existing = False
        print(
            "[-] Channel not found.\nSearching for a trace in the archives...\n"
        )

        channel_data = {
            "name": None,
            "description": None,
            "channel_urls": [channel_url],
            "email_contact": False,
            "views": None,
            "joined_date": None,
            "primary_links": [],
            "country": None
        }

    wb_client = wayback.WaybackClient()
    gaiaID = launch_checks(client, wb_client, channel_data)
    if gaiaID:
        print(f"[+] GaiaID => {gaiaID}\n")
    else:
        print("[-] No interesting snapshot found.\n")

    if is_channel_existing:
        if channel_data["email_contact"]:
            print(f'[+] Email on profile : available !')
        else:
            print(f'[-] Email on profile : not available.')
        if channel_data["country"]:
            print(f'[+] Country : {channel_data["country"]}')
        print()
        if channel_data["description"]:
            print(f'🧬 Description : {channel_data["description"]}')
        if channel_data["views"]:
            print(f'🧬 Total views : {channel_data["views"]}')
        if channel_data["joined_date"]:
            print(f'🧬 Joined date : {channel_data["joined_date"]}')

        if channel_data["primary_links"]:
            print(
                f'\n[+] Primary links ({len(channel_data["primary_links"])} found)'
            )
            for primary_link in channel_data["primary_links"]:
                print(f'- {primary_link["title"]} => {primary_link["url"]}')

    if not gaiaID:
        exit()

    print("\n📌 [Google account]")
    # get name & profile picture
    account = get_account_data(client, gaiaID, internal_auth, internal_token,
                               config)
    name = account["name"]

    if name:
        print(f"Name : {name}")

    # profile picture
    profile_pic_url = account.get(
        "profile_pics") and account["profile_pics"][0].url
    req = client.get(profile_pic_url)

    profile_pic_img = Image.open(BytesIO(req.content))
    profile_pic_hash = image_hash(profile_pic_img)
    is_default_profile_pic = detect_default_profile_pic(profile_pic_hash)

    if profile_pic_url:
        req = client.get(profile_pic_url)

        # TODO: make sure it's necessary now
        profile_pic_img = Image.open(BytesIO(req.content))
        profile_pic_flathash = image_hash(profile_pic_img)
        is_default_profile_pic = detect_default_profile_pic(
            profile_pic_flathash)

        if not is_default_profile_pic:
            print("\n[+] Custom profile picture !")
            print(f"=> {profile_pic_url}")
            if config.write_profile_pic and not is_within_docker:
                open(Path(config.profile_pics_dir) / f'{gaiaID}.jpg',
                     'wb').write(req.content)
                print("Profile picture saved !")
        else:
            print("\n[-] Default profile picture")

    # cover profile picture
    cover_pic = account.get("cover_pics") and account["cover_pics"][0]
    if cover_pic and not cover_pic.is_default:
        cover_pic_url = cover_pic.url
        req = client.get(cover_pic_url)

        print("\n[+] Custom profile cover picture !")
        print(f"=> {cover_pic_url}")
        if config.write_profile_pic and not is_within_docker:
            open(Path(config.profile_pics_dir) / f'cover_{gaiaID}.jpg',
                 'wb').write(req.content)
            print("Cover profile picture saved !")

    # reviews
    reviews = gmaps.scrape(gaiaID, client, cookies, config, config.headers,
                           config.regexs["review_loc_by_id"], config.headless)

    if reviews:
        confidence, locations = gmaps.get_confidence(geolocator, reviews,
                                                     config.gmaps_radius)
        print(f"\n[+] Probable location (confidence => {confidence}) :")

        loc_names = []
        for loc in locations:
            loc_names.append(
                f"- {loc['avg']['town']}, {loc['avg']['country']}")

        loc_names = set(loc_names)  # delete duplicates
        for loc in loc_names:
            print(loc)
Example #4
0
def console():
    path = None
    toolpart =None
    #File lists Function
    def mp(path):
        for root,dirs,files in os.walk(path): 
            for f in files: 
                print (f)
    #list Function
    def list():
        print ("\nTools\n===============")
        mp(path)
    try:
    
        while True:
            signal.signal(signal.SIGINT,controlc_signal)
            #Get PWD
            getcwd = os.getcwd()
            getdir = getcwd.split("/")
            pwd =  getdir[-1]
            #Get LocalHost Name
            plat = platform.node()
            #Nothing Special :)
            point = "→"
            #Check Tools Part Directory
            if path == None:
                None
            else:
                pth = path.split("/")
                toolpart = pth[-2]
            #Promot
            option = input (Fore.RESET+"\n[SSF@%s](%s){%s} %s "%(plat,pwd,toolpart,point))
            
            option2 = option.split(" ")
            #Conditions
            if option2[0] == "cd":
                
                def cd(path):
                    os.chdir(os.path.expanduser(path))
                try:
                    cd(option2[1])
                
                except:
                    print ("ERROR: No such file or directory: ",option2[1])
            elif option2[0] == 'run':
                
                    try:
                        
                        if option == "run":
                            print ("enter help to see how to use this command")
                        else:
                            run = option.split("run ")[1]
                            run2 = path+run
                            #exec(open(run2).read())
                            exst = os.path.isfile(run2) 
                            if exst:
                                os.system(run2)
                            else :
                                print ("Cannot find executable file")
                    except:
                        print ("Error !!!")
            
            elif option2[0] == 'use':
                try:
                    check = "/opt/sandsploit/module/%s/"%option2[1]
                    exist = os.path.isdir(check) 
                    if exist:
                        path = check
                    else:
                        print ("Part not Found")
                    
                except:
                    print ("Part Not Found")
            elif option == 'list':
                if path == None:
                    print("\nTools\n===============")
                    print ("Tools NotFound")
                else:
                    list()


            elif option == 'help':
                #Menu
                print ('''

Command     Description
========    ============
banner      Change Banner
bash        Run Bash Shell
list        List of tools for each section
listener    Sniffing Port
python      Interactive Shell(Debuging Purposes)
RSMaker     Make Reverse Shell For Desktop Operating Systems
run         Run Tools In modules
use         Interact With Different Parts of Penetration Testing Tools
version     Show version of SandSploit
upgrade     Full Upgrade Freamworks
update      Update Exploits & Scripts Parts
exit        Exit From SSF
                ''')
            elif option == "version":
                version()
            elif option == "update":
                update()
            elif option == "upgrade":
                upgrade()
            elif option == "banner":
                banner()
            elif option == "RSMaker":
                RSMaker()
            elif option == "listener":
                listener()
            elif option == "exit":
                sys.exit()
            else:
                os.system(option)

    except EnvironmentError:
        print ("\nUnknown Error......")
        print ("Enter ""help"" to show commands....")
        console()
Example #5
0
parser.add_argument("--verbose",
                    action="store_true",
                    help="Verbosity of the output")
parser.add_argument("--debug",
                    action="store_true",
                    help="Enable debugging, will spam.")
mutually_exclusive.add_argument("--list-email-schemes",
                                action="store_true",
                                help="List available email schemes")
mutually_exclusive.add_argument("--version",
                                action="store_true",
                                help="Print current version")
args = parser.parse_args()

if args.version:
    banner.banner()
    quit()

if args.list_email_schemes:
    for scheme, example in naming_scheme.email_schemes.items():
        print('%s:%s' % (scheme, logger.BLUE(example)))
    quit()

# The most important part...
banner.banner()

if args.verbose:
    logger.verbose_switch = True
    logger.debug_switch = False

if args.debug:
Example #6
0
from os.path import isfile

import httpx
from PIL import Image
from geopy.geocoders import Nominatim

from lib.banner import banner
import lib.gmaps as gmaps
import lib.youtube as ytb
import config
from lib.photos import gpics
from lib.utils import *

if __name__ == "__main__":

    banner()

    if len(sys.argv) <= 1:
        exit("Please put an email address.")

    if not isfile(config.data_path):
        exit("Please generate cookies and tokens first.")

    email = sys.argv[1]
    auth = ""
    hangouts_token = ""
    cookies = ""

    with open(config.data_path, 'r') as f:
        out = json.loads(f.read())
        auth = out["auth"]
Example #7
0
def termux_console():
    try:

        while True:
            getcwd = os.getcwd()
            getdir = getcwd.split("/")
            pwd = getdir[-1]
            plat = platform.node()
            point = "→"

            option = input(Fore.RESET + "\n[SSF@%s](%s) %s " %
                           (plat, pwd, point))

            option2 = option.split(" ")
            if option2[0] == "cd":

                def cd(path):
                    os.chdir(os.path.expanduser(path))

                try:
                    cd(option2[1])

                except:
                    print("ERROR: No such file or directory: ", option2[1])
            elif option2[0] == 'run':

                try:

                    if option == "run":
                        print("enter help to see how to use this command")
                    else:
                        run = option.split("run ")[1]
                        os.system("./" + run)
                except:
                    print("No file to execute")

            elif option2[0] == 'use':
                try:
                    os.chdir(
                        "/data/data/com.termux/files/usr/opt/sandsploit/module/"
                        + option2[1])
                except:
                    print("Part Not Found")

            elif option == 'help':
                print('''

Command     Description
========    ============
banner      Change Banner
bash        Run Bash Shell
listener    Sniffing Port
python      Interactive Shell(Debuging Purposes)
RSMaker     Make Reverse Shell For Desktop Operating Systems
run         Run Exploits & Tools
use         Interact with one of the two sections of Tools or exploits
version     Show version of SandSploit
upgrade     Full Upgrade Freamworks
update      Update Exploits & Scripts Parts
exit        Exit From SSF
                ''')
            elif option == "version":
                version()
            elif option == "update":
                update()
            elif option == "upgrade":
                upgrade()
            elif option == "banner":
                banner()
            elif option == "RSMaker":
                RSMaker()
            elif option == "listener":
                listener()
                Commands()
            elif option == "exit":
                break
            else:
                os.system(option)

    except EnvironmentError:
        print("\nUnknown Error......")
        print("Enter " "help" " to show commands....")
        Commands()
    except KeyboardInterrupt:
        print("\nInterrupt: use the 'exit' command to quit")
        Commands()
Example #8
0
def doc_hunt(doc_link):
    banner()

    tmprinter = TMPrinter()

    if not doc_link:
        exit(
            "Please give the link to a Google resource.\nExample : https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms"
        )

    is_within_docker = within_docker()
    if is_within_docker:
        print("[+] Docker detected, profile pictures will not be saved.")

    doc_id = ''.join(
        [x for x in doc_link.split("?")[0].split("/") if len(x) in (33, 44)])
    if doc_id:
        print(f"\nDocument ID : {doc_id}\n")
    else:
        exit(
            "\nDocument ID not found.\nPlease make sure you have something that looks like this in your link :\1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms"
        )

    if not isfile(config.data_path):
        exit(
            "Please generate cookies and tokens first, with the check_and_gen.py script."
        )

    internal_token = ""
    cookies = {}

    with open(config.data_path, 'r') as f:
        out = json.loads(f.read())
        internal_token = out["keys"]["internal"]
        cookies = out["cookies"]

    headers = {**config.headers, **{"X-Origin": "https://drive.google.com"}}
    client = httpx.Client(cookies=cookies, headers=headers)

    url = f"https://clients6.google.com/drive/v2beta/files/{doc_id}?fields=alternateLink%2CcopyRequiresWriterPermission%2CcreatedDate%2Cdescription%2CdriveId%2CfileSize%2CiconLink%2Cid%2Clabels(starred%2C%20trashed)%2ClastViewedByMeDate%2CmodifiedDate%2Cshared%2CteamDriveId%2CuserPermission(id%2Cname%2CemailAddress%2Cdomain%2Crole%2CadditionalRoles%2CphotoLink%2Ctype%2CwithLink)%2Cpermissions(id%2Cname%2CemailAddress%2Cdomain%2Crole%2CadditionalRoles%2CphotoLink%2Ctype%2CwithLink)%2Cparents(id)%2Ccapabilities(canMoveItemWithinDrive%2CcanMoveItemOutOfDrive%2CcanMoveItemOutOfTeamDrive%2CcanAddChildren%2CcanEdit%2CcanDownload%2CcanComment%2CcanMoveChildrenWithinDrive%2CcanRename%2CcanRemoveChildren%2CcanMoveItemIntoTeamDrive)%2Ckind&supportsTeamDrives=true&enforceSingleParent=true&key={internal_token}"

    retries = 100
    for retry in range(retries):
        req = client.get(url)
        if "File not found" in req.text:
            exit("[-] This file does not exist or is not public")
        elif "rateLimitExceeded" in req.text:
            tmprinter.out(
                f"[-] Rate-limit detected, retrying... {retry+1}/{retries}")
            continue
        else:
            break
    else:
        tmprinter.clear()
        exit("[-] Rate-limit exceeded. Try again later.")

    if '"reason": "keyInvalid"' in req.text:
        exit("[-] Your key is invalid, try regenerating your cookies & keys.")

    tmprinter.clear()
    data = json.loads(req.text)

    # Extracting informations

    # Dates

    created_date = datetime.strptime(data["createdDate"],
                                     '%Y-%m-%dT%H:%M:%S.%fz')
    modified_date = datetime.strptime(data["modifiedDate"],
                                      '%Y-%m-%dT%H:%M:%S.%fz')

    print(
        f"[+] Creation date : {created_date.strftime('%Y/%m/%d %H:%M:%S')} (UTC)"
    )
    print(
        f"[+] Last edit date : {modified_date.strftime('%Y/%m/%d %H:%M:%S')} (UTC)"
    )

    # Permissions

    user_permissions = []
    if data["userPermission"]:
        if data["userPermission"]["id"] == "me":
            user_permissions.append(data["userPermission"]["role"])
            if "additionalRoles" in data["userPermission"]:
                user_permissions += data["userPermission"]["additionalRoles"]

    public_permissions = []
    owner = None
    for permission in data["permissions"]:
        if permission["id"] in ["anyoneWithLink", "anyone"]:
            public_permissions.append(permission["role"])
            if "additionalRoles" in data["permissions"]:
                public_permissions += permission["additionalRoles"]
        elif permission["role"] == "owner":
            owner = permission

    print("\nPublic permissions :")
    for permission in public_permissions:
        print(f"- {permission}")

    if public_permissions != user_permissions:
        print("[+] You have special permissions :")
        for permission in user_permissions:
            print(f"- {permission}")

    if owner:
        print("\n[+] Owner found !\n")
        print(f"Name : {owner['name']}")
        print(f"Email : {owner['emailAddress']}")
        print(f"Google ID : {owner['id']}")

        # profile picture
        profile_pic_link = owner['photoLink']
        req = client.get(profile_pic_link)

        profile_pic_img = Image.open(BytesIO(req.content))
        profile_pic_flathash = image_hash(profile_pic_img)
        is_default_profile_pic = detect_default_profile_pic(
            profile_pic_flathash)

        if not is_default_profile_pic and not is_within_docker:
            print("\n[+] Custom profile picture !")
            print(f"=> {profile_pic_link}")
            if config.write_profile_pic and not is_within_docker:
                open(
                    Path(config.profile_pics_dir) /
                    f'{owner["emailAddress"]}.jpg', 'wb').write(req.content)
                print("Profile picture saved !\n")
        else:
            print("\n[-] Default profile picture\n")
Example #9
0
def gaia_hunt(gaiaID):
    banner()

    if not gaiaID:
        exit("Please give a valid GaiaID.\nExample : 113127526941309521065")

    if not isfile(config.data_path):
        exit(
            "Please generate cookies and tokens first, with the check_and_gen.py script."
        )

    internal_auth = ""
    internal_token = ""

    cookies = {}

    with open(config.data_path, 'r') as f:
        out = json.loads(f.read())
        internal_auth = out["internal_auth"]
        internal_token = out["keys"]["internal"]
        cookies = out["cookies"]

    client = httpx.Client(cookies=cookies, headers=config.headers)

    account = get_account_data(client, gaiaID, internal_auth, internal_token,
                               config)
    if not account:
        exit("[-] No account linked to this Gaia ID.")

    is_within_docker = within_docker()
    if is_within_docker:
        print("[+] Docker detected, profile pictures will not be saved.")

    geolocator = Nominatim(user_agent="nominatim")

    # get name & profile picture

    name = account["name"]

    if name:
        print(f"Name : {name}")

    # profile picture
    profile_pic_url = account["profile_pic_url"]
    req = client.get(profile_pic_url)

    profile_pic_img = Image.open(BytesIO(req.content))
    profile_pic_hash = image_hash(profile_pic_img)
    is_default_profile_pic = detect_default_profile_pic(profile_pic_hash)

    if not is_default_profile_pic and not is_within_docker:
        print("\n[+] Custom profile picture !")
        print(f"=> {profile_pic_url}")
        if config.write_profile_pic and not is_within_docker:
            open(Path(config.profile_pics_dir) / f'{gaiaID}.jpg',
                 'wb').write(req.content)
            print("Profile picture saved !")
    else:
        print("\n[-] Default profile picture")

    print(f"\nGaia ID : {gaiaID}")

    # check YouTube
    if name:
        confidence = None
        data = ytb.get_channels(client, name, config.data_path,
                                config.gdocs_public_doc)
        if not data:
            print("\n[-] YouTube channel not found.")
        else:
            confidence, channels = ytb.get_confidence(data, name,
                                                      profile_pic_hash)

            if confidence:
                print(f"\n[+] YouTube channel (confidence => {confidence}%) :")
                for channel in channels:
                    print(f"- [{channel['name']}] {channel['profile_url']}")
                possible_usernames = ytb.extract_usernames(channels)
                if possible_usernames:
                    print("\n[+] Possible usernames found :")
                    for username in possible_usernames:
                        print(f"- {username}")
            else:
                print("\n[-] YouTube channel not found.")

    # reviews
    reviews = gmaps.scrape(gaiaID, client, cookies, config, config.headers,
                           config.regexs["review_loc_by_id"], config.headless)

    if reviews:
        confidence, locations = gmaps.get_confidence(geolocator, reviews,
                                                     config.gmaps_radius)
        print(f"\n[+] Probable location (confidence => {confidence}) :")

        loc_names = []
        for loc in locations:
            loc_names.append(
                f"- {loc['avg']['town']}, {loc['avg']['country']}")

        loc_names = set(loc_names)  # delete duplicates
        for loc in loc_names:
            print(loc)
Example #10
0
    def test_banner(self, printMock):
        banner()

        self.assertEqual(printMock.call_count, 9)
Example #11
0
def email_hunt(email):
    banner()

    if not email:
        exit("Please give a valid email.\nExample : [email protected]")

    if not isfile(config.data_path):
        exit(
            "Please generate cookies and tokens first, with the check_and_gen.py script."
        )

    hangouts_auth = ""
    hangouts_token = ""
    internal_auth = ""
    internal_token = ""

    cookies = {}

    with open(config.data_path, 'r') as f:
        out = json.loads(f.read())
        hangouts_auth = out["hangouts_auth"]
        hangouts_token = out["keys"]["hangouts"]
        internal_auth = out["internal_auth"]
        internal_token = out["keys"]["internal"]
        cookies = out["cookies"]

    client = httpx.Client(cookies=cookies, headers=config.headers)

    data = is_email_google_account(client, hangouts_auth, cookies, email,
                                   hangouts_token)

    is_within_docker = within_docker()
    if is_within_docker:
        print("[+] Docker detected, profile pictures will not be saved.")

    geolocator = Nominatim(user_agent="nominatim")
    print(f"[+] {len(data['matches'])} account found !")

    for user in data["matches"]:
        print("\n------------------------------\n")

        gaiaID = user["personId"][0]
        email = user["lookupId"]
        infos = data["people"][gaiaID]

        # get name
        name = get_account_name(client, gaiaID, internal_auth, internal_token,
                                cookies, config)
        if name:
            print(f"Name : {name}")
        else:
            if "name" not in infos:
                print("[-] Couldn't find name")
            else:
                for i in range(len(infos["name"])):
                    if 'displayName' in infos['name'][i].keys():
                        name = infos["name"][i]["displayName"]
                        print(f"Name : {name}")

        # profile picture
        profile_pic_link = infos["photo"][0]["url"]
        req = client.get(profile_pic_link)

        profile_pic_img = Image.open(BytesIO(req.content))
        profile_pic_hash = image_hash(profile_pic_img)
        is_default_profile_pic = detect_default_profile_pic(profile_pic_hash)

        if not is_default_profile_pic and not is_within_docker:
            print("\n[+] Custom profile picture !")
            print(f"=> {profile_pic_link}")
            if config.write_profile_pic and not is_within_docker:
                open(Path(config.profile_pics_dir) / f'{email}.jpg',
                     'wb').write(req.content)
                print("Profile picture saved !")
        else:
            print("\n[-] Default profile picture")

        # last edit
        try:
            timestamp = int(infos["metadata"]["lastUpdateTimeMicros"][:-3])
            last_edit = datetime.utcfromtimestamp(timestamp).strftime(
                "%Y/%m/%d %H:%M:%S (UTC)")
            print(f"\nLast profile edit : {last_edit}")
        except KeyError:
            last_edit = None
            print(f"\nLast profile edit : Not found")
        print(f"\nEmail : {email}\nGoogle ID : {gaiaID}\n")

        # is bot?
        profile_pic = infos["photo"][0]["url"]
        if "extendedData" in infos:
            isBot = infos["extendedData"]["hangoutsExtendedData"]["isBot"]
            if isBot:
                print("Hangouts Bot : Yes !")
            else:
                print("Hangouts Bot : No")
        else:
            print("Hangouts Bot : Unknown")

        # decide to check YouTube
        ytb_hunt = False
        try:
            services = [
                x["appType"].lower()
                if x["appType"].lower() != "babel" else "hangouts"
                for x in infos["inAppReachability"]
            ]
            if name and (config.ytb_hunt_always or "youtube" in services):
                ytb_hunt = True
            print("\n[+] Activated Google services :")
            print('\n'.join(["- " + x.capitalize() for x in services]))

        except KeyError:
            ytb_hunt = True
            print("\n[-] Unable to fetch connected Google services.")

        # check YouTube
        if name and ytb_hunt:
            confidence = None
            data = ytb.get_channels(client, name, config.data_path,
                                    config.gdocs_public_doc)
            if not data:
                print("\n[-] YouTube channel not found.")
            else:
                confidence, channels = ytb.get_confidence(
                    data, name, profile_pic_hash)

                if confidence:
                    print(
                        f"\n[+] YouTube channel (confidence => {confidence}%) :"
                    )
                    for channel in channels:
                        print(
                            f"- [{channel['name']}] {channel['profile_url']}")
                    possible_usernames = ytb.extract_usernames(channels)
                    if possible_usernames:
                        print("\n[+] Possible usernames found :")
                        for username in possible_usernames:
                            print(f"- {username}")
                else:
                    print("\n[-] YouTube channel not found.")

        # TODO: return gpics function output here
        #gpics(gaiaID, client, cookies, config.headers, config.regexs["albums"], config.regexs["photos"],
        #      config.headless)

        # reviews
        reviews = gmaps.scrape(gaiaID, client, cookies, config, config.headers,
                               config.regexs["review_loc_by_id"],
                               config.headless)

        if reviews:
            confidence, locations = gmaps.get_confidence(
                reviews, config.gmaps_radius)
            print(f"\n[+] Probable location (confidence => {confidence}) :")

            loc_names = []
            for loc in locations:
                loc_names.append(
                    f"- {loc['avg']['town']}, {loc['avg']['country']}")

            loc_names = set(loc_names)  # delete duplicates
            for loc in loc_names:
                print(loc)

    # Google Calendar
        calendar_response = gcalendar.fetch(email, client, config)
        if calendar_response:
            print("[+] Public Google Calendar found !")
            events = calendar_response["events"]
            if events:
                gcalendar.out(events)
            else:
                print("=> No recent events found.")
        else:
            print("[-] No public Google Calendar.")
Example #12
0
def main():
    banner()
    usage()
Example #13
0
def email_hunt(email, items=None):
    """
    {
        "email": "*****@*****.**",
        "matches": [{
            "user_name": "lsss",
            "profile_imag_url": "",
            "last_profile_update_time": "2021-05-11 22:39:36.727355",
            "google_id": 107640112940428892434,
            "is_default_profile_pic": True,
            "is_hangout_bot": null,
            "activated_google_services": [],
            "youtube": {
                "channel": [],
                "confidence": null,
                "possible_user_names": []
            },
            "maps": {
                "confidence": null,
                "location_names": []
            },
            "calendar": [{
                "title": "title",
                "start_utc_dt": "2021-05-11 22:39:36.727359",
                "duration": "xxxxx"
            }]
        }]
    }
    :param email:
    :param items:
    :return:
    """
    banner()
    res = dict(email=email)
    if not email:
        raise Exception(
            "Please give a valid email.\nExample : [email protected]")

    if not isfile(config.data_path):
        raise Exception(
            "Please generate cookies and tokens first, with the check_and_gen.py script."
        )

    with open(config.data_path, 'r') as f:
        out = json.loads(f.read())
        hangouts_auth = out["hangouts_auth"]
        hangouts_token = out["keys"]["hangouts"]
        internal_auth = out["internal_auth"]
        internal_token = out["keys"]["internal"]
        cookies = out["cookies"]

    client = httpx.Client(cookies=cookies, headers=config.headers)

    data = is_email_google_account(client, hangouts_auth, cookies, email,
                                   hangouts_token)

    res['matches'] = []
    for user in data["matches"]:
        u = user_extract(user, data, client, internal_auth, internal_token,
                         cookies, items)
        res['matches'].append(u)
    return res
Example #14
0
try:
    import bs4
    import requests
except:
    import os
    try:
        os.system('pip install bs4')
        os.system('pip install requests')
        print 'TRY AGENT'
        exit()
    except:
        print 'pip install bs4 ; no mmodule named BeautifulSoup.try agent'
        print 'pip install bs4 ; no mmodule named requests.try agent'
        exit()
import lib.banner as BANNER
BANNER.banner()
import lib.Guide as HELP
import lib.About as About
import lib.check as Signat
import signal
import sys
# import modules for work with tool
import master.asm_information as INFO
# import modules for colors
from lib.color.dtectcolors import Style, Fore, Back, init
init()
W = Style.BRIGHT + Fore.WHITE  # white
GR = Style.DIM + Fore.WHITE  # gray
C = Style.BRIGHT + Fore.GREEN  # green
R = Fore.RED  # red
B = Fore.BLUE  # blue