Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 657c651

Browse files
committed
Graceful fail for --gui (#4601)
1 parent 970c7f6 commit 657c651

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

lib/core/gui.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from lib.core.defaults import defaults
2121
from lib.core.enums import MKSTEMP_PREFIX
2222
from lib.core.exception import SqlmapMissingDependence
23+
from lib.core.exception import SqlmapSystemException
2324
from lib.core.settings import DEV_EMAIL_ADDRESS
2425
from lib.core.settings import IS_WIN
2526
from lib.core.settings import ISSUES_PAGE
@@ -72,7 +73,12 @@ def _on_tab_changed(self, event):
7273
tab = event.widget.nametowidget(event.widget.select())
7374
event.widget.configure(height=tab.winfo_reqheight())
7475

75-
window = _tkinter.Tk()
76+
try:
77+
window = _tkinter.Tk()
78+
except Exception as ex:
79+
errMsg = "unable to create GUI window ('%s')" % getSafeExString(ex)
80+
raise SqlmapSystemException(errMsg)
81+
7682
window.title(VERSION_STRING)
7783

7884
# Reference: https://www.holadevs.com/pregunta/64750/change-selected-tab-color-in-ttknotebook

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

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

0 commit comments

Comments
 (0)