Skip to content

Commit 5772d89

Browse files
committed
Fixes #2266
1 parent 7000373 commit 5772d89

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

lib/core/replication.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from extra.safe2bin.safe2bin import safechardecode
1111
from lib.core.common import getSafeExString
1212
from lib.core.common import unsafeSQLIdentificatorNaming
13+
from lib.core.exception import SqlmapConnectionException
1314
from lib.core.exception import SqlmapGenericException
1415
from lib.core.exception import SqlmapValueException
1516
from lib.core.settings import UNICODE_ENCODING
@@ -21,10 +22,15 @@ class Replication(object):
2122
"""
2223

2324
def __init__(self, dbpath):
24-
self.dbpath = dbpath
25-
self.connection = sqlite3.connect(dbpath)
26-
self.connection.isolation_level = None
27-
self.cursor = self.connection.cursor()
25+
try:
26+
self.dbpath = dbpath
27+
self.connection = sqlite3.connect(dbpath)
28+
self.connection.isolation_level = None
29+
self.cursor = self.connection.cursor()
30+
except sqlite3.OperationalError, ex:
31+
errMsg = "error occurred while opening a replication "
32+
errMsg += "file '%s' ('%s')" % (self.filepath, getSafeExString(ex))
33+
raise SqlmapConnectionException(errMsg)
2834

2935
class DataType:
3036
"""

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.enums import OS
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.0.11.8"
22+
VERSION = "1.0.11.9"
2323
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2424
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2525
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/utils/hashdb.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from lib.core.common import singleTimeWarnMessage
1818
from lib.core.common import unserializeObject
1919
from lib.core.data import logger
20-
from lib.core.exception import SqlmapDataException
20+
from lib.core.exception import SqlmapConnectionException
2121
from lib.core.settings import HASHDB_END_TRANSACTION_RETRIES
2222
from lib.core.settings import HASHDB_FLUSH_RETRIES
2323
from lib.core.settings import HASHDB_FLUSH_THRESHOLD
@@ -44,7 +44,7 @@ def _get_cursor(self):
4444
except Exception, ex:
4545
errMsg = "error occurred while opening a session "
4646
errMsg += "file '%s' ('%s')" % (self.filepath, getSafeExString(ex))
47-
raise SqlmapDataException(errMsg)
47+
raise SqlmapConnectionException(errMsg)
4848

4949
return threadData.hashDBCursor
5050

@@ -92,7 +92,7 @@ def retrieve(self, key, unserialize=False):
9292
except sqlite3.DatabaseError, ex:
9393
errMsg = "error occurred while accessing session file '%s' ('%s'). " % (self.filepath, getSafeExString(ex))
9494
errMsg += "If the problem persists please rerun with `--flush-session`"
95-
raise SqlmapDataException, errMsg
95+
raise SqlmapConnectionException, errMsg
9696
else:
9797
break
9898

txt/checksum.md5

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ d027df65e7cbb99758daf77aaa6ab61c lib/core/optiondict.py
4242
eb5e96b4baef52ad172e0359c1783d83 lib/core/option.py
4343
7af487340c138f7b5dbd443161cbb428 lib/core/profiling.py
4444
e60456db5380840a586654344003d4e6 lib/core/readlineng.py
45-
4502017bfdabd9d29bba10fed1b54e35 lib/core/replication.py
45+
b3a62d41a5af6cd7fa733b6227febb0c lib/core/replication.py
4646
99a2b496b9d5b546b335653ca801153f lib/core/revision.py
4747
7c15dd2777af4dac2c89cab6df17462e lib/core/session.py
48-
e9e85d7705eb178f10e1205d8b3a2a00 lib/core/settings.py
48+
029fde655c5314b617c5479058738c1d lib/core/settings.py
4949
7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py
5050
23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py
5151
c3ace7874a536d801f308cf1fd03df99 lib/core/target.py
@@ -103,7 +103,7 @@ f5d6884cdeed28281187c111d3e49e3b lib/techniques/union/test.py
103103
8cdc8c1e663c3b92a756fb7b02cc3c02 lib/utils/crawler.py
104104
84604ae4cf0f31602b412036b51f5dae lib/utils/deps.py
105105
4dfd3a95e73e806f62372d63bc82511f lib/utils/getch.py
106-
f20b306a3895e9585834c3491dcfc8d5 lib/utils/hashdb.py
106+
f71a7b0aec145ba77edd3c4543621fb9 lib/utils/hashdb.py
107107
0330607242d4f704ae6d7bba5f52ccae lib/utils/hash.py
108108
a3e885f7d4c6ff05db1156244bb84158 lib/utils/htmlentities.py
109109
cc9c82cfffd8ee9b25ba3af6284f057e lib/utils/__init__.py

0 commit comments

Comments
 (0)