mirror of
https://github.com/dobin/SuperMega
synced 2026-06-02 17:27:10 +00:00
feature: UI/UX improvements
This commit is contained in:
@@ -8,6 +8,9 @@ import shutil
|
||||
from config import config
|
||||
|
||||
|
||||
logger = logging.getLogger("Sender")
|
||||
|
||||
|
||||
def scannerDetectsBytes(data: bytes, filename: str, useBrotli=True, verify=False):
|
||||
params = { 'filename': filename, 'brotli': useBrotli, 'verify': verify }
|
||||
if useBrotli:
|
||||
@@ -16,11 +19,12 @@ def scannerDetectsBytes(data: bytes, filename: str, useBrotli=True, verify=False
|
||||
scanData = data
|
||||
|
||||
timeStart = time.time()
|
||||
print("Send to exec/exe: {}".format(params))
|
||||
logger.info("Send to exec/exe: {}".format(params))
|
||||
res = req.post("{}/exec/exe".format(config.get("avred_server")), params=params, data=scanData, timeout=10)
|
||||
jsonRes = res.json()
|
||||
print("Response: {}".format(jsonRes))
|
||||
scanTime = round(time.time() - timeStart, 3)
|
||||
logger.info("Response: {}s: {}".format(scanTime, jsonRes))
|
||||
|
||||
|
||||
# basically internal server error, e.g. AMSI not working
|
||||
if res.status_code != 200:
|
||||
|
||||
Reference in New Issue
Block a user