Exemple #1
0
def get_acces_token():
	if config.google:
		print '[!] Using google as login..'
		google_data= login.login_google(logins.google_mail,logins.google_password)
		if google_data is not None:
			access_token=google_data['id_token']
			ltype='google'
		else:
			access_token=None
	else:
		print '[!] I am a poketrainer..'
		access_token= login.login_pokemon(logins.pokemon_username,logins.pokemon_password)
		ltype='ptc'
	return access_token,ltype
Exemple #2
0
def main():
	if config.google:
		print '[!] Using google as login..'
		google_data= login.login_google('*****@*****.**','superstrongpassword')
		access_token=google_data['id_token']
	else:
		print '[!] I am a poketrainer..'
		access_token= login.login_pokemon('login_pokemon','superstrongpassword')
	if access_token is not None:
		print '[+] Token:',access_token[:40]+'...'
		new_api= get_api(access_token)
		if 'Milaly432' in use_api(new_api,access_token):
			print '[+] logged in'
		else:
			print '[-] protobuf sux..'
Exemple #3
0
def get_acces_token(usr,pws,type):
	access_token=None
	ltype=None
	if 'goo' in type:
		print '[!] Using google as login..'
		google_data= login.login_google(usr,pws)
		if google_data is not None:
			access_token=google_data['id_token']
			ltype='google'
		else:
			access_token=None
	else:
		print '[!] I am a poketrainer..'
		access_token= login.login_pokemon(usr,pws)
		ltype='ptc'
	return access_token,ltype
Exemple #4
0
def get_acces_token(usr, pws, type):
    access_token = None
    ltype = None
    if 'goo' in type:
        print '[!] Using google as login..'
        google_data = login.login_google(usr, pws)
        if google_data is not None:
            access_token = google_data['id_token']
            ltype = 'google'
        else:
            access_token = None
    else:
        print '[!] I am a poketrainer..'
        access_token = login.login_pokemon(usr, pws)
        ltype = 'ptc'
    return access_token, ltype
Exemple #5
0
def get_acces_token(usr, pws, type):
    access_token = None
    ltype = None
    if "goo" in type:
        print "[!] Using google as login.."
        google_data = login.login_google(usr, pws)
        if google_data is not None:
            access_token = google_data["Auth"]
            ltype = "google"
        else:
            access_token = None
    else:
        print "[!] I am a poketrainer.."
        access_token = login.login_pokemon(usr, pws)
        ltype = "ptc"
    return access_token, ltype
Exemple #6
0
def get_acces_token(usr, pws, type):
    access_token = None
    ltype = None
    if 'goo' in type:
        print '[!] Using google as login..'
        google_data = None
        if platform.system() == 'Windows':
            google_data = login.login_google(usr, pws)
            if google_data is not None:
                access_token = google_data['id_token']
        else:
            access_token = login.login_google_v2(usr, pws)
        if access_token is not None:
            ltype = 'google'
    else:
        print '[!] I am a poketrainer..'
        access_token = login.login_pokemon(usr, pws)
        ltype = 'ptc'
    return access_token, ltype
Exemple #7
0
def get_acces_token(usr,pws,type):
	access_token=None
	ltype=None
	if 'goo' in type:
		print '[!] Using google as login..'
		google_data=None
		if platform.system() == 'Windows':
			google_data= login.login_google(usr,pws)
			if google_data is not None:
				access_token=google_data['id_token']
		else:
			access_token= login.login_google_v2(usr,pws)
		if access_token is not None:
			ltype='google'
	else:
		print '[!] I am a poketrainer..'
		access_token= login.login_pokemon(usr,pws)
		ltype='ptc'
	return access_token,ltype
Exemple #8
0
def get_acces_token(usr, pws, type):
    access_token = None
    ltype = None
    if "goo" in type:
        print "[!] Using google as login.."
        google_data = None
        if platform.system() == "Windows":
            google_data = login.login_google(usr, pws)
            if google_data is not None:
                access_token = google_data["id_token"]
        else:
            access_token = login.login_google_v2(usr, pws)
        if access_token is not None:
            ltype = "google"
    else:
        print "[!] I am a poketrainer.."
        access_token = login.login_pokemon(usr, pws)
        ltype = "ptc"
    return access_token, ltype
Exemple #9
0
def login_via(usr,pwd,type):
    access_token=None
    ltype=None
    try:
        if 'goo' in type:
            print '[!] Using google as login..'
            google_data= login.login_google(usr,pwd)
            if google_data is not None:
                access_token=google_data['id_token']
                ltype='google'
            else:
                access_token=None
        else:
            print '[!] I am a poketrainer..'
            access_token= login.login_pokemon(usr,pwd)
            ltype='ptc'
        return access_token,ltype
    except:
        print '[-] error in login'
        return None
Exemple #10
0
def main():
	if config.google:
		print '[!] Using google as login..'
		google_data= login.login_google(logins.google_mail,logins.google_password)
		if google_data is not None:
			access_token=google_data['id_token']
			ltype='google'
		else:
			access_token=None
	else:
		print '[!] I am a poketrainer..'
		access_token= login.login_pokemon(logins.pokemon_username,logins.pokemon_password)
		ltype='ptc'
	if access_token is not None:
		if config.pub:
			start_work(access_token,ltype)
		else:
			start_private_show(access_token,ltype)
	else:
		print '[-] access_token bad'
Exemple #11
0
def main():
    settings.init()
    parser = argparse.ArgumentParser()

    # If config file exists, load variables from json
    load   = {}
    if os.path.isfile(CONFIG):
        with open(CONFIG) as data:
            load.update(json.load(data))

    # Read passed in Arguments
    required = lambda x: not x in load
    parser.add_argument("-a", "--auth_service", help="Auth Service",
        required=required("auth_service"))
    parser.add_argument("-u", "--username", help="Username", required=required("username"))
    parser.add_argument("-p", "--password", help="Password", required=required("password"))
    parser.add_argument("-l", "--location", help="Location", required=required("location"))
    parser.add_argument("-d", "--debug", help="Debug Mode", action='store_true')
    parser.add_argument("-s", "--client_secret", help="PTC Client Secret")
    parser.set_defaults(DEBUG=True)
    args = parser.parse_args()

    # Passed in arguments shoud trump
    for key in args.__dict__:
        if key in load and args.__dict__[key] == None:
            args.__dict__[key] = load[key]
    # Or
    # args.__dict__.update({key:load[key] for key in load if args.__dict__[key] == None and key in load})

    if args.auth_service not in ['ptc', 'google']:
      print('[!] Invalid Auth service specified')
      return

    if args.debug:
        settings.debug = True
        print('[!] DEBUG mode on')

    if args.client_secret is not None:
        global PTC_CLIENT_SECRET
        PTC_CLIENT_SECRET = args.client_secret

    set_location(args.location)

    if args.auth_service == 'ptc':
        access_token = login_ptc(args.username, args.password)
    else:
        access_token = login_google(args.username, args.password)

    if access_token is None:
        print('[-] Wrong username/password')
        return
    print('[+] RPC Session Token: {} ...'.format(access_token[:25]))

    api_endpoint = get_api_endpoint(args.auth_service, access_token)
    if api_endpoint is None:
        print('[-] RPC server offline')
        return
    print('[+] Received API endpoint: {}'.format(api_endpoint))

    profile = get_profile(args.auth_service, api_endpoint, access_token)
    if profile is not None:
        print('[+] Login successful')

        profile = profile.payload[0].profile
        print('[+] Username: {}'.format(profile.username))

        creation_time = datetime.fromtimestamp(int(profile.creation_time)/1000)
        print('[+] You are playing Pokemon Go since: {}'.format(
            creation_time.strftime('%Y-%m-%d %H:%M:%S'),
        ))

        print('[+] Poke Storage: {}'.format(profile.poke_storage))

        print('[+] Item Storage: {}'.format(profile.item_storage))

        for curr in profile.currency:
            print('[+] {}: {}'.format(curr.type, curr.amount))
    else:
        print('[-] Ooops...')