-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexerciser.py
50 lines (45 loc) · 1.72 KB
/
exerciser.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
import time
from urllib import request, parse
primary = parse.urlencode({'mode': '1 100'}).encode()
reset = parse.urlencode({'mode': '1 103'}).encode()
secondary = parse.urlencode({'mode': '1 101'}).encode()
gordon_primary_req = request.Request('http://192.168.1.20/index_post.php', data=primary)
gordon_secondary_req = request.Request('http://192.168.1.20/index_post.php', data=secondary)
gordon_reset_req = request.Request('http://192.168.1.20/index_post.php', data=reset)
chell_primary_req = request.Request('http://192.168.1.21/index_post.php', data=primary)
chell_secondary_req = request.Request('http://192.168.1.21/index_post.php', data=secondary)
chell_reset_req = request.Request('http://192.168.1.21/index_post.php', data=reset)
while 1:
print("RESET")
req = request.urlopen(gordon_reset_req)
print(req.read())
time.sleep(10)
req = request.urlopen(gordon_primary_req)
print(req.read())
time.sleep(10)
req = request.urlopen(gordon_primary_req)
print(req.read())
time.sleep(10)
req = request.urlopen(chell_primary_req)
print(req.read())
time.sleep(10)
for x in range(1, 20):
print(x)
req = request.urlopen(chell_secondary_req)
print(req.read())
time.sleep(10)
req = request.urlopen(chell_secondary_req)
print(req.read())
time.sleep(1)
req = request.urlopen(chell_primary_req)
print(req.read())
time.sleep(5)
req = request.urlopen(gordon_secondary_req)
print(req.read())
time.sleep(10)
req = request.urlopen(gordon_secondary_req)
print(req.read())
time.sleep(1)
req = request.urlopen(gordon_primary_req)
print(req.read())
time.sleep(5)