Giter Club home page Giter Club logo

pgoapi's People

Contributors

cheesynoob avatar dmadisetti avatar ephemerality avatar ezcgman avatar friscomad avatar globeriz avatar jchristi avatar john-best avatar keyphact avatar mikeres0 avatar mjuchli avatar myntath avatar noctem avatar noone-dev avatar nullpixel avatar primaxius avatar rahu1994 avatar rbignon avatar robhobbes avatar ryanhope avatar samuelteixeiras avatar sebastienvercammen avatar sloppydrive avatar spezifisch avatar sttug avatar talsk avatar tejado avatar wcastello avatar wchill avatar zechrales avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pgoapi's Issues

Server response timeout

It's great idea to raise exception when server is not responding for some time. As I understood it is not implemented. I've got several stucks after sending a request.

get_inventory get not all IV-attributes

some pokemons not have one of three iv-attributes.
e.g. some pokemons have only individual_attack, individual_defense or individual_attack, individual_stamina or individual_defense, individual_stamina

How to use get_gym_details function?

I try to use get_gym_details to collect some info on the gyms around me but I can't figure how to use the function.
I tried this :

    gym={
        'gid':'0d39156d87f74263ac595d3ab2a2f728.16',
        'glatitude':45.876373,
        'glongitude':4.713474
        }
response= api.get_gym_details(gym_id = gym['gid'], gym_latitude = gym['glatitude'], gym_longitude = gym['glongitude'])
print('Response : \n\r{}'.format(pprint.PrettyPrinter(indent=4).pformat(response)))

But all I get is this:

...
[ INFO] Login process completed
[ INFO] Creating a new direct request...
[ INFO] Adding 'GET_GYM_DETAILS' to RPC request including arguments
[ INFO] Execution of RPC
[ INFO] Cleanup of request!
Response : 
{   'request_id': 746011827811372547L,
    'responses': {   'GET_GYM_DETAILS': {   'result': 2}},
    'status_code': 1}

Any idea on how to do a proper get_gym_details request please?

Unsure of how to get server running

Hello All,

I think i have most of this setup but when i use the command:

C:\Users\USER\Desktop\pgoapi-master>"C:\Python27\python.exe" pokecli.py -a google -u [email protected] -p PASSWORD -l "MY LOCATION"

it looks like its running and at the end i get this:
'status': 1}},
'status_code': 2,
'unknown6': [{ 'response_type': 6, 'unknown2': { 'unknown1': 1L}}]}

Is this whats suppose to happen? When i try to open localhost:5000 is shows nothing is running.

What am i doing wrong?

I've got it working on Digital Ocean if anyone needs help!

If you are able to sign up for a Digital Ocean account? < Digital ocean referral link removed > you can get two months free and I can walk you through the steps. Step-by-step. I've got mine working and it's never felt so good to see Pokémon again!

Get_map_objects() sometimes raises IndexError

Sometimes, when using get_map_objects(), you get a dictionary back containing 'api_url' and 'auth_ticket'.

This wouldn't be so bad, except that it also causes an IndexError in rpc_api (_parse_sub_responses())

Example dictionary response:

Response dictionary (get_map_objects):
{   'api_url': u'pgorelease.nianticlabs.com/plfe/91',
    'auth_ticket': {   'end': 'HOIAGtMderProabH98FTQA==',
                       'expire_timestamp_ms': 1470612830988L,
                       'start': 'Ko8EZronBJEfhyUJMIICjve/9mpK59Cy301qmd5Wl/DERPx14+ffm7QKBayA2BIwF6w4d6gVSgrYbHEeGBZ1hnu8l+bzyfShXm8KAllq+r4='}
,
    'request_id': 311523737411100314L,
    'responses': {   'GET_MAP_OBJECTS': {   'map_cells': [   {   'current_timestamp_ms': 1470617030988L,
                                                                 's2_cell_id': 5170455928213864448L},
                                                             {   'current_timestamp_ms': 1470617030988L,
                                                                 's2_cell_id': 5170455936803799040L},
                                                             {   'current_timestamp_ms': 1470617030988L,
                                                                 's2_cell_id': 5170455930361348096L},
                                                             {   'current_timestamp_ms': 1470617030988L,
                                                                 's2_cell_id': 5170455943246249984L},
                                                             {   'current_timestamp_ms': 1470617030988L,
                                                                 's2_cell_id': 5170455945393733632L},
                                                             {   'current_timestamp_ms': 1470617030988L,
                                                                 's2_cell_id': 5170455938951282688L},
                                                             {   'current_timestamp_ms': 1470617030988L,
                                                                 's2_cell_id': 5170455941098766336L},
                                                             {   'current_timestamp_ms': 1470617030988L,
                                                                 's2_cell_id': 5170455969016053760L},
                                                             {   'current_timestamp_ms': 1470617030988L,
                                                                 's2_cell_id': 5170455966868570112L}],
                                            'status': 1}},
    'status_code': 2}

cffi version mismatch?

Reproduce:
If I reinstall python3.5, everything works and runs okay, I then have to reinstall ubuntu-desktop, and then I get this error again.

Using ubuntu 16.04 x64
Python 3.5.2

Traceback (most recent call last):
File "/home/jjordan/PycharmProjects/PokeBuddy/src/application.py", line 4, in
import pgoapi
File "/usr/local/lib/python3.5/dist-packages/pgoapi-1.1.6-py3.5.egg/pgoapi/init.py", line 50, in
from pgoapi.pgoapi import PGoApi
File "/usr/local/lib/python3.5/dist-packages/pgoapi-1.1.6-py3.5.egg/pgoapi/pgoapi.py", line 36, in
from pgoapi.auth_google import AuthGoogle
File "/usr/local/lib/python3.5/dist-packages/pgoapi-1.1.6-py3.5.egg/pgoapi/auth_google.py", line 33, in
from gpsoauth import perform_master_login, perform_oauth
File "/usr/local/lib/python3.5/dist-packages/gpsoauth/init.py", line 4, in
from . import google
File "/usr/local/lib/python3.5/dist-packages/gpsoauth/google.py", line 4, in
from Cryptodome.PublicKey import RSA
File "/usr/local/lib/python3.5/dist-packages/Cryptodome/PublicKey/RSA.py", line 79, in
from Cryptodome.IO import PKCS8, PEM
File "/usr/local/lib/python3.5/dist-packages/Cryptodome/IO/PKCS8.py", line 73, in
from Cryptodome.IO._PBES import PBES1, PBES2, PbesError
File "/usr/local/lib/python3.5/dist-packages/Cryptodome/IO/_PBES.py", line 44, in
from Cryptodome.Cipher import DES, ARC2, DES3, AES
File "/usr/local/lib/python3.5/dist-packages/Cryptodome/Cipher/init.py", line 78, in
from Cryptodome.Cipher._mode_ecb import _create_ecb_cipher
File "/usr/local/lib/python3.5/dist-packages/Cryptodome/Cipher/_mode_ecb.py", line 29, in
from Cryptodome.Util._raw_api import (load_pycryptodome_raw_lib,
File "/usr/local/lib/python3.5/dist-packages/Cryptodome/Util/_raw_api.py", line 39, in
ffi = FFI()
File "/usr/local/lib/python3.5/dist-packages/cffi/api.py", line 59, in init
"version mismatch, %s != %s" % (backend.version, version)
AssertionError: version mismatch, 1.5.2 != 1.7.0

wrong Encounter info on linux

I am not sure this can be reproduced elsewhere.
On my mac, the response of encounter API is correct but on a ubuntu machine, it is not showing correctly. Maybe it parse things wrongly?

This is the response:

{ 'capture_probability': { 'capture_probability': [1.0, 1.0, 1.0],
                           'pokeball_type': [1, 2, 3]},
  'status': 1,
  'wild_pokemon': { 'encounter_id': 9275090450558422109L,
                    'last_modified_timestamp_ms': 1470771341319L,
                    'latitude': 52.201168307877744,
                    'longitude': 0.11872760333660051,
                    'pokemon_data': { 'cp': 10,
                                      'cp_multiplier': 0.09399999678134918,
                                      'height_m': 0.27810928225517273,
                                      'individual_defense': 14,
                                      'individual_stamina': 13,
                                      'move_1': 201,
                                      'move_2': 133,
                                      'pokemon_id': 13,
                                      'stamina': 10,
                                      'stamina_max': 10,
                                      'weight_kg': 2.9228644371032715},
                    'spawn_point_id': u'47d870a2c87',
                    'time_till_hidden_ms': 889557}}

You can see the the capture_probability are all always 1.0.
And also, I found that the cp_multiplier is always 0.09399999678134918.

But these things are correct when I run on a osx machine.

Still not seeing forts

Hi there, I am using my own script to farm a nearby PokeStop but I can't see anything using the get_map_objects.

Is there anything different I should do to use the new proto correctly?

can't find anything anywhere

Hi, I'm using the demo spiral_poi_search.py, I correctly logged in, it took my username and the location, but it can't find anything.

Returning strings when bytes are needed

I don't know what I'm doing wrong but I've been fixing str/bytes type inversions for an hour now. In this case, I'm not sure what to change to get it working. I 've got the encrypt.dll from some map's github.

This is my traceback:

Traceback (most recent call last):
  File "pokecli.py", line 133, in <module>
    main()
  File "pokecli.py", line 128, in main
    response_dict = api.get_map_objects(latitude =position[0], longitude = position[1], since_timestamp_ms = timestamps, cell_id = cell_ids)
  File "C:\Users\MrManiak\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pgoapi\pgoapi.py", line 121, in function
    return request.call()
  File "C:\Users\MrManiak\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pgoapi\pgoapi.py", line 219, in call
    response = request.request(self._api_endpoint, self._req_method_list, self.get_position())
  File "C:\Users\MrManiak\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pgoapi\rpc_api.py", line 126, in request
    request_proto = self._build_main_request(subrequests, player_position)
  File "C:\Users\MrManiak\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pgoapi\rpc_api.py", line 212, in _build_main_request
    u6.unknown2.unknown1 = self._generate_signature(signature_proto, self._signature_lib)
  File "C:\Users\MrManiak\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pgoapi\rpc_api.py", line 239, in _generate_signature
    signature = b''.join(map(chr, output))
TypeError: sequence item 0: expected a bytes-like object, str found

And this is the code from rpc_api.py

def _generate_signature(self, signature_plain, lib_path = "encrypt.so"):
        lib = ctypes.cdll.LoadLibrary(lib_path)
        lib.argtypes = [ctypes.c_char_p, ctypes.c_size_t, ctypes.c_char_p, ctypes.c_size_t, ctypes.POINTER(ctypes.c_ubyte), ctypes.POINTER(ctypes.c_size_t)] 
        lib.restype  = ctypes.c_int

        iv = os.urandom(32)

        output_size = ctypes.c_size_t()

        ret = lib.encrypt(signature_plain, len(signature_plain), iv, 32, None, ctypes.byref(output_size))
        output = (ctypes.c_ubyte * output_size.value)()
        ret = lib.encrypt(signature_plain, len(signature_plain), iv, 32, ctypes.byref(output), ctypes.byref(output_size))

        signature = b''.join(map(chr, output)) # line 238
        return signature

I've started learning python an hour ago and the syntax is a little confusing to me. I am running python 3.5 on windows 10 64-bit. I'm posting this here because I think this has to be an issue with the code since I'm just running the pokecli from the last commit.

Example spiral_poi_search.py returns no pokemons nor poke-stops

Hi guys, first of all I want to thank you for your dedition for this project and for sharing it with us.
I need some help with you example cause when I run it everything runs fine but it returns no pokemons nor poke-stops.

I'm using this command:
python spiral_poi_search.py -a google -u [email protected] -p mypass -l myCity

I tried to dump the The request for map objects returns empty cells, there is only the cellID and the timestamp (see dumped response below)

{
   'status_code':1,
   'responses':{
      'GET_MAP_OBJECTS':{
         'status':1,
         'map_cells':[
            {
               's2_cell_id':1356396646480478208               L,
               'current_timestamp_ms':1470765031244               L
            },
            {
               's2_cell_id':1356396648627961856               L,
               'current_timestamp_ms':1470765031244               L
            },
            [AND SO ON]
         ]
      }
   },
   'request_id':473955141031952260   L
}

Final result:
POI dictionary: { 'forts': [], 'pokemons': { }}

Open this in a browser to see the path the spiral search took

Possible memory leak using get_map_objects()

After trying to run a fairly large scan, I noticed memory usage kept increasing at quite a steady pace. After some debugging and commenting things out, I found that get_map_objects() is the culprit so I came here.

Code usage (example):
for _ in range(100):
response_dict = api.get_map_objects(lat, long, timestamps, cell_ids)
response_dict = {}
time.sleep(5)

Even though response_dict is (probably) garbage collected, memory usage keeps increasing with every iteration

After some more looking, I believe _make_rpc() is causing most of the memory usage. I guess it might just be an issue in the requests library, combined with the fact that every 'api request' creates a new session.

HOW set_avatar

Since the last issue was closed and I was unable to resolve my ignorance, I shall ask again...
I cannot get it to set avatar, (codename also seems to fail probably my ignorance)

You can bypass avatar by just sending the next tutorial stage packet:
http://i.imgur.com/80tcsee.jpg

Code:
from pgoapi.protos.POGOProtos.Data import Player_pb2
from pgoapi.protos.POGOProtos import Enums_pb2

api = pgoapi.PGoApi()
api.set_position(0,0,0) #i set correct position but don't want people to know my location
time.sleep(2)

if not api.login('ptc', username=username, password=password):
sys.exit(1)

print('Successful login...')
time.sleep(2)

pa = Player_pb2.PlayerAvatar()
pa.skin = 2
pa.hair = 2
pa.shirt = 2
pa.pants = 2
pa.hat = 2
pa.shoes = 2
pa.gender = Enums_pb2.MALE
pa.eyes = 2
pa.backpack = 2

request = api.create_request()
request.set_avatar(player_avatar=pa) # have also tried pa.SerializeToString()
print(request.call())

get_map_objects - Memory issues

Hi guys, when I run to get_map_object. The memory is fulfilled quickly and I get the error out of memory. What should I do?

spiral_poi_search.py produces empty search results

after number of logs like:
2016-08-07 12:15:37,080 [spiral_poi_search] [ INFO] Your given location: Starokonyushennyy per., 15, Moskva, Russia, 119002
2016-08-07 12:15:37,081 [spiral_poi_search] [ INFO] lat/long/alt: 55.7459158 37.5941288 0.0
2016-08-07 12:15:37,081 [ pgoapi] [ INFO] pgoapi v1.1.7 - Copyright (c) 2016 tjado https://github.com/tejado
2016-08-07 12:15:37,081 [auth_google] [ INFO] Google User Login for: [email protected]
2016-08-07 12:15:38,510 [auth_google] [ INFO] Google User Login successful.
2016-08-07 12:15:38,510 [auth_google] [ INFO] Request Google Access Token...
2016-08-07 12:15:38,821 [auth_google] [ INFO] Google Access Token successfully received.
2016-08-07 12:15:38,821 [ pgoapi] [ INFO] Starting RPC login sequence (app simulation)
2016-08-07 12:15:38,822 [ pgoapi] [ INFO] Creating a new request...
2016-08-07 12:15:38,822 [ pgoapi] [ INFO] Adding 'GET_PLAYER' to RPC request
2016-08-07 12:15:38,822 [ pgoapi] [ INFO] Adding 'GET_HATCHED_EGGS' to RPC request
2016-08-07 12:15:38,822 [ pgoapi] [ INFO] Adding 'GET_INVENTORY' to RPC request
2016-08-07 12:15:38,822 [ pgoapi] [ INFO] Adding 'CHECK_AWARDED_BADGES' to RPC request
2016-08-07 12:15:38,823 [ pgoapi] [ INFO] Adding 'DOWNLOAD_SETTINGS' to RPC request including arguments
2016-08-07 12:15:38,823 [ pgoapi] [ INFO] Execution of RPC
2016-08-07 12:15:40,555 [ pgoapi] [ INFO] API Endpoint redirect... re-execution of call
2016-08-07 12:15:40,896 [ pgoapi] [ INFO] Cleanup of request!
2016-08-07 12:15:40,896 [ pgoapi] [ INFO] Finished RPC login sequence (app simulation)
2016-08-07 12:15:40,896 [ pgoapi] [ INFO] Login process completed
2016-08-07 12:15:40,897 [ pgoapi] [ INFO] Creating a new direct request...
2016-08-07 12:15:40,897 [ pgoapi] [ INFO] Adding 'GET_PLAYER' to RPC request
2016-08-07 12:15:40,897 [ pgoapi] [ INFO] Execution of RPC
2016-08-07 12:15:41,337 [ pgoapi] [ INFO] Cleanup of request!
Response dictionary:
{ 'request_id': 297544394269697283L,
'responses': { 'GET_PLAYER': { 'player_data': { 'contact_settings': { },
'creation_timestamp_ms': 1470560630159L,
'currencies': [ { 'name': u'POKECOIN'},
{ 'name': u'STARDUST'}],
'daily_bonus': { },
'equipped_badge': { },
'max_item_storage': 350,
'max_pokemon_storage': 250,
'username': u'natsverd623'},
'success': True}},
'status_code': 1}
2016-08-07 12:16:06,324 [ pgoapi] [ INFO] Creating a new direct request...
2016-08-07 12:16:06,324 [ pgoapi] [ INFO] Adding 'GET_MAP_OBJECTS' to RPC request including arguments
2016-08-07 12:16:06,325 [ pgoapi] [ INFO] Execution of RPC
2016-08-07 12:16:06,760 [ pgoapi] [ INFO] Cleanup of request!

as a result I get:
POI dictionary:
{ 'forts': [], 'pokemons': { }}

Help

what am I supposed to do after I download this?? I downloaded the original bot and I keep getting bad authentication error help please

what did i miss ?

Traceback (most recent call last):
File "pokecli.py", line 133, in
main()
File "pokecli.py", line 128, in main
response_dict = api.get_map_objects(latitude =position[0], longitude = position[1], since_timestamp_ms = timestamps, cell_id = cell_ids)
File "C:\Users\Alex\Downloads\PokemonGo-Bot\pgoapi\pgoapi.py", line 122, in function
return request.call()
File "C:\Users\Alex\Downloads\PokemonGo-Bot\pgoapi\pgoapi.py", line 210, in call
request.activate_signature(lib_path)
File "C:\Users\Alex\Downloads\PokemonGo-Bot\pgoapi\rpc_api.py", line 85, in activate_signature
self.signature_lib = ctypes.cdll.LoadLibrary(lib_path)
File "C:\Python27\lib\ctypes__init
_.py", line 440, in LoadLibrary
return self.dlltype(name)
File "C:\Python27\lib\ctypes__init
_.py", line 362, in init
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] The specified module could not be found

Setup

can anyone please point me in the right direction on how to set this bot up again I have no idea where to get the files or what to do if this isnt allowed close it and maybe point me in the right direction to look thanks any type of information would be outstanding

what its ?

2016-08-07 15:45:37,188 [ pgoapi] [ INFO] Creating a new direct request...
2016-08-07 15:45:37,188 [ pgoapi] [ INFO] Adding 'GET_MAP_OBJECTS' to RPC request including arguments
2016-08-07 15:45:37,190 [ pgoapi] [ INFO] Execution of RPC
2016-08-07 15:45:38,019 [ pgoapi] [ INFO] API Endpoint redirect... re-execution of call
2016-08-07 15:45:38,181 [ pgoapi] [ INFO] Cleanup of request!
Response dictionary (get_player):
{ 'request_id': 319013341259611202L,
'responses': { 'GET_MAP_OBJECTS': { 'map_cells': [ { 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595442848563200L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595436406112256L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595438553595904L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595440701079552L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926594978992095232L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926594981139578880L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926594983287062528L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926594985434546176L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926594970402160640L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926594974697127936L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926594976844611584L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595554517712896L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595556665196544L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595558812680192L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595560960163840L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595580287516672L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595582435000320L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595584582483968L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595586729967616L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595571697582080L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595578140033024L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595597467385856L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595599614869504L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595601762353152L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595603909836800L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595588877451264L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595591024934912L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595593172418560L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595595319902208L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595614647255040L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595616794738688L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595618942222336L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595621089705984L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595606057320448L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595608204804096L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595610352287744L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595612499771392L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595631827124224L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595633974607872L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595636122091520L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595638269575168L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595623237189632L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595625384673280L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595627532156928L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595629679640576L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595649006993408L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595651154477056L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595653301960704L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595655449444352L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595640417058816L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595642564542464L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595644712026112L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595646859509760L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595657596928000L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595659744411648L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595687661699072L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595689809182720L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595737053822976L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595739201306624L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595741348790272L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595752086208512L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595743496273920L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595745643757568L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595747791241216L},
{ 'current_timestamp_ms': 1470573938211L,
's2_cell_id': 9926595749938724864L}],
'status': 1}},
'status_code': 1,
'unknown6': [{ 'response_type': 6, 'unknown2': { 'unknown1': 1L}}]}

how fix ?

Debian problems

Hi,
Firstly thanks for your work ! :D

When I launch the server I have this error "Exception while downloading map: Odd-length string". How I can resolve this problem ?

Thanks !

(sorry for my english)

installation guide

hi guys, was wondering if someone can help with an installation guide. I can't see where i should add the account/password/location/gmap-key and then witch python file to run

thanks

Mac Help Needed

Helle,

The "Crash" issue is getting a little busy so I thought I'd start an issue for just mac users so that anyone with the knowledge or know-how to get this repo to work with mac might be able to help us mac users! Any help would be greatly appreciated.

What are the known steps to take to get this working on mac?

No attribute default

Traceback (most recent call last):
File "pokecli.py", line 38, in
from pgoapi.exceptions import NotLoggedInException, ServerSideRequestThrottlingException, ServerBusyOrOfflineException
File "pgoapi/pgoapi/init.py", line 50, in
from pgoapi.pgoapi import PGoApi
File "pgoapi/pgoapi/pgoapi.py", line 34, in
from pgoapi.rpc_api import RpcApi
File "pgoapi/pgoapi/rpc_api.py", line 50, in
from POGOProtos.Networking.Envelopes_pb2 import RequestEnvelope
File "pgoapi/pgoapi/protos/POGOProtos/Networking/Envelopes_pb2.py", line 9, in
from google.protobuf import symbol_database as _symbol_database
File "/usr/lib/python2.7/site-packages/google/protobuf/symbol_database.py", line 164, in
_DEFAULT = SymbolDatabase(pool=descriptor_pool.Default())
AttributeError: 'module' object has no attribute 'Default'

Replacement

Hello and a big thank you for your work !
I understand that it was not a bot , map etc.

My questions are ;
How to use pokecli ?
Because i have a error message
Traceback (most recent call last): File "pokecli.py", line 40, in <module> from pgoapi import pgoapi File "C:\Users\User\Documents\pgoapi-master\pgoapi\__init__.py", line 48, in <module> raise PleaseInstallProtobufVersion3() pgoapi.exceptions.PleaseInstallProtobufVersion3

How to replace the API in a map file that I already have ?

I Thank You in advance for your future responses ,

cordially

valid JSON

Im guessing you're just outputting what you're getting from the server. Right now we're getting single quotes back instead of double quotes, also True instead of "true" or 1, etc, both I did some string replace, but the last one that just popped up is this one:

"active_fort_modifier": b "9QM=",

Im not even sure how to replace that one especially if the value changes.

If this is my problem then please let me know. Or if there is a way around it, etc if this question is marked as incompetent as Ive seen others then please tell me why and feel free to delete :)

And thanks again you guys, following the discord from when it started.. I was constantly awed by you guys working :)

Can not open so

return PGoApiRequest.call(self)
File "pgoapi/pgoapi.py", line 210, in call
request.activate_signature(lib_path)
File "pgoapi/rpc_api.py", line 85, in activate_signature
self._signature_lib = ctypes.cdll.LoadLibrary(lib_path)
File "/usr/lib64/python2.7/ctypes/init.py", line 438, in LoadLibrary
return self._dlltype(name)
File "/usr/lib64/python2.7/ctypes/init.py", line 360, in init
self._handle = _dlopen(self._name, mode)
OSError: encrypt.so: cannot open shared object file: No such file or directory

Include encrypt in pgoapi

Hey I was wondering if you guys were interested in distributing encrypt.c in this project as opposed to having people build it independently. If this idea is ok legally and/or distributing-wise, I can think of two solutions atm:

  • Compile encrypt.c into encrypt.so with python setup.py build_ext --inplace and retain much of the code to be the same
  • Write a cython wrapper that make its able to call the encrypt function directly from python. This involves using cython as a dependency and rewriting some the code to reflect this change.

Let me know if this seems like a good idea and I can write up a pull request with whatever direction we have in mind.

Usage

Hi,
Sorry I know this isn't the right place for this question. I know this isn't a bot, it's just an api. But I have absolutely no idea how to implement this with the bot I'm using and there is very little help on the wiki page. Could anyone post some links or perhaps just quickly sum up how to use this. Thank you.

libencrypt.so no arm?, no source?

this is was installed as part of pokemongo map reborn.
Why no source? I'm running this map on an Arm SOC and it looks like i'm going to either need a version compiled for arm, or source to compile myself...

What are the default values for the new Signature ?

I'm not a python expert (in fact I have never developed in python), and I have trouble finding the default values for the new Signature protobuf object.
This reddit comment says Also all API requests will appear to Niantic to be coming from IOS users.
I looked through the code of the API and I've been totally unable to find any reference to iPhone but a comment in this file saying string firmware_brand = 10; // On Android: product.name, on iOS: "iPhone OS"

I can't see where the default value for this is set, and I'm afraid it is finally not set at all. So I'm asking it here. Is there a default value for firmware_brand and the other keys ? If yes, where is it ? And does the api provide ways to override those values at the time?

Catcherror

Happening a lot lately. I'm not banned either since I'm still getting exp from stops. Any suggestions?

xxhash can't be installed on ubuntu/linux

Installing collected packages: xxhash, pgoapi, gpxpy, funcsigs, pbr, mock, timeout-decorator, contextlib2, raven
  Running setup.py install for xxhash ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-aYo0F8/xxhash/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-7Xmat1-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    building 'xxhash' extension
    creating build
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/xxhash
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DVERSION=0.6.1 -I/usr/include/python2.7 -c python-xxhash.c -o build/temp.linux-x86_64-2.7/python-xxhash.o -std=c99 -O3 -Wall -W -Wundef -Wno-error=declaration-after-statement
    python-xxhash.c:31:20: fatal error: Python.h: File or Directory not found
     #include <Python.h>
                        ^
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I'm not sure, but it looks like it trys to compile a c-file.

Python Version: 2.7.9
Pip Version: 8.1.2
OS: Ubuntu x64 15.04

ARM64 Support

Hey,

libencrypt-linux-arm-32.so exists but does not work on arm-64 machines.

Do you have a copy of an arm64 version?

A.

Moron in need of help!

First, let me say this: You people fucking rock! You have no idea how much I appreciate all of the time and effort you have put into this, and there is no way I can communicate it to you. It's not just about a game, for me... it's about you all, busting your asses, to A) "defeat 'the man'". B) Help those of us who want/need help. C) figuring out the puzzle and/or proving yourself/ves against opponents of "superior" strength... whatever the case is for you, personally, I applaud you!

Now, onto my small issue...

I'm a complete moron where programming is concerned. I use Python only because there are certain programs that I use that require it, but I have never installed it before today, and I am even more inept with computer languages than I am with human languages (been living in Czech Republic for 11 years and have learned 3 phrases "nemluvim Cesky" = "I don't speak Czech". "Velke pivo" = "Large beer". "Jeste jedno" = "Another one").

So, here's my request: Would it be possible for someone/anyone to post some instructions for those of us whose computer skills go no further than playing games and searching for porn? Due to this work, I've finally installed Python (3.5.2 on Windows 10 [yes, willingly, bite me!] and I'm willing to learn... whether I'm able remains to be seen...

How do I debug this?

Hi, guys! I took pokecli.py example, edited it to fit my purpose but sometimes it crashes with no error at all. Console window just dissapering. How I can find error in that situation? Here is my code:

edited.py.txt

Instalation

Hello Everybody!
(_At first i want say "sorry" for my bad english, becouse im from Poland)
I have an stupid question: "How should I instal those new updates on my Windows Phone? :) I hope I will get fast answear for this :p

Crash

Traceback (most recent call last):
  File "pokecli.py", line 133, in <module>
    main()
  File "pokecli.py", line 128, in main
    response_dict = api.get_map_objects(latitude =position[0], longitude = position[1], since_timestamp_ms = timestamps, cell_id = cell_ids)
  File "C:\Users\aidid\Desktop\Work\Unknown6-PGOAPI\pgoapi\pgoapi.py", line 121, in function
    return request.call()
  File "C:\Users\aidid\Desktop\Work\Unknown6-PGOAPI\pgoapi\pgoapi.py", line 209, in call
    request.activate_signature(lib_path)
  File "C:\Users\aidid\Desktop\Work\Unknown6-PGOAPI\pgoapi\rpc_api.py", line 82, in activate_signature
    ctypes.cdll.LoadLibrary(lib_path)
  File "C:\Python27\lib\ctypes\__init__.py", line 440, in LoadLibrary
    return self._dlltype(name)
  File "C:\Python27\lib\ctypes\__init__.py", line 362, in __init__
    self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] The specified module could not be found

Any idea what happend?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.