Exemplo n.º 1
0
 def __exec_x(self, args):
     if self.ctx.dis is None:
         error("load a file before")
         return
     if len(args) == 1:
         self.ctx.entry = None
     else:
         self.ctx.entry = args[1]
     self.ctx.reset_vars()
     if init_addr(self.ctx):
         disasm(self.ctx)
         self.ctx.entry = None
         self.ctx.addr = 0
Exemplo n.º 2
0
 def __exec_calls(self, args):
     if len(args) != 2:
         error("section required")
         return
     if self.ctx.dis is None:
         error("load a file before")
         return
     self.ctx.calls_in_section = args[1]
     if init_addr(self.ctx):
         self.ctx.dis.print_calls(self.ctx)
         self.ctx.entry = None
         self.ctx.entry_addr = 0
     self.ctx.calls_in_section = None
Exemplo n.º 3
0
 def __exec_x(self, args):
     if self.ctx.dis is None:
         error("load a file before")
         return
     if len(args) == 1:
         self.ctx.entry = None
     else:
         self.ctx.entry = args[1]
     self.ctx.reset_vars()
     if init_addr(self.ctx):
         disasm(self.ctx)
         self.ctx.entry = None
         self.ctx.addr = 0
Exemplo n.º 4
0
 def __exec_calls(self, args):
     if len(args) != 2:
         error("section required")
         return
     if self.ctx.dis is None:
         error("load a file before")
         return
     self.ctx.calls_in_section = args[1]
     if init_addr(self.ctx):
         self.ctx.dis.print_calls(self.ctx)
         self.ctx.entry = None
         self.ctx.entry_addr = 0
     self.ctx.calls_in_section = None
Exemplo n.º 5
0
 def __exec_calls(self, args):
     if self.ctx.dis is None:
         error("load a file before")
         return
     self.ctx.calls = True
     if len(args) == 1:
         self.ctx.entry = "EP"
     else:
         self.ctx.entry = args[1]
     if init_addr(self.ctx):
         self.ctx.dis.print_calls(self.ctx)
         self.ctx.entry = None
         self.ctx.addr = 0
     self.ctx.calls = False
Exemplo n.º 6
0
 def __exec_calls(self, args):
     if self.ctx.dis is None:
         error("load a file before")
         return
     self.ctx.calls = True
     if len(args) == 1:
         self.ctx.entry = "EP"
     else:
         self.ctx.entry = args[1]
     if init_addr(self.ctx):
         self.ctx.dis.print_calls(self.ctx)
         self.ctx.entry = None
         self.ctx.addr = 0
     self.ctx.calls = False
Exemplo n.º 7
0
 def __exec_dump(self, args):
     if self.ctx.dis is None:
         error("load a file before")
         return
     lines = self.ctx.lines
     if len(args) == 1:
         self.ctx.entry = None
     else:
         if len(args) == 3:
             lines = int(args[2])
         self.ctx.entry = args[1]
     if init_addr(self.ctx):
         self.ctx.dis.dump(self.ctx, lines)
         self.ctx.entry = None
         self.ctx.addr = 0
Exemplo n.º 8
0
 def __exec_dump(self, args):
     if self.ctx.dis is None:
         error("load a file before")
         return
     lines = self.ctx.lines
     if len(args) == 1:
         self.ctx.entry = None
     else:
         if len(args) == 3:
             lines = int(args[2])
         self.ctx.entry = args[1]
     if init_addr(self.ctx):
         self.ctx.dis.dump(self.ctx, lines)
         self.ctx.entry = None
         self.ctx.addr = 0