def __init__(self, parser): self.ROOT_PREFIX = parser.get("app_config", "confdir") self.category = "Banned Extension" self.config_file = self.ROOT_PREFIX + "/lists/bannedextensionlist" self.extension_list = loadFile(self.config_file) self.handler = "blockpage" # Stop as soon as a match is found self.stop_after_match = True
def __init__(self, parser): self.ROOT_PREFIX = parser.get('app_config', 'confdir') self.category = "Exception Header Regex" self.config_file = self.ROOT_PREFIX + "/lists/exceptionregexpheaderlist" self.regex_list = loadFile(self.config_file) self.handler = "allowpage" # Stop as soon as a match is found self.stop_after_match = True
def __init__(self, parser): self.ROOT_PREFIX = parser.get('app_config', 'confdir') self.category = "Banned Extension" self.config_file = self.ROOT_PREFIX + "/lists/bannedextensionlist" self.extension_list = loadFile(self.config_file) self.handler = "blockpage" # Stop as soon as a match is found self.stop_after_match = True
def __init__(self, parser): self.ROOT_PREFIX = parser.get('app_config', 'confdir') self.category = "Exception Extension" self.config_file = self.ROOT_PREFIX + "/lists/exceptionextensionlist" self.extension_list = loadFile(self.config_file) self.handler = "allowpage" # Stop as soon as a match is found self.stop_after_match = True
def __init__(self, parser): self.ROOT_PREFIX = parser.get('app_config', 'confdir') self.category = "Banned Mimetype" self.config_file = self.ROOT_PREFIX + "/lists/bannedmimetypelist" self.mimetype_list = loadFile(self.config_file) self.handler = "blockpage" # Stop as soon as a match is found self.stop_after_match = True
def __init__(self, parser): self.clean_cache = {} self.ROOT_PREFIX = parser.get('app_config', 'confdir') self.category = "Banned Youtube Video" self.config_file = self.ROOT_PREFIX + "/lists/bannedyoutubelist" self.regex_list = loadFile(self.config_file) self.handler = "blockpage" # Stop as soon as a match is found self.stop_after_match = True
def __init__(self, parser): self.ROOT_PREFIX = parser.get('app_config', 'confdir') self.category = "Banned Phrase" self.config_file = self.ROOT_PREFIX + "/lists/bannedphraselist" self.wordMap = WordMap() strings = loadFile(self.config_file) for string in strings: phrase = Phrase() phrase.addPhrase(string) self.wordMap.add(phrase) self.wordMap.sort() self.handler = "blockpage" # Stop as soon as a match is found self.stop_after_match = True # Scan each chunk individually self.scan_chunks = True
def __init__(self, parser): self.ROOT_PREFIX = parser.get('app_config', 'confdir') self.category = "Exception Phrase" self.config_file = self.ROOT_PREFIX + "/lists/exceptionphraselist" self.phrase_list = {} strings = loadFile(self.config_file) for string in strings: phrase = Phrase() phrase.addPhrase(string) phrase_key = phrase.getKey() for char in phrase_key: if not char in self.phrase_list: self.phrase_list[char] = [] self.phrase_list[char].append(phrase) self.handler = "noop" # Stop as soon as a match is found self.stop_after_match = True # Scan each chunk individually self.scan_chunks = True