'Executable'
This commit is contained in:
parent
f7aeb27e6e
commit
ccca65f4a3
10
infernal.py → main.py
Normal file → Executable file
10
infernal.py → main.py
Normal file → Executable file
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/python2
|
||||
|
||||
import sys
|
||||
|
||||
|
@ -13,16 +14,21 @@ def parse_args ():
|
|||
parser.add_argument('-i', '--input-file', default='-', help = '.S file to use as input', dest = 'input-file')
|
||||
parser.add_argument('-o', '--output-file', default='-', help = '.S file to use as output', dest = 'output-file')
|
||||
for register in REGISTERS:
|
||||
parser.add_argument('--'+register[1:], nargs = 1, type = int, default = [Junk.Junk()], dest = register)
|
||||
parser.add_argument('--'+register[1:], nargs = 1, type = int, default = None, dest = register, help = 'the initial value of the register')
|
||||
args = vars(parser.parse_args())
|
||||
|
||||
# Determine args #
|
||||
registers_init = {}
|
||||
for register in REGISTERS:
|
||||
registers_init[register[1:]] = args[register][0]
|
||||
registers_init[register[1:]] = Junk.Junk('prev '+register)
|
||||
#
|
||||
registers_init['rip'] = 0
|
||||
registers_init['rsp'] = 0
|
||||
registers_init['rbp'] = Junk.Junk('old bp')
|
||||
#
|
||||
for register in REGISTERS:
|
||||
if args[register]:
|
||||
registers_init[register[1:]] = args[register][0]
|
||||
|
||||
#
|
||||
program = ""
|
Loading…
Reference in New Issue
Block a user