FeroxRev / Pokemon-Go-Rocket-API

Client API Library
GNU General Public License v3.0
368 stars 230 forks source link

Updated API, but no Pokestops etc.. #126

Open Futfutfut opened 8 years ago

Futfutfut commented 8 years ago

Hey, I changed all necessary things, but if I want to get nearby pokestops I always get 21 cells which dont have any pokestop info inside. Im already waiting 10s between each MapObjects Request but it never returns any information about pokestops or pokemons. If I play PokemonGo in the app I can catch pokemon etc

Fliperworld commented 8 years ago

same here,I changed all necessary files contained in #125 but no luck. Necrobot api is working(no luck at first compile time),but with "POGOProtosSignature.cs" from #125 included at my project i finally can get GetMapObjects() working. (NecroBot-Rocket-API + POGOProtosSignature.cs= success for map objects)

Futfutfut commented 8 years ago

thanks for the reply, but where can I get the "SOAuthCSharp.cs"? I cant find it in #125 or anywhere in the Rocket-API

Fliperworld commented 8 years ago

im sorry, wrong name :D, the correct one is POGOProtosSignature.cs (You also need fix some lines on request builder.cs, because the namespace is a little diffrent)

Futfutfut commented 8 years ago

ah yeah, I already have the Signature.cs :D so the only thing I have to fix then is using the FeroxRev API Implementation of necrobot? What about all the fields like "DeviceID, Hardware Model" etc.. that are in the Isettings implementation of necrobot, did u assign some values to them?

Fliperworld commented 8 years ago

yes, you can use https://github.com/NECROBOTIO/NecroBot-Rocket-API/blob/3fc40bee9d8ec597c1875193c2615e6dc4bb5bce/PokemonGo.RocketAPI/Helpers/RequestBuilder.cs (old version with assigned values)as reference

Futfutfut commented 8 years ago

Perfect, thanks for your fast help :)

WallyCZ commented 8 years ago

Made some other approach using encrypt library - its because i dont like DLLImports. But it is upon to you ;) Also this variant is without source code od encrypt.c for be sure...

https://github.com/WallyCZ/Pokemon-Go-Rocket-API/commit/1706017dd12a1f384e2b331bb8406f9af265a948

robertmclaws commented 8 years ago

There is a managed port that doesn't p/invoke. https://github.com/zone117x/pokemongo-encrypt-sharp

Gabrola commented 8 years ago

You can check out #128 it works fine and so does GetMapObjects. I've also implemented the encryption in c# using unsafe pointers so performance should be comparable to the C implementation.

WallyCZ commented 8 years ago

Confirmed, working after small change

    public RequestEnvelope GetRequestEnvelope(params Request[] customRequests)
    {
        return SetRequestEnvelopeUnknown6(new RequestEnvelope
        {
            StatusCode = 2, //1

            RequestId = 1469378659230941192, //3
            Requests = { customRequests }, //4

            //Unknown6 = , //6
            Latitude = _latitude, //7
            Longitude = _longitude, //8
            Altitude = _altitude, //9
            AuthInfo = new AuthInfo
            {
                Provider = _authType == AuthType.Google ? "google" : "ptc",
                Token = new AuthInfo.Types.JWT
                {
                    Contents = _authToken,
                    Unknown2 = 14
                }
            }, //10
            AuthTicket = _authTicket, //11
            Unknown12 = 989 //12
        });
    }
Gabrola commented 8 years ago

@WallyCZ My bad, should be fixed in last commit, I accidentally typed in AuthInfo instead of AuthTicket into the seed here var ticketBytes = requestEnvelope.AuthTicket.ToByteArray(); Since AuthInfo shouldn't be set except on the initial request is was giving a NullReferenceException. I find it funny that your solution worked though since that should change the signature completely.

WallyCZ commented 8 years ago

Argh, interesting :D They probably does not check everything yet

Gabrola commented 8 years ago

@WallyCZ I just checked out of curiosity and it didn't work. I guess your solution only fixed the exception but GetMapObjects returned nothing.

WallyCZ commented 8 years ago

No, GetMapsObject returned all - really :) But nevermind, I took your fix and its ok

rdegelo commented 8 years ago

So, is this update fully working? when will it be merged into master?

thank you for all your effort!

dtabacaru commented 8 years ago

@WallyCZ did you have to do anything to get GetMapsObject working other than #128 and your fix above?

I still can't seem to find any Pokemon or forts in locations I know they exist. Thanks!

dtabacaru commented 8 years ago

Welp, if anyone is still reading this, I just used a fresh copy of #128 @Gabrola's fork and everything worked OK. Make sure you leave your POGOProtos version to 1.5.