def __init__(self, user_profile = None, *args): UmitConfigParser.__init__(self, *args) if not user_profile: user_profile = Path.scan_profile fconf = open(user_profile, 'r') self.readfp(fconf, user_profile) fconf.close() del(fconf) self.attributes = {}
def __init__(self, user_profile=None, *args): UmitConfigParser.__init__(self, *args) if not user_profile: user_profile = Path.scan_profile fconf = open(user_profile, 'r') self.readfp(fconf, user_profile) fconf.close() del (fconf) self.attributes = {}
def __init__(self, user_profile=None, *args): UmitConfigParser.__init__(self, *args) try: if not user_profile: user_profile = Path.scan_profile self.read(user_profile) except ConfigParser_Error as e: # No scan profiles found is not a reason to crash. self.add_profile(_("Profiles not found"), command="nmap", description=_("The {} file is missing or corrupted").format(user_profile)) self.attributes = {}
def __init__(self, user_profile=None, *args): UmitConfigParser.__init__(self, *args) try: if not user_profile: user_profile = Path.scan_profile self.read(user_profile) except Exception as e: # No scan profiles found is not a reason to crash. self.add_profile("Profiles not found", command="nmap", description="The {} file was not found".format(user_profile)) self.attributes = {}
def __init__(self, user_profile=None, *args): UmitConfigParser.__init__(self, *args) try: if not user_profile: user_profile = Path.scan_profile self.read(user_profile) except ConfigParser_Error as e: # No scan profiles found is not a reason to crash. self.add_profile(_("Profiles not found"), command="nmap", description=_("The {} file is missing or corrupted" ).format(user_profile)) self.attributes = {}