summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgames_bot.py35
-rwxr-xr-xpost_bot.py78
-rwxr-xr-xqs_to_list.py50
3 files changed, 163 insertions, 0 deletions
diff --git a/games_bot.py b/games_bot.py
new file mode 100755
index 0000000..bdd63c9
--- /dev/null
+++ b/games_bot.py
@@ -0,0 +1,35 @@
+#!/usr/bin/env python3
+import requests
+import re
+from time import sleep
+
+
+rs = requests.session()
+rp = rs.post('https://recolor.me/login?json', data = {
+ 'action':'login',
+ 'account_name':'testingaccount1',
+ 'account_password':'1234',
+ 'account_cookie':'1'})
+
+if not rp.json()['account_id']:
+ print("wrong login info!")
+ exit(1)
+
+rp = rs.get('https://recolor.me/')
+key_pos = rp.text.find("site.my_key = \'") + len("site.my_key = ")
+#key = rp.text[key_pos:key_pos+32]
+key = re.search("site.my_key = \'(.*)\';", rp.text).groups()[0]
+
+levels = []
+levels.append([1, 0, [3, 2, 0, 3]])
+
+rp = rs.post('https://recolor.me/', data = {
+ 'page':'slide',
+ 'action':'complete',
+ 'level':'7',
+ 'hflip':'1',
+ 'vflip':'0',
+ 'solution':'301232',
+ 'key':key
+ })
+
diff --git a/post_bot.py b/post_bot.py
index ce189ff..61db359 100755
--- a/post_bot.py
+++ b/post_bot.py
@@ -25,6 +25,68 @@ key_pos = rp.text.find("site.my_key = \'") + len("site.my_key = ")
key = re.search("site.my_key = \'(.*)\';", rp.text).groups()[0]
+# automaticly generated from qs_to_list.py
+levels = [[['1'], ['1'], ['1'], ['032']],
+[['2'], ['0'], ['1'], ['30103']],
+[['3'], ['1'], ['0'], ['12301210']],
+[['4'], ['0'], ['0'], ['012123']],
+[['5'], ['1'], ['0'], ['030321']],
+[['6'], ['0'], ['1'], ['01032103']],
+[['7'], ['0'], ['0'], ['103212']],
+[['8'], ['0'], ['1'], ['12123010']],
+[['9'], ['0'], ['0'], ['0123']],
+[['10'], ['1'], ['0'], ['0']],
+[['11'], ['0'], ['1'], ['20321010']],
+[['12'], ['1'], ['1'], ['303230101']],
+[['13'], ['0'], ['0'], ['012123012321212103']],
+[['14'], ['1'], ['0'], ['2130']],
+[['15'], ['0'], ['0'], ['030110310']],
+[['16'], ['1'], ['0'], ['03212301230320123032']],
+[['17'], ['1'], ['0'], ['2222011112321']],
+[['18'], ['0'], ['0'], ['210103010323232']],
+[['19'], ['1'], ['1'], ['32123032121302103032101']],
+[['65'], ['1'], ['0'], ['2103230123']],
+[['66'], ['1'], ['0'], ['230301230301']],
+[['67'], ['0'], ['1'], ['3012301121231203012121203012123']],
+[['68'], ['0'], ['0'], ['032103012']],
+[['69'], ['0'], ['1'], ['30321032123232132103203210321232321210']],
+[['70'], ['1'], ['1'], ['3012321032103012032103212']],
+[['71'], ['0'], ['0'], ['030323030101013232103010123']],
+[['72'], ['1'], ['1'], ['23212321321032313012123010132321231023032123030']],
+[['73'], ['1'], ['0'], ['3030']]]
+
+def beat_games():
+ rs.post('https://recolor.me/topic/1557621', data={
+ 'key':key,
+ 'page':'topic',
+ 'action':'reply',
+ 'topic_id':'1557621',
+ 'reply_message':"Completing levels...",
+ 'box_color':'#0000ff',
+ 'post_color':'#0',
+ 'post_style':'0'
+ })
+ for level in levels:
+ sleep(7);
+ rs.post('https://recolor.me/slide', data = {
+ 'page':'slide',
+ 'action':'complete',
+ 'level':level[0],
+ 'hflip':level[1],
+ 'vflip':level[2],
+ 'solution':level[3],
+ 'key':key})
+ sleep(7)
+ rs.post('https://recolor.me/topic/1557621', data={
+ 'key':key,
+ 'page':'topic',
+ 'action':'reply',
+ 'topic_id':'1557621',
+ 'reply_message':"Levels completed!",
+ 'box_color':'#0000ff',
+ 'post_color':'#0',
+ 'post_style':'0'
+
def acheive_limit():
uncaped = True
check_space = 20
@@ -88,3 +150,19 @@ while True:
cap_thread = Timer((desired_time - current_time).total_seconds()+1, acheive_limit)
cap_thread.start()
cap_thread.join()
+
+# level structure:
+# 0: str hflip
+# 1: str vflip
+# 2: str steps
+
+
+#rp = rs.post('https://recolor.me/', data = {
+# 'page':'slide',
+# 'action':'complete',
+# 'level':'7',
+# 'hflip':'1',
+# 'vflip':'0',
+# 'solution':'301232',
+# 'key':key
+# })
diff --git a/qs_to_list.py b/qs_to_list.py
new file mode 100755
index 0000000..37d115c
--- /dev/null
+++ b/qs_to_list.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python3
+from urllib.parse import parse_qs
+print("# automaticly generated from qs_to_list.py")
+#27 levels
+qs = []
+qs.append('page=slide&action=complete&level=1&hflip=1&vflip=1&solution=032&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=2&hflip=0&vflip=1&solution=30103&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=3&hflip=1&vflip=0&solution=12301210&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=4&hflip=0&vflip=0&solution=012123&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=5&hflip=1&vflip=0&solution=030321&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=6&hflip=0&vflip=1&solution=01032103&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=7&hflip=0&vflip=0&solution=103212&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=8&hflip=0&vflip=1&solution=12123010&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=9&hflip=0&vflip=0&solution=0123&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=10&hflip=1&vflip=0&solution=0&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=11&hflip=0&vflip=1&solution=20321010&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=12&hflip=1&vflip=1&solution=303230101&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=13&hflip=0&vflip=0&solution=012123012321212103&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=14&hflip=1&vflip=0&solution=2130&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=15&hflip=0&vflip=0&solution=030110310&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=16&hflip=1&vflip=0&solution=03212301230320123032&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=17&hflip=1&vflip=0&solution=2222011112321&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=18&hflip=0&vflip=0&solution=210103010323232&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=19&hflip=1&vflip=1&solution=32123032121302103032101&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=65&hflip=1&vflip=0&solution=2103230123&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV') # level 65... weird
+qs.append('page=slide&action=complete&level=66&hflip=1&vflip=0&solution=230301230301&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=67&hflip=0&vflip=1&solution=3012301121231203012121203012123&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=68&hflip=0&vflip=0&solution=032103012&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=69&hflip=0&vflip=1&solution=30321032123232132103203210321232321210&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV') # you should come back to fix this some time
+qs.append('page=slide&action=complete&level=70&hflip=1&vflip=1&solution=3012321032103012032103212&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=71&hflip=0&vflip=0&solution=030323030101013232103010123&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=72&hflip=1&vflip=1&solution=23212321321032313012123010132321231023032123030&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+qs.append('page=slide&action=complete&level=73&hflip=1&vflip=0&solution=3030&key=cbO_VxSG_0kklt4LHX28pQ93WJEiw5WV')
+
+# levels
+# 0: level
+# 1: hflip
+# 2: vflip
+# 3: solution
+processed_qs = []
+for url in qs:
+ url = parse_qs(url)
+ processed_qs.append([url['level'], url['hflip'], url['vflip'], url['solution']])
+
+print("[", end="")
+
+for s in processed_qs:
+ print(s, end=",\n")
+
+print("]")