summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-08-07 23:22:36 -0300
committerJesusaves <cpntb1@ymail.com>2021-08-07 23:22:36 -0300
commitfd73aef79ac834a035ab6840309f9cafa3dca1ac (patch)
tree15285e42c7b2d0bf56e4ddd16eacf87cce919a75
parent0f7ba81abe56d9ea8c1a19b43fa9880627419f71 (diff)
downloadclient-fd73aef79ac834a035ab6840309f9cafa3dca1ac.tar.gz
client-fd73aef79ac834a035ab6840309f9cafa3dca1ac.tar.bz2
client-fd73aef79ac834a035ab6840309f9cafa3dca1ac.tar.xz
client-fd73aef79ac834a035ab6840309f9cafa3dca1ac.zip
cacert is broken on Android; Requests is unable to verify certs.
Not a problem, just make sure you NEVER try to validate the cert!!
-rw-r--r--game/01_init.rpy14
-rw-r--r--game/02_init.rpy4
-rw-r--r--game/misc.rpy4
3 files changed, 11 insertions, 11 deletions
diff --git a/game/01_init.rpy b/game/01_init.rpy
index 2227132..bcdd844 100644
--- a/game/01_init.rpy
+++ b/game/01_init.rpy
@@ -337,7 +337,7 @@ init -3 python:
persistent.version=1
# Download upstream version
- x=requests.get("http://"+HOST+'/version.txt')
+ x=requests.get("http://"+HOST+'/version.txt', verify=False)
try:
ver=int(x.text)
except:
@@ -352,42 +352,42 @@ init -3 python:
# Download quests.json
f=open(get_path("quests.json"), "w")
stdout("Downloading quests.json")
- x=requests.get("http://"+HOST+'/quests.json')
+ x=requests.get("http://"+HOST+'/quests.json', verify=False)
f.write(x.text)
f.close()
# Download units.json
f=open(get_path("units.json"), "w")
stdout("Downloading units.json")
- x=requests.get("http://"+HOST+'/units.json')
+ x=requests.get("http://"+HOST+'/units.json', verify=False)
f.write(x.text)
f.close()
# Download story.json
f=open(get_path("story.json"), "w")
stdout("Downloading story.json")
- x=requests.get("http://"+HOST+'/story.json')
+ x=requests.get("http://"+HOST+'/story.json', verify=False)
f.write(x.text)
f.close()
# Download world.json
f=open(get_path("world.json"), "w")
stdout("Downloading world.json")
- x=requests.get("http://"+HOST+'/world.json')
+ x=requests.get("http://"+HOST+'/world.json', verify=False)
f.write(x.text)
f.close()
# Download bar.json
f=open(get_path("bar.json"), "w")
stdout("Downloading bar.json")
- x=requests.get("http://"+HOST+'/bar.json')
+ x=requests.get("http://"+HOST+'/bar.json', verify=False)
f.write(x.text)
f.close()
# Download summons.json
f=open(get_path("summons.json"), "w")
stdout("Downloading summons.json")
- x=requests.get("http://"+HOST+'/summons.json')
+ x=requests.get("http://"+HOST+'/summons.json', verify=False)
f.write(x.text)
f.close()
diff --git a/game/02_init.rpy b/game/02_init.rpy
index b3720f5..844c9c9 100644
--- a/game/02_init.rpy
+++ b/game/02_init.rpy
@@ -121,7 +121,7 @@ init -1 python:
# FIXME: Error handling
# Load unit data
- #allunitsbase=json.loads(requests.get("http://"+HOST+'/units.json').text)
+ #allunitsbase=json.loads(requests.get("http://"+HOST+'/units.json', verify=False).text)
f=open(get_path_if_exists("units.json"), "r")
allunitsbase=json.load(f)
f.close()
@@ -159,7 +159,7 @@ init -1 python:
stdout("PREPARING FOR NEWS")
# Load server news
try:
- allnews=json.loads(requests.get("http://"+HOST+'/news.json', timeout=5.0).text)
+ allnews=json.loads(requests.get("http://"+HOST+'/news.json', verify=False, timeout=5.0).text)
except:
allnews=[]
pass
diff --git a/game/misc.rpy b/game/misc.rpy
index eb1c47a..78bd6c3 100644
--- a/game/misc.rpy
+++ b/game/misc.rpy
@@ -394,7 +394,7 @@ init python:
global pat, statusmsg, progress, max_value, status
try:
print("Fetching http://%s/assets%s ..." % (persistent.host, pat))
- r = requests.get("http://%s/assets%s" % (persistent.host, pat), stream=True)
+ r = requests.get("http://%s/assets%s" % (persistent.host, pat), verify=False, stream=True)
if r.status_code / 100 != 2:
raise Exception("Aborted with status %d" % r.status_code)
@@ -471,7 +471,7 @@ label download_all:
python:
## Where the zip file is located?
try:
- x = requests.get("http://%s/assets/fetch.txt" % persistent.host, timeout=8.0)
+ x = requests.get("http://%s/assets/fetch.txt" % persistent.host, verify=False, timeout=8.0)
assert x.status_code == 200, "Status Code Error"
print "%s" % str(x.text)
pat = x.text.split("#")[0]