NetExec/nxc/context.py

22 lines
532 B
Python
Raw Normal View History

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
2019-11-10 21:42:04 +00:00
import configparser
2023-04-07 17:12:56 +00:00
import os
2016-05-16 23:48:31 +00:00
class Context:
def __init__(self, db, logger, args):
for key, value in vars(args).items():
setattr(self, key, value)
2016-05-16 23:48:31 +00:00
self.db = db
self.log_folder_path = os.path.join(os.path.expanduser("~/.nxc"), "logs")
2016-05-16 23:48:31 +00:00
self.localip = None
2019-11-10 21:42:04 +00:00
self.conf = configparser.ConfigParser()
self.conf.read(os.path.expanduser("~/.nxc/nxc.conf"))
2016-05-16 23:48:31 +00:00
2023-03-22 09:36:08 +00:00
self.log = logger
# self.log.debug = logging.debug