Skip to content

Commit dbaa06f

Browse files
committed
Implemented the changes in NoMore201#161
Still not working however, getting bad auth
1 parent 91a6f31 commit dbaa06f

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

gpapi/config.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,9 @@ def getLoginParams(self, email, encrypted_passwd):
141141
"device_country": self.locale[0:2],
142142
"lang": self.locale,
143143
"client_sig": "38918a453d07199354f8b19af05ec6562ced5788",
144-
"callerSig": "38918a453d07199354f8b19af05ec6562ced5788"}
145-
144+
"callerSig": "38918a453d07199354f8b19af05ec6562ced5788",
145+
"droidguard_results": "dummy123"}
146+
146147
def getAndroidCheckinRequest(self):
147148
request = googleplay_pb2.AndroidCheckinRequest()
148149
request.id = 0

gpapi/googleplay.py

+12-11
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,12 @@ def login(self, email=None, password=None, gsfId=None, authSubToken=None):
244244
params['service'] = 'ac2dm'
245245
params['add_account'] = '1'
246246
params['callerPkg'] = 'com.google.android.gms'
247-
headers = self.deviceBuilder.getAuthHeaders(self.gsfId)
248-
headers['app'] = 'com.google.android.gsm'
249-
response = self.session.post(AUTH_URL, data=params, verify=ssl_verify,
250-
proxies=self.proxies_config)
247+
with requests.Session() as s:
248+
s.headers = {'User-Agent': 'GoogleAuth/1.4'}
249+
response = s.post(AUTH_URL,
250+
data=params,
251+
verify=ssl_verify,
252+
proxies=self.proxies_config)
251253
data = response.text.split()
252254
params = {}
253255
for d in data:
@@ -286,13 +288,12 @@ def getAuthSubToken(self, email, passwd):
286288
requestParams = self.deviceBuilder.getLoginParams(email, passwd)
287289
requestParams['service'] = 'androidmarket'
288290
requestParams['app'] = 'com.android.vending'
289-
headers = self.deviceBuilder.getAuthHeaders(self.gsfId)
290-
headers['app'] = 'com.android.vending'
291-
response = self.session.post(AUTH_URL,
292-
data=requestParams,
293-
verify=ssl_verify,
294-
headers=headers,
295-
proxies=self.proxies_config)
291+
with requests.Session() as s:
292+
s.headers = {'User-Agent': 'GoogleAuth/1.4', 'device':"{0:x}".format(self.gsfId)}
293+
response = s.post(AUTH_URL,
294+
data=requestParams,
295+
verify=ssl_verify,
296+
proxies=self.proxies_config)
296297
data = response.text.split()
297298
params = {}
298299
for d in data:

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ protobuf==3.13.0
1717
pyasn1==0.4.8
1818
pyasn1-modules==0.2.8
1919
pycparser==2.20
20-
pyinstaller==4.0
20+
pyinstaller==4.9
2121
pyinstaller-hooks-contrib==2020.9
2222
pytz==2020.1
2323
pywin32-ctypes==0.2.0

0 commit comments

Comments
 (0)