summaryrefslogtreecommitdiff
path: root/logmaster.py
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-05-06 22:39:49 -0300
committerJesusaves <cpntb1@ymail.com>2022-05-06 22:39:49 -0300
commit6f2873829fcf8306f87d1f1a982a4f0455e540a3 (patch)
treeff5049cc91eb47a299a483adc26c88da40115c88 /logmaster.py
parenta3cc3e6e307bfd0006751b1129493c99da8e2131 (diff)
downloadserverdata-6f2873829fcf8306f87d1f1a982a4f0455e540a3.tar.gz
serverdata-6f2873829fcf8306f87d1f1a982a4f0455e540a3.tar.bz2
serverdata-6f2873829fcf8306f87d1f1a982a4f0455e540a3.tar.xz
serverdata-6f2873829fcf8306f87d1f1a982a4f0455e540a3.zip
Send API messages using the logmaster instead of the C engine if possible.
Diffstat (limited to 'logmaster.py')
-rwxr-xr-xlogmaster.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/logmaster.py b/logmaster.py
index 97941a8a4..cdd59df16 100755
--- a/logmaster.py
+++ b/logmaster.py
@@ -24,7 +24,7 @@ import mysql.connector, signal, sys, threading, time, traceback
## Default values
HOST="127.0.0.1"; PORT=0; USER=""; PASS=""; DBXT=""; db=None;
sqli = []; running=True
-SQL_PINGTIME=300.0; SQL_FLUSH=3.0
+SQL_PINGTIME=300.0; SQL_FLUSH=1.0
## Warnings
ERR=0
@@ -177,7 +177,7 @@ while running:
## Command: SAD
## Description: Replaces "?" with escaped data.
elif cmd.startswith("SAD"):
- bf=bf.replace("?%s" % cmd.replace("SAD", ""), args.replace("\\", "\\\\").replace('"','\\"').replace("'", "\\'"))
+ bf=bf.replace("?%s" % cmd.replace("SAD", ""), args.replace("\\", "\\\\").replace('"','\\"').replace("'", "\\'").replace('\n','').replace('\r','').replace('\0',''))
## Command: SQLRUN
## Description: Executes the prepared SQL statement.
## Sanitization must be done using SAD commands.