import os import sys import logging import zipfile import binascii import optparse import tempfile import cobra import cobra.remoteapp as c_remoteapp import envi.common as e_common logger = logging.getLogger(__name__) e_common.setLogging(logger, 'INFO') def release(): parser = optparse.OptionParser() parser.add_option('--cacert', dest='cacert', default=None) parser.add_option('--sslkey', dest='sslkey', default=None) parser.add_option('--sslcert', dest='sslcert', default=None) opts, argv = parser.parse_args() pyzfile, appuri = argv with open(__file__, 'rb') as f: mainsrc = f.read() mainlines = mainsrc.split('\n')[:-2]
import vtrace.envitools as vt_envitools import vdb import envi.cli as e_cli import envi.common as e_common import envi.memory as e_mem import envi.expression as e_expr import envi.memcanvas as e_canvas import envi.memcanvas.renderers as e_render from vivisect.const import * logger = logging.getLogger(__name__) e_common.setLogging(logger, 'WARNING') class VivCli(vivisect.VivWorkspace, e_cli.EnviCli): ''' A class that builds upon the VivWorkspace to provide command line capabilities so that things like the Vivisect UI can provide a cleaner interface that just a direct python shell. It inherits the same parameters as the VivWorkspace (autosave and confdir currently) To add a new command, simply add a new function called `do_<cmdname>`. ''' def __init__(self, **kwargs): e_cli.EnviCli.__init__(self, self, symobj=self) vivisect.VivWorkspace.__init__(self, **kwargs) self.canvas.addRenderer("bytes", e_render.ByteRend()) self.canvas.addRenderer("u_int_16", e_render.ShortRend())
import imp import sys import time import cProfile import argparse import logging import vivisect.cli as viv_cli import vivisect.parsers as viv_parsers import envi.common as e_common import envi.config as e_config import envi.threads as e_threads logger = logging.getLogger('vivisect') e_common.setLogging(logger, level='WARNING') loglevels = (logging.CRITICAL, logging.ERROR, logging.WARN, logging.INFO, logging.DEBUG) def main(): parser = argparse.ArgumentParser( prog='vivbin', usage='%(prog)s [options] <workspace|binaries...>') parser.add_argument( '-M', '--module', dest='modname', default=None, action='store', help=
#!/usr/bin/env python import sys import argparse import traceback import logging import envi.common as e_common import vdb import vtrace import vtrace.snapshot as vt_snap logger = logging.getLogger('vdb') e_common.setLogging(logger, 'DEBUG') def targetusage(): print(''' Alternate vdb "targets" include various embedded/hardware/etc debugging capabilities which are not related to your runtime platform.... Some targets may require additional foo=bar style options added to the end of your vdb command. See details per-target below. ====================================================================== "vmware32" host=<host> port=<port> ( of listening vmware gdb server for 32 bit VM ) The "vmware32" target enables debugging with a 32bit VMWare Hypervisor using their gdb-server stub. This allows "hardware debugger" like kernel debugging.