Skip to content

Commit e6250d0

Browse files
committed
Modify UA checker
1 parent 5d6f9aa commit e6250d0

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

start.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,16 @@ def inject_exploit_html(self, html):
196196
return html.replace(b'{{EXPLOITS}}', data)
197197

198198
def check_ua(self):
199-
"""Have to allow 4.55 and 5.05 because the spoofer changes the UA"""
200-
if self.headers['User-Agent'] == 'Mozilla/5.0 (PlayStation 4 4.55) AppleWebKit/601.2 (KHTML, like Gecko)' or \
201-
self.headers['User-Agent'] == 'Mozilla/5.0 (PlayStation 4 5.05) AppleWebKit/601.2 (KHTML, like Gecko)':
199+
"""Allow 1.76, 4.05, and 4.55 (and there VR spoofs)"""
200+
allowed = [
201+
'Mozilla/5.0 (PlayStation 4 1.76) AppleWebKit/536.26 (KHTML, like Gecko)',
202+
'Mozilla/5.0 (PlayStation 4 4.05) AppleWebKit/537.78 (KHTML, like Gecko)',
203+
'Mozilla/5.0 (PlayStation 4 5.05) AppleWebKit/537.78 (KHTML, like Gecko)',
204+
'Mozilla/5.0 (PlayStation 4 4.55) AppleWebKit/601.2 (KHTML, like Gecko)',
205+
'Mozilla/5.0 (PlayStation 4 5.05) AppleWebKit/601.2 (KHTML, like Gecko)'
206+
]
207+
208+
if self.headers['User-Agent'] in allowed:
202209
return True
203210
else:
204211
return False

0 commit comments

Comments
 (0)