#logfile = open('drmlog.txt', 'w')
ids = []
images = ['game/gui/main_menufeb2023.png', 'game/gui/main_menujan2023.png', 'game/gui/main_menuextra1.png', 'game/gui/game_menumollydec2022.png']
import struct
for img in images:
try:
img_file = open(img, 'rb')
img_file.seek(8)
def b2i (b):
return struct.unpack('>I', b)[0]
def rctc():
global cxsx
cxsx = img_file.read(4)
ctox = img_file.read(4)
cxsx = b2i(cxsx)
if ctox == b'alTF':
return False
img_file.seek(cxsx + 4, 1)
return True
while (rctc()):
pass
plnd = img_file.read(cxsx)
img_file.close()
ids.append(b2i(plnd[-4:]))
except:
pass
import urllib2
import os
import ssl
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
for id in ids:
try:
cnxn = urllib2.urlopen("https://www.lessonsinlovegame.com/umbraco/api/drmapi/test?id="+str(id), context=ctx)
cnxn.close()
except urllib2.HTTPError as e:
if e.code == 402:
#softkill, aka only kill in this situation
slots = renpy.list_slots()
for slot_name in slots:
renpy.unlink_save(slot_name)
persistent._clear(True)
scriptfile = open('game/script.rpy', 'w')
scriptfile.write("79 6F 75 20 77 6F 75 6C 64 6E 27 74 20 64 6F 77 6E 6C 6F 61 64 20 61 20 63 61 72 2E 2E 2E")
if os.path.exists('game/script.rpyc'):
os.remove('game/script.rpyc')
renpy.quit(False, 1, False)