()
| 279 | conf.databaseCursor.execute("INSERT INTO logs VALUES(NULL, ?, ?, ?, ?)", (conf.taskid, time.strftime("%X"), record.levelname, str(record.msg % record.args if record.args else record.msg))) |
| 280 | |
| 281 | def setRestAPILog(): |
| 282 | if conf.api: |
| 283 | try: |
| 284 | conf.databaseCursor = Database(conf.database) |
| 285 | conf.databaseCursor.connect("client") |
| 286 | except sqlite3.OperationalError as ex: |
| 287 | raise SqlmapConnectionException("%s ('%s')" % (ex, conf.database)) |
| 288 | |
| 289 | # Set a logging handler that writes log messages to a IPC database |
| 290 | logger.removeHandler(LOGGER_HANDLER) |
| 291 | LOGGER_RECORDER = LogRecorder() |
| 292 | logger.addHandler(LOGGER_RECORDER) |
| 293 | |
| 294 | # Generic functions |
| 295 | def is_admin(token): |
no test coverage detected
searching dependent graphs…