Files
Pennyw0rth-NetExec/cme/context.py
T
byt3bl33d3r db223b583a Some code cleanup, bug fixes and re-added the config file
* For some reason the config file got lost in between version bumps, re-added it
* Improved the logic in first_run.py, it will now autodetect missing files and will copy/generate them accordinglu
* Code cleanup in cmedb.py and bug fixes in crackmapexec.py
2016-06-08 21:44:45 -06:00

17 lines
440 B
Python

import logging
import os
from ConfigParser import ConfigParser
class Context:
def __init__(self, db, logger, arg_namespace):
self.db = db
self.log = logger
self.log.debug = logging.debug
self.localip = None
self.conf = ConfigParser()
self.conf.read(os.path.expanduser('~/.cme/cme.conf'))
for key, value in vars(arg_namespace).iteritems():
setattr(self, key, value)