本文整理汇总了Python中miasm2.analysis.machine.Machine.available_machine方法的典型用法代码示例。如果您正苦于以下问题:Python Machine.available_machine方法的具体用法?Python Machine.available_machine怎么用?Python Machine.available_machine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类miasm2.analysis.machine.Machine
的用法示例。
在下文中一共展示了Machine.available_machine方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: execfile
# 需要导入模块: from miasm2.analysis.machine import Machine [as 别名]
# 或者: from miasm2.analysis.machine.Machine import available_machine [as 别名]
console_handler = logging.StreamHandler()
console_handler.setFormatter(logging.Formatter("%(levelname)-5s: %(message)s"))
log.addHandler(console_handler)
log.setLevel(logging.INFO)
filename = os.environ.get('PYTHONSTARTUP')
if filename and os.path.isfile(filename):
execfile(filename)
parser = ArgumentParser("Disassemble a binary")
parser.add_argument('filename', help="File to disassemble")
parser.add_argument('address', help="Starting address for disassembly engine",
nargs="*")
parser.add_argument('-m', '--architecture', help="architecture: " + \
",".join(Machine.available_machine()))
parser.add_argument('-f', "--followcall", action="store_true",
help="Follow call instructions")
parser.add_argument('-b', "--blockwatchdog", default=None, type=int,
help="Maximum number of basic block to disassemble")
parser.add_argument('-n', "--funcswatchdog", default=None, type=int,
help="Maximum number of function to disassemble")
parser.add_argument('-r', "--recurfunctions", action="store_true",
help="Disassemble founded functions")
parser.add_argument('-v', "--verbose", action="store_true", help="Verbose mode")
parser.add_argument('-g', "--gen_ir", action="store_true",
help="Compute the intermediate representation")
parser.add_argument('-z', "--dis-nulstart-block", action="store_true",
help="Do not disassemble NULL starting block")
parser.add_argument('-l', "--dontdis-retcall", action="store_true",
help="If set, disassemble only call destinations")
示例2: execfile
# 需要导入模块: from miasm2.analysis.machine import Machine [as 别名]
# 或者: from miasm2.analysis.machine.Machine import available_machine [as 别名]
from pdb import pm
log = logging.getLogger("dis")
console_handler = logging.StreamHandler()
console_handler.setFormatter(logging.Formatter("%(levelname)-5s: %(message)s"))
log.addHandler(console_handler)
log.setLevel(logging.INFO)
filename = os.environ.get('PYTHONSTARTUP')
if filename and os.path.isfile(filename):
execfile(filename)
parser = OptionParser(usage="usage: %prog [options] file address")
parser.add_option('-m', "--architecture", dest="machine", metavar="MACHINE",
help="architecture: " + ",".join(Machine.available_machine()))
parser.add_option('-f', "--followcall", dest="followcall", action="store_true",
default=False,
help="follow call")
parser.add_option('-b', "--blocwatchdog", dest="bw",
default=None,
help="address to disasemble")
parser.add_option('-n', "--funcsnumwatchdog", dest="funcswd",
default=None,
help="max func to disasm")
parser.add_option(
'-r', "--recurfunctions", dest="recurfunctions", action="store_true",
default=False,
示例3: ArgumentParser
# 需要导入模块: from miasm2.analysis.machine import Machine [as 别名]
# 或者: from miasm2.analysis.machine.Machine import available_machine [as 别名]
from argparse import ArgumentParser
from pdb import pm
import json
from miasm2.analysis.machine import Machine
from miasm2.analysis.binary import Container
from miasm2.analysis.depgraph import DependencyGraph
from miasm2.expression.expression import ExprMem, ExprId, ExprInt32
parser = ArgumentParser("Dependency grapher")
parser.add_argument("filename", help="Binary to analyse")
parser.add_argument("func_addr", help="Function address")
parser.add_argument("target_addr", help="Address to start")
parser.add_argument("element", nargs="+", help="Elements to track")
parser.add_argument("-m", "--architecture",
help="Architecture (%s)" % Machine.available_machine())
parser.add_argument("-i", "--implicit", help="Use implicit tracking",
action="store_true")
parser.add_argument("--unfollow-mem", help="Stop on memory statements",
action="store_true")
parser.add_argument("--unfollow-call", help="Stop on call statements",
action="store_true")
parser.add_argument("--do-not-simplify", help="Do not simplify expressions",
action="store_true")
parser.add_argument("--rename-args",
help="Rename common arguments (@32[ESP_init] -> Arg1)",
action="store_true")
parser.add_argument("--json",
help="Output solution in JSON",
action="store_true")
args = parser.parse_args()
示例4: execfile
# 需要导入模块: from miasm2.analysis.machine import Machine [as 别名]
# 或者: from miasm2.analysis.machine.Machine import available_machine [as 别名]
log = logging.getLogger("dis")
console_handler = logging.StreamHandler()
console_handler.setFormatter(logging.Formatter("%(levelname)-5s: %(message)s"))
log.addHandler(console_handler)
log.setLevel(logging.INFO)
filename = os.environ.get("PYTHONSTARTUP")
if filename and os.path.isfile(filename):
execfile(filename)
parser = ArgumentParser("Disassemble a binary")
parser.add_argument("filename", help="File to disassemble")
parser.add_argument("address", help="Starting address for disassembly engine", nargs="*")
parser.add_argument("-m", "--architecture", help="architecture: " + ",".join(Machine.available_machine()))
parser.add_argument("-f", "--followcall", action="store_true", help="Follow call instructions")
parser.add_argument(
"-b", "--blockwatchdog", default=None, type=int, help="Maximum number of basic block to disassemble"
)
parser.add_argument("-n", "--funcswatchdog", default=None, type=int, help="Maximum number of function to disassemble")
parser.add_argument("-r", "--recurfunctions", action="store_true", help="Disassemble founded functions")
parser.add_argument("-v", "--verbose", action="store_true", help="Verbose mode")
parser.add_argument("-g", "--gen_ir", action="store_true", help="Compute the intermediate representation")
parser.add_argument("-z", "--dis-nulstart-block", action="store_true", help="Do not disassemble NULL starting block")
parser.add_argument("-l", "--dontdis-retcall", action="store_true", help="If set, disassemble only call destinations")
parser.add_argument("-s", "--simplify", action="store_true", help="Use the liveness analysis pass")
parser.add_argument(
"-o", "--shiftoffset", default=None, type=lambda x: int(x, 0), help="Shift input binary by an offset"
)
parser.add_argument("-a", "--try-disasm-all", action="store_true", help="Try to disassemble the whole binary")