Refactored code now working

This commit is contained in:
nik012003
2022-07-12 23:14:32 +02:00
parent 1e94c26fd6
commit e331a31530
9 changed files with 39 additions and 86 deletions

View File

@@ -1,6 +1,7 @@
from typing import Union
import json, sqlite3, os
from hashlib import md5
import base64
class SQLite():
def __init__(self, db_name: str) -> None:
@@ -116,7 +117,7 @@ class Service:
class Regex:
def __init__(self, id: int, regex: str, mode: str, service_id: str, is_blacklist: bool, blocked_packets: int, is_case_sensitive: bool, active: bool):
self.regex = regex
self.regex = base64.b64decode(regex)
self.mode = mode
self.service_id = service_id
self.is_blacklist = is_blacklist