当前位置: 首页>>代码示例>>Python>>正文


Python commands.Command方法代码示例

本文整理汇总了Python中volatility.commands.Command方法的典型用法代码示例。如果您正苦于以下问题:Python commands.Command方法的具体用法?Python commands.Command怎么用?Python commands.Command使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在volatility.commands的用法示例。


在下文中一共展示了commands.Command方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: print_info

# 需要导入模块: from volatility import commands [as 别名]
# 或者: from volatility.commands import Command [as 别名]
def print_info():
    """ Returns the results """
    categories = {addrspace.BaseAddressSpace: 'Address Spaces',
                  commands.Command : 'Plugins',
                  obj.Profile: 'Profiles',
                  scan.ScannerCheck: 'Scanner Checks'}
    for c, n in sorted(categories.items()):
        lower = (c == commands.Command)
        plugins = registry.get_plugin_classes(c, lower = lower)
        print "\n"
        print "{0}".format(n)
        print "-" * len(n)

        result = []
        max_length = 0
        for clsname, cls in sorted(plugins.items()):
            try:
                doc = cls.__doc__.strip().splitlines()[0]
            except AttributeError:
                doc = 'No docs'
            result.append((clsname, doc))
            max_length = max(len(clsname), max_length)

        for (name, doc) in result:
            print "{0:{2}} - {1:15}".format(name, doc, max_length) 
开发者ID:virtualrealitysystems,项目名称:aumfor,代码行数:27,代码来源:vol.py

示例2: __init__

# 需要导入模块: from volatility import commands [as 别名]
# 或者: from volatility.commands import Command [as 别名]
def __init__(self, config, *args, **kwargs):
        commands.Command.__init__(self, config, *args, **kwargs)
        self._config.add_option('BIN', short_option = 'B', default = None, help = 'Filename for the dumped chain', action = 'store', type = 'str')
        self._config.add_option('MODE', short_option = 'm', default = 'x64', help = 'Modes: x86 and x64', action = 'store', type = 'str') 
        self._config.add_option('IJSON', short_option = 'i', default = None, help = 'JSON Trace Input file', action = 'store', type = 'str')
        self._config.add_option('GLIMIT', short_option = 'G', default = None, help = 'Gadget Limit Number', action = 'store', type = 'int') 
        self._config.add_option('CLEAN', short_option = 'C',  dest="clean", default = False, action="store_true", help="Clean /tmp files")  
        self._config.add_option('DB', short_option = 'D', default = None, action="store", help="Filename for the opcode DB", type = 'str')
        self._config.add_option('SGADGET', short_option = 'S', default = -1, action="store", help="Starting gadget for emulation", type = 'int') 
        self._config.add_option('IDB', short_option = 'I', default = None, action="store", help="Input opcodes DB", type = 'str')
        self.dump_fd = 0
        self.gid = 0
        self.md = None
        self.WHITELIST_INSTRUCTIONS = ['mov', 'pop', 'add', 'sub', 'xor', 'pushf']
        self.BLACKLIST_INSTRUCTIONS = ['ret', 'call', 'leave']
        self.GREYLIST_INSTRUCTIONS = []
        self.trace = OrderedDict()
        self.opcodes_db = OrderedDict()
        self.NASM = '/usr/bin/nasm'
        self.branch = [X86_GRP_JUMP, X86_GRP_INT, X86_GRP_CALL, X86_GRP_RET, X86_GRP_IRET, X86_GRP_VM] 
开发者ID:Cisco-Talos,项目名称:ROPMEMU,代码行数:22,代码来源:unchain.py

示例3: list_plugins

# 需要导入模块: from volatility import commands [as 别名]
# 或者: from volatility.commands import Command [as 别名]
def list_plugins(self):
        """
        list of plugins valid for the selected profile
        :return:
        """
        plugin_list = []
        cmds = registry.get_plugin_classes(commands.Command, lower=True)
        profs = registry.get_plugin_classes(obj.Profile)
        profile_type = self.config.PROFILE
        if profile_type not in profs:
            print "Not a valid profile"
        profile = profs[profile_type]()
        for cmdname in sorted(cmds):
            command = cmds[cmdname]
            helpline = command.help() or ''

            if command.is_valid_profile(profile):
                plugin_list.append([cmdname, helpline])
        return plugin_list 
开发者ID:kevthehermit,项目名称:VolUtility,代码行数:21,代码来源:vol_interface.py

示例4: __init__

# 需要导入模块: from volatility import commands [as 别名]
# 或者: from volatility.commands import Command [as 别名]
def __init__(self, config, *args, **kwargs):
        commands.Command.__init__(self, config, *args, **kwargs)
        config.add_option('XML-INPUT', short_option = 'x',
                  help = 'Input XML file for patching binaries') 
开发者ID:virtualrealitysystems,项目名称:aumfor,代码行数:6,代码来源:patcher.py

示例5: __init__

# 需要导入模块: from volatility import commands [as 别名]
# 或者: from volatility.commands import Command [as 别名]
def __init__(self, *args, **kwargs):
        self.addr_space = None
        self.known_addrs = {}
        self.known_fops  = {}
        commands.Command.__init__(self, *args, **kwargs) 
开发者ID:virtualrealitysystems,项目名称:aumfor,代码行数:7,代码来源:common.py

示例6: execute

# 需要导入模块: from volatility import commands [as 别名]
# 或者: from volatility.commands import Command [as 别名]
def execute(self, *args, **kwargs):
        commands.Command.execute(self, *args, **kwargs) 
开发者ID:virtualrealitysystems,项目名称:aumfor,代码行数:4,代码来源:common.py

示例7: __init__

# 需要导入模块: from volatility import commands [as 别名]
# 或者: from volatility.commands import Command [as 别名]
def __init__(self, *args, **kwargs):
        self.addr_space = None
        commands.Command.__init__(self, *args, **kwargs) 
开发者ID:virtualrealitysystems,项目名称:aumfor,代码行数:5,代码来源:common.py

示例8: __init__

# 需要导入模块: from volatility import commands [as 别名]
# 或者: from volatility.commands import Command [as 别名]
def __init__(self, *args, **kwargs):
        commands.Command.__init__(self, *args, **kwargs)
        self._config.add_option("BLOCKSIZE", short_option = "b", default = 1024 * 1024 * 5,
                                help = "Size (in bytes) of blocks to copy",
                                action = 'store', type = 'int')
        self._config.add_option("OUTPUT-IMAGE", short_option = "O", default = None,
                                help = "Writes a raw DD image out to OUTPUT-IMAGE",
                                action = 'store', type = 'str')
        self._config.add_option("COUNT", short_option = "c", default = False,
                                help = "Show status of copy in byte count",
                                action = 'store_true') 
开发者ID:virtualrealitysystems,项目名称:aumfor,代码行数:13,代码来源:imagecopy.py

示例9: list_plugins

# 需要导入模块: from volatility import commands [as 别名]
# 或者: from volatility.commands import Command [as 别名]
def list_plugins():
    result = "\n\tSupported Plugin Commands:\n\n"
    cmds = registry.get_plugin_classes(commands.Command, lower = True)
    profs = registry.get_plugin_classes(obj.Profile)
    if config.PROFILE == None:
        config.update("PROFILE", "WinXPSP2x86")
    if config.PROFILE not in profs:
        raise BaseException("Invalid profile " + config.PROFILE + " selected")
    profile = profs[config.PROFILE]()
    wrongprofile = ""
    for cmdname in sorted(cmds):
        command = cmds[cmdname]
        helpline = command.help() or ''
        ## Just put the title line (First non empty line) in this
        ## abbreviated display
        for line in helpline.splitlines():
            if line:
                helpline = line
                break
        if command.is_valid_profile(profile):
            result += "\t\t{0:15}\t{1}\n".format(cmdname, helpline)
        else:
            wrongprofile += "\t\t{0:15}\t{1}\n".format(cmdname, helpline)

    if wrongprofile and config.VERBOSE:
        result += "\n\tPlugins requiring a different profile:\n\n"
        result += wrongprofile

    return result 
开发者ID:virtualrealitysystems,项目名称:aumfor,代码行数:31,代码来源:vol.py

示例10: get_config

# 需要导入模块: from volatility import commands [as 别名]
# 或者: from volatility.commands import Command [as 别名]
def get_config(profile, target_path):
   config = conf.ConfObject()
   registry.register_global_options(config, commands.Command)
   registry.register_global_options(config, addrspace.BaseAddressSpace)
   config.parse_options()
   config.PROFILE = profile
   config.LOCATION = "file://{0}".format(target_path)
   return config 
开发者ID:virtualrealitysystems,项目名称:aumfor,代码行数:10,代码来源:libapi.py

示例11: __init__

# 需要导入模块: from volatility import commands [as 别名]
# 或者: from volatility.commands import Command [as 别名]
def __init__(self, *args, **kwargs):
        self.addr_space = None
        self.known_addrs = {}
        commands.Command.__init__(self, *args, **kwargs) 
开发者ID:vortessence,项目名称:vortessence,代码行数:6,代码来源:common.py

示例12: __init__

# 需要导入模块: from volatility import commands [as 别名]
# 或者: from volatility.commands import Command [as 别名]
def __init__(self, *args, **kwargs):
        commands.Command.__init__(self, *args, **kwargs)
        self._config.add_option("BLOCKSIZE", short_option = "b", default = 1024 * 1024 * 5,
                                help = "Size (in bytes) of blocks to copy",
                                action = 'store', type = 'int')
        self._config.add_option("OUTPUT-IMAGE", short_option = "O", default = None,
                                help = "Writes a raw DD image out to OUTPUT-IMAGE",
                                action = 'store', type = 'str') 
开发者ID:vortessence,项目名称:vortessence,代码行数:10,代码来源:imagecopy.py


注:本文中的volatility.commands.Command方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。