示例#1
0
文件: api.py 项目: YHHK/sqlmap
def setRestAPILog():
    if hasattr(conf, "api"):
        conf.database_cursor = Database(conf.database)
        conf.database_cursor.connect("client")

        # Set a logging handler that writes log messages to a IPC database
        logger.removeHandler(LOGGER_HANDLER)
        LOGGER_RECORDER = LogRecorder()
        logger.addHandler(LOGGER_RECORDER)
示例#2
0
def setRestAPILog():
    if hasattr(conf, "api"):
        conf.database_cursor = Database(conf.database)
        conf.database_cursor.connect("client")

        # Set a logging handler that writes log messages to a IPC database
        logger.removeHandler(LOGGER_HANDLER)
        LOGGER_RECORDER = LogRecorder()
        logger.addHandler(LOGGER_RECORDER)
示例#3
0
文件: api.py 项目: bussiere/sqlmap
def setRestAPILog():
    if hasattr(conf, "api"):
        conf.database_connection = sqlite3.connect(conf.database, timeout=1, isolation_level=None)
        conf.database_cursor = conf.database_connection.cursor()

        # Set a logging handler that writes log messages to a IPC database
        logger.removeHandler(LOGGER_HANDLER)
        LOGGER_RECORDER = LogRecorder()
        logger.addHandler(LOGGER_RECORDER)
示例#4
0
def setRestAPILog():
    if conf.api:
        try:
            conf.databaseCursor = Database(conf.database)
            conf.databaseCursor.connect("client")
        except sqlite3.OperationalError as ex:
            raise SqlmapConnectionException("%s ('%s')" % (ex, conf.database))

        # Set a logging handler that writes log messages to a IPC database
        logger.removeHandler(LOGGER_HANDLER)
        LOGGER_RECORDER = LogRecorder()
        logger.addHandler(LOGGER_RECORDER)
示例#5
0
def setRestAPILog():
    if hasattr(conf, "api"):
        try:
            conf.database_cursor = Database(conf.database)
            conf.database_cursor.connect("client")
        except sqlite3.OperationalError, ex:
            raise SqlmapConnectionException, "%s ('%s')" % (ex, conf.database)

        # Set a logging handler that writes log messages to a IPC database
        logger.removeHandler(LOGGER_HANDLER)
        LOGGER_RECORDER = LogRecorder()
        logger.addHandler(LOGGER_RECORDER)
示例#6
0
def setRestAPILog():
    if conf.api:
        try:
            conf.databaseCursor = Database(conf.database)
            conf.databaseCursor.connect("client")
        except sqlite3.OperationalError, ex:
            raise SqlmapConnectionException, "%s ('%s')" % (ex, conf.database)

        # 设置将日志消息写入IPC数据库的日志处理程序
        logger.removeHandler(LOGGER_HANDLER)
        LOGGER_RECORDER = LogRecorder()
        logger.addHandler(LOGGER_RECORDER)