This commit is contained in:
Miroslav Stampar 2016-11-09 12:20:54 +01:00
parent 7000373c4b
commit 5772d8904d
4 changed files with 17 additions and 11 deletions

View File

@ -10,6 +10,7 @@ import sqlite3
from extra.safe2bin.safe2bin import safechardecode
from lib.core.common import getSafeExString
from lib.core.common import unsafeSQLIdentificatorNaming
from lib.core.exception import SqlmapConnectionException
from lib.core.exception import SqlmapGenericException
from lib.core.exception import SqlmapValueException
from lib.core.settings import UNICODE_ENCODING
@ -21,10 +22,15 @@ class Replication(object):
"""
def __init__(self, dbpath):
self.dbpath = dbpath
self.connection = sqlite3.connect(dbpath)
self.connection.isolation_level = None
self.cursor = self.connection.cursor()
try:
self.dbpath = dbpath
self.connection = sqlite3.connect(dbpath)
self.connection.isolation_level = None
self.cursor = self.connection.cursor()
except sqlite3.OperationalError, ex:
errMsg = "error occurred while opening a replication "
errMsg += "file '%s' ('%s')" % (self.filepath, getSafeExString(ex))
raise SqlmapConnectionException(errMsg)
class DataType:
"""

View File

@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
from lib.core.enums import OS
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.0.11.8"
VERSION = "1.0.11.9"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

View File

@ -17,7 +17,7 @@ from lib.core.common import serializeObject
from lib.core.common import singleTimeWarnMessage
from lib.core.common import unserializeObject
from lib.core.data import logger
from lib.core.exception import SqlmapDataException
from lib.core.exception import SqlmapConnectionException
from lib.core.settings import HASHDB_END_TRANSACTION_RETRIES
from lib.core.settings import HASHDB_FLUSH_RETRIES
from lib.core.settings import HASHDB_FLUSH_THRESHOLD
@ -44,7 +44,7 @@ class HashDB(object):
except Exception, ex:
errMsg = "error occurred while opening a session "
errMsg += "file '%s' ('%s')" % (self.filepath, getSafeExString(ex))
raise SqlmapDataException(errMsg)
raise SqlmapConnectionException(errMsg)
return threadData.hashDBCursor
@ -92,7 +92,7 @@ class HashDB(object):
except sqlite3.DatabaseError, ex:
errMsg = "error occurred while accessing session file '%s' ('%s'). " % (self.filepath, getSafeExString(ex))
errMsg += "If the problem persists please rerun with `--flush-session`"
raise SqlmapDataException, errMsg
raise SqlmapConnectionException, errMsg
else:
break

View File

@ -42,10 +42,10 @@ d027df65e7cbb99758daf77aaa6ab61c lib/core/optiondict.py
eb5e96b4baef52ad172e0359c1783d83 lib/core/option.py
7af487340c138f7b5dbd443161cbb428 lib/core/profiling.py
e60456db5380840a586654344003d4e6 lib/core/readlineng.py
4502017bfdabd9d29bba10fed1b54e35 lib/core/replication.py
b3a62d41a5af6cd7fa733b6227febb0c lib/core/replication.py
99a2b496b9d5b546b335653ca801153f lib/core/revision.py
7c15dd2777af4dac2c89cab6df17462e lib/core/session.py
e9e85d7705eb178f10e1205d8b3a2a00 lib/core/settings.py
029fde655c5314b617c5479058738c1d lib/core/settings.py
7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py
23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py
c3ace7874a536d801f308cf1fd03df99 lib/core/target.py
@ -103,7 +103,7 @@ f5d6884cdeed28281187c111d3e49e3b lib/techniques/union/test.py
8cdc8c1e663c3b92a756fb7b02cc3c02 lib/utils/crawler.py
84604ae4cf0f31602b412036b51f5dae lib/utils/deps.py
4dfd3a95e73e806f62372d63bc82511f lib/utils/getch.py
f20b306a3895e9585834c3491dcfc8d5 lib/utils/hashdb.py
f71a7b0aec145ba77edd3c4543621fb9 lib/utils/hashdb.py
0330607242d4f704ae6d7bba5f52ccae lib/utils/hash.py
a3e885f7d4c6ff05db1156244bb84158 lib/utils/htmlentities.py
cc9c82cfffd8ee9b25ba3af6284f057e lib/utils/__init__.py