-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathattack.py
More file actions
executable file
·71 lines (61 loc) · 1.02 KB
/
attack.py
File metadata and controls
executable file
·71 lines (61 loc) · 1.02 KB
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
#!/usr/bin/env python
def opp():
a = raw_input()
b = raw_input()
c = raw_input()
print a
print b
print c
def doubleUp(i):
# load zero
print 2
print i
print "zero"
# add 1
print 1
print "succ"
print i
# change value of slot i to 65535
for i in xrange(16):
print 1
print "dbl"
print i
# S(K(attack(zero)(zero)))(get)
def loadAttack(i):
print 2
print i
print "attack"
print 2
print i
print "zero"
print 2
print i
print "zero"
print 1
print "K"
print i
print 1
print "S"
print i
print 2
print i
print "get"
# get(zero)
def copyZeroSlot(i):
print 2
print i
print "get"
print 2
print i
print zero
def main():
# load attack function into slot 0
loadAttack(0)
# copy attack function to slots 1..255
for i in xrange(1, 256):
copyZeroSlot(i)
# clear out slot 0
print "1\nput\n0"
doubleUp(0)
if __name__ == '__main__':
main()