Skip to content

Commit

Permalink
Merge pull request #6005 from MerlionRock/dev
Browse files Browse the repository at this point in the history
API Watchdog Update
  • Loading branch information
pogarek authored Apr 10, 2017
2 parents acc74ae + b76089b commit 9e52c8a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pokemongo_bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,7 @@ def login(self):
total_entry = int(len(bossland_hash_endpoint))
last_bossland_entry = bossland_hash_endpoint[total_entry-1]
bossland_lastestAPI = last_bossland_entry.split(":")[0].replace('\"','')
hashingAPI_temp = 0
self.event_manager.emit(
'security_check',
sender=self,
Expand All @@ -1036,9 +1037,15 @@ def login(self):

for version, endpoint in bossland_hash_data.items():
if endpoint == PGoAPI_hash_endpoint:
if int(version[0]) != 1 and int(version[0]) == 0:
# Version should always be in this format x.xx.x
# Check total len, if less than 4, pack a zero behind
if len(version.replace('.','')) < 4:
version = version + ".0"
hashingAPI_temp = int(version.replace('.',''))
# iOS versioning is always more than 1.19.0
if hashingAPI_temp < 1190:
PGoAPI_hash_version.append(version)
# assuming andorid versioning is always last entry
# assuming andorid versioning is always last entry
PGoAPI_hash_version.sort(reverse=True)
# covert official api version & hashing api version to numbers
officialAPI_int = int(officalAPI.replace('.',''))
Expand Down

0 comments on commit 9e52c8a

Please sign in to comment.