forked from t-rekttt/Violympic-Exploit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviolympic.py
152 lines (137 loc) · 5.4 KB
/
violympic.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests, find, json, time, random, hashlib, os, sys
s1 = u'ÀÁÂÃÈÉÊÌÍÒÓÔÕÙÚÝàáâãèéêìíòóôõùúýĂăĐđĨĩŨũƠơƯưẠạẢảẤấẦầẨẩẪẫẬậẮắẰằẲẳẴẵẶặẸẹẺẻẼẽẾếỀềỂểỄễỆệỈỉỊịỌọỎỏỐốỒồỔổỖỗỘộỚớỜờỞởỠỡỢợỤụỦủỨứỪừỬửỮữỰựỲỳỴỵỶỷỸỹ'
s0 = u'AAAAEEEIIOOOOUUYaaaaeeeiioooouuyAaDdIiUuOoUuAaAaAaAaAaAaAaAaAaAaAaAaEeEeEeEeEeEeEeEeIiIiOoOoOoOoOoOoOoOoOoOoOoOoUuUuUuUuUuUuUuYyYyYyYy'
#os.system('utf8.bat')
print("By T-Rekt of J2TeaM")
print("THIS SNIPPET IS FOR EDUCATIONAL PURPOSE, PLEASE DO NOT ABUSE. OTHERWISE YOU MAY GET BANNED")
print("------------------------------------")
username = raw_input('Username: ')
password = raw_input('Password: ')
ldata = {
'login_username':username,
'login_password':password,
}
def remove_accents(input_str):
s = ''
for c in input_str:
if c in s1:
s += s0[s1.index(c)]
else:
s += c
return s
def declare():
session.headers = {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
}
def press(a, b ,d, e, f):
f = a + '","' + b + '","' + d + '","' + e + '","' + f;
f = pressl(f);
a = f;
b = "";
for c in range(0,len(a)):
f = '0.j2t'[0: 5]
b += f + a[c];
return b
def pressl(a):
return a[::-1]
def presst(a, b):
c=a
d=''
for e in range(0,len(c)):
f = '0.aaaaaaaaaaaaaaaaaaaaaaaaaa'[0: b]
d = d + (f + c[e])
return d
def get_data(ran):
session.headers = {
'Content-Type': 'application/json'
}
data = {
'local':0,
'ran':ran
}
d = json.loads(session.post('http://violympic.vn/urlData.aspx/getdata',data=json.dumps(data)).text)['d']
if d != None:
return json.loads(d)
return 0
def start_working(a):
play = session.get('http://violympic.vn/Play.aspx?ran='+a)
round_key = find.find_between(play.text,'Exam.aspx?ran=',"'")
return round_key
def start_login():
login = session.post('http://violympic.vn/Login.aspx',data=ldata)
if 'Set-Cookie' in login.headers:
return 1
return 0
def release_my_quiz_power():
print('Trying to pass test: '+remove_accents(d['game_name_language']))
session.get('http://violympic.vn/Timer.aspx?start=1&which_exam='+str(which_exam))
print('Sleeping 60s')
time.sleep(60)
encrypted = press(str(userId),str(which_exam),str(totalPoint),subPoint,ran)
postdata = {
"local":0,
"userId":userId,
"which_exam":which_exam,
"Token":encrypted,
"totalPoint":totalPoint,
"subPoint":subPoint,
"ran":ran,
"signature":signature_txt,
"token_clinet":token_clinet_txt,
"timeStop":"600",
}
finish = session.post('http://violympic.vn/SubmitTotalPoint.aspx/SendtotalPoint',data=json.dumps(postdata)).text
url = find.find_between(finish,'ran=','"')
session.get('http://violympic.vn/Play.aspx?ran='+url)
return finish
def release_my_ultimate_power():
print('Trying to pass fill-in game')
aaa = '15585:[0a20fdbc52b6020a7bbc7d0ab069cbce]15917:[e30a84a4eeaaea5fad5cfe7e49cb498b]15918:[b7be71203343d9b7de711bd45bbe6388]15921:[f4549093388c99a4d8c1cf5ccbdbc09b]15920:[adc317b92823ad277baed6c64349e748]15926:[a4e7a49bcbd1b581f017dec5fbface04]15919:[fbfd1095bf7217f2e28e0f5458827905]15916:[a4e7a49bcbd1b581f017dec5fbface04]15925:[b7be71203343d9b7de711bd45bbe6388]15913:[d35ce0f1ff3321cc39b4fa8b52412196]15912:[c93fb6a1101959818ecea33d15418dda]15923:[e30a84a4eeaaea5fad5cfe7e49cb498b]'
which_round = d['which_round']
block = d['block']
key = 0
doneexam = which_exam
result = session.get('')
session = requests.session()
declare()
if start_login():
print('Login successfully')
while (1>0):
get_round = session.get('http://violympic.vn/Round.aspx')
round_id = find.find_between(get_round.text,'Play.aspx?ran=',"'")
#print(round_id)
session.get('http://violympic.vn/EnKey.aspx?type=entekey&input=QVDECC3EC3')
round_key = start_working(round_id)
d = get_data(round_key)
if d:
print('Starting a new test')
session.get('http://violympic.vn/Exam.aspx?ran='+round_key)
d = get_data(round_key)
userId = d['userId']
which_exam = d['which_exam']
#Token = d['Token']
signature_txt = d['signature']
#token_clinet_txt = "ksjhjsf" + str(random.random())
token_clinet_txt = "ksjhjsf0.8059151084418859"
signature_txt = hashlib.md5(signature_txt+token_clinet_txt).hexdigest()
totalPoint = 100
subPoint = '20,20,20,20,20'
ran = d['ran']
if d['game_name_language']!=None:
result = release_my_quiz_power()
if (which_exam==3):
print('Well, you are going to pass the round, you know?')
session.get('http://violympic.vn/Round.aspx')
break
#time.sleep(15)
print('Test passed\n')
else:
release_my_ultimate_power()
#print('I need your ultimate power')
break
else:
print('Error')
break
raw_input()