def init(name=__name__, fields=None, timer=None, emitter=log.emit_simple, save_actions=None, save_errors=None, hook_tb=tb.long_tb): if isinstance(name, tuple): name, code = name code = log.register_action(str(name), int(code)) else: code = log.register_action(name) log.start_root_log(code, fields, timer) if emitter: log.add_global_emit(emitter) sys.path = [] set_builtins() tb.set_excepthook(hook_tb) # if save_errors: log.save_errors(save_errors) if save_actions: log.save_actions(save_actions)
""" import os import struct import sys from docopt import docopt from pysec import alg from pysec import binary from pysec.io import fd from pysec.kv.kyoto import KyotoKV from pysec import log from pysec import tb tb.set_excepthook(tb.long_tb) KV = dict DOS_HEADER = '<HHHHHHHHHHHHHH8sHH20sI' FILE_HEADER = '<HHIIIHH' OPT_HEADER = '<HBBIIIIIIIIIHHHHHHIIIIHHIIIIII' def get_offset(data): if len(data) < 64: return None dos_hdr = data[:64]
#!/usr/bin/python2.7 -OOBRtt import os import sys from pysec import load, tb tb.set_excepthook(tb.short_tb) print "Modules tab path:", path = os.path.abspath(raw_input()) print "Loading modules' tab..." load.load_tab(path) print "Loading 'docopt'..." docopt = load.importlib('docopt') print "Loading 'paypal'..." paypal = load.importlib('paypal', version=(1, 0, 3))