Beispiel #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
Beispiel #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
Beispiel #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
Beispiel #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
Beispiel #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
Beispiel #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
Beispiel #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
Beispiel #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