-
Notifications
You must be signed in to change notification settings - Fork 0
/
cc3_kte_maximum.py
36 lines (32 loc) · 1 KB
/
cc3_kte_maximum.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
import requests
cc_number = 3
url_input = 'https://cc.the-morpheus.de/challenges/' + str(cc_number) + '/'
url_output = 'https://cc.the-morpheus.de/solutions/' + str(cc_number) + '/'
response = requests.get(url_input).json()
print('------------ Response of Server --------')
print(response)
print('----------------------------------------')
liste = sorted(list(response['list']), reverse=True)
print(liste)
k = response['k']
print(k)
k_max = liste[k-1]
print(k_max)
response2 = requests.post(url_output, json={'token': k_max})
print('------------Response 2 of Server -------')
print(response2.text)
print('----------------------------------------')
# Success: TMT{S0SpkHzubAmCu7H3r5wR}
"""
import time
start = time.time()
for i in range(100):
pass
print((time.time() - start)/100)
result = ''
response2 = requests.post(url_output, json={'token': result})
print('------------Response 2 of Server -------')
print(response2.text)
print('----------------------------------------')
# Success: TMT{WBVjoml6PjsOu3yzFvr3}
"""