-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerator.py
More file actions
60 lines (44 loc) · 1.46 KB
/
generator.py
File metadata and controls
60 lines (44 loc) · 1.46 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
class Generator:
def __init__(self):
self.countstack = 0
self.countdata = 0
self.count = 0
def gen_stack_var(self):
self.countstack += 1
return "s" + str(self.countstack)
def gen_data_var(self):
self.countdata += 1
return "Id_" + str(self.countdata)
def gen_data_var(self, position):
self.countdata += 1
return "Id_" + str(self.countdata)
def gen_data_size(self):
return "Id_size"
def gen_mem_var(self, address):
return "mem_" + str(address)
def gen_arbitrary_var(self):
self.count += 1
return "some_var_" + str(self.count)
def gen_arbitrary_address_var(self):
self.count += 1
return "some_address_" + str(self.count)
def gen_owner_store_var(self, position):
return "Ia_store_" + str(position)
def gen_gas_var(self):
self.count += 1
return "gas_" + str(self.count)
def gen_gas_price_var(self):
return "Ip"
def gen_address_var(self):
return "Ia"
def gen_caller_var(self):
return "Is"
def gen_origin_var(self):
return "Io"
def gen_balance_var(self):
self.count += 1
return "balance_" + str(self.count)
def gen_code_var(self, address, position, bytecount):
return "code_" + str(address) + "_" + str(position) + "_" + str(bytecount)
def gen_code_size_var(self, address):
return "code_size_" + str(address)