同步操作将从 yeqingchen1/sqlmap 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/usr/bin/env python"""Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)See the file 'LICENSE' for copying permission"""try:import sqlite3except:passimport loggingfrom lib.core.common import getSafeExStringfrom lib.core.convert import getBytesfrom lib.core.data import conffrom lib.core.data import loggerfrom lib.core.exception import SqlmapConnectionExceptionfrom lib.core.exception import SqlmapMissingDependencefrom plugins.generic.connector import Connector as GenericConnectorclass Connector(GenericConnector):"""Homepage: http://pysqlite.googlecode.com/ and http://packages.ubuntu.com/quantal/python-sqliteUser guide: http://docs.python.org/release/2.5/lib/module-sqlite3.htmlAPI: http://docs.python.org/library/sqlite3.htmlDebian package: python-sqlite (SQLite 2), python-pysqlite3 (SQLite 3)License: MITPossible connectors: http://wiki.python.org/moin/SQLite"""def __init__(self):GenericConnector.__init__(self)self.__sqlite = sqlite3def connect(self):self.initConnection()self.checkFileDb()try:self.connector = self.__sqlite.connect(database=self.db, check_same_thread=False, timeout=conf.timeout)cursor = self.connector.cursor()cursor.execute("SELECT * FROM sqlite_master")cursor.close()except (self.__sqlite.DatabaseError, self.__sqlite.OperationalError):warnMsg = "unable to connect using SQLite 3 library, trying with SQLite 2"logger.warn(warnMsg)try:try:import sqliteexcept ImportError:errMsg = "sqlmap requires 'python-sqlite' third-party library "errMsg += "in order to directly connect to the database '%s'" % self.dbraise SqlmapMissingDependence(errMsg)self.__sqlite = sqliteself.connector = self.__sqlite.connect(database=self.db, check_same_thread=False, timeout=conf.timeout)except (self.__sqlite.DatabaseError, self.__sqlite.OperationalError) as ex:raise SqlmapConnectionException(getSafeExString(ex))self.initCursor()self.printConnected()def fetchall(self):try:return self.cursor.fetchall()except self.__sqlite.OperationalError as ex:logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) '%s'" % getSafeExString(ex))return Nonedef execute(self, query):try:self.cursor.execute(getBytes(query))except self.__sqlite.OperationalError as ex:logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) '%s'" % getSafeExString(ex))except self.__sqlite.DatabaseError as ex:raise SqlmapConnectionException(getSafeExString(ex))self.connector.commit()def select(self, query):self.execute(query)return self.fetchall()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。