Skip to content

Commit e1a509e

Browse files
committed
Minor refactoring (#5965)
1 parent ac2bd50 commit e1a509e

File tree

5 files changed

+14
-15
lines changed

5 files changed

+14
-15
lines changed

data/txt/sha256sums.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,8 @@ a8b398601dae3318d255f936f5bb6acd25ffdc8ef6d6b713ad89ee7136d1c736 lib/core/dicts
179179
20a6edda1d57a7564869e366f57ed7b2ab068dd8716cf7a10ef4a02d154d6c80 lib/core/dump.py
180180
20ea31bb52785900d6bba5e9f2f560a4ed064cb95add75015de105959aa9c4d4 lib/core/enums.py
181181
00a9b29caa81fe4a5ef145202f9c92e6081f90b2a85cd76c878d520d900ad856 lib/core/exception.py
182-
1c48804c10b94da696d3470efbd25d2fff0f0bbf2af0101aaac8f8c097fce02b lib/core/gui.py
183182
4608f21a4333c162ab3c266c903fda4793cc5834de30d06affe9b7566dd09811 lib/core/__init__.py
184183
3d308440fb01d04b5d363bfbe0f337756b098532e5bb7a1c91d5213157ec2c35 lib/core/log.py
185-
3c6702f14ecd14f12fdab02c8b28fa4d9fdc477b7fa743e743728b56b89d4db4 lib/core/ncgui.py
186184
2a06dc9b5c17a1efdcdb903545729809399f1ee96f7352cc19b9aaa227394ff3 lib/core/optiondict.py
187185
114396f3b11372afc47451b4fbfd79e567ebdcaa926a3cff9ac12cab4db02d8b lib/core/option.py
188186
fd449fe2c707ce06c929fc164cbabb3342f3e4e2b86c06f3efc1fc09ac98a25a lib/core/patch.py
@@ -191,7 +189,7 @@ c4bfb493a03caf84dd362aec7c248097841de804b7413d0e1ecb8a90c8550bc0 lib/core/readl
191189
d1bd70c1a55858495c727fbec91e30af267459c8f64d50fabf9e4ee2c007e920 lib/core/replication.py
192190
1d0f80b0193ac5204527bfab4bde1a7aee0f693fd008e86b4b29f606d1ef94f3 lib/core/revision.py
193191
d2eb8e4b05ac93551272b3d4abfaf5b9f2d3ac92499a7704c16ed0b4f200db38 lib/core/session.py
194-
38a9c666b8f2e3586d6b34f2fd4d690153aa6df5ca10d0a8c23a6e998a67078e lib/core/settings.py
192+
6e5aea3ec3c64aa280017ef3610f612f1b4a66d685e00427f944cb3bad7cde92 lib/core/settings.py
195193
1c5eab9494eb969bc9ce118a2ea6954690c6851cbe54c18373c723b99734bf09 lib/core/shell.py
196194
4eea6dcf023e41e3c64b210cb5c2efc7ca893b727f5e49d9c924f076bb224053 lib/core/subprocessng.py
197195
cdd352e1331c6b535e780f6edea79465cb55af53aa2114dcea0e8bf382e56d1a lib/core/target.py
@@ -202,7 +200,7 @@ a9b3dca1c17f56bed8e07973c7f8603932012931947633781f7523c05cb2bed2 lib/core/testi
202200
cba481f8c79f4a75bd147b9eb5a1e6e61d70422fceadd12494b1dbaa4f1d27f4 lib/core/wordlist.py
203201
4608f21a4333c162ab3c266c903fda4793cc5834de30d06affe9b7566dd09811 lib/__init__.py
204202
7d1d3e07a1f088428d155c0e1b28e67ecbf5f62775bdeeeb11b4388369dce0f7 lib/parse/banner.py
205-
380881c528f70290b0d3ca888d1d306e6aa19eff3fe22ebf10fe3248bec01044 lib/parse/cmdline.py
203+
5d0de42823d3db6484bcdd3888052c7b32b3be92cf334047dd8825f4064dd76c lib/parse/cmdline.py
206204
f1ad73b6368730b8b8bc2e28b3305445d2b954041717619bede421ccc4381625 lib/parse/configfile.py
207205
a96b7093f30b3bf774f5cc7a622867472d64a2ae8b374b43786d155cf6203093 lib/parse/handler.py
208206
cfd4857ce17e0a2da312c18dcff28aefaa411f419b4e383b202601c42de40eec lib/parse/headers.py
@@ -249,11 +247,13 @@ af67d25e8c16b429a5b471d3c629dc1da262262320bf7cd68465d151c02def16 lib/utils/brut
249247
828940a8eefda29c9eb271c21f29e2c4d1d428ccf0dcc6380e7ee6740300ec55 lib/utils/crawler.py
250248
56b93ba38f127929346f54aa75af0db5f46f9502b16acfe0d674a209de6cad2d lib/utils/deps.py
251249
3aca7632d53ab2569ddef876a1b90f244640a53e19b304c77745f8ddb15e6437 lib/utils/getch.py
250+
1c48804c10b94da696d3470efbd25d2fff0f0bbf2af0101aaac8f8c097fce02b lib/utils/gui.py
252251
4979120bbbc030eaef97147ee9d7d564d9683989059b59be317153cdaa23d85b lib/utils/har.py
253252
af047a6efc1719a3d166fac0b7ff98ab3d29af7b676ff977e98c31c80e9e883e lib/utils/hashdb.py
254253
8c9caffbd821ad9547c27095c8e55c398ea743b2e44d04b3572e2670389ccf5b lib/utils/hash.py
255254
ba862f0c96b1d39797fb21974599e09690d312b17a85e6639bee9d1db510f543 lib/utils/httpd.py
256255
4608f21a4333c162ab3c266c903fda4793cc5834de30d06affe9b7566dd09811 lib/utils/__init__.py
256+
bb5b586044804d40630880dedb3aa7eadc9b81bd44f2511de6a642178a4984be lib/utils/ncgui.py
257257
f1d84b1b99ce64c1ccb64aaa35f5231cf094b3dac739f29f76843f23ee10b990 lib/utils/pivotdumptable.py
258258
d0643f8fa5ea2991cda35817154f692f1948910e4506cb56827d87bc0b5540b7 lib/utils/progress.py
259259
e0bf9d7c069bc6b1ba45e1ddeb1eb94dac14676a1474a05c9af4dcbd9e89cc74 lib/utils/purge.py

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from thirdparty import six
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.9.12.56"
22+
VERSION = "1.9.12.57"
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/parse/cmdline.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ def cmdLineParser(argv=None):
860860
parser.add_argument("--gui", dest="gui", action="store_true",
861861
help=SUPPRESS)
862862

863-
parser.add_argument("--ncgui", dest="ncgui", action="store_true",
863+
parser.add_argument("--tui", dest="tui", action="store_true",
864864
help=SUPPRESS)
865865

866866
parser.add_argument("--smoke-test", dest="smokeTest", action="store_true",
@@ -936,16 +936,16 @@ def _format_action_invocation(self, action):
936936
checkOldOptions(argv)
937937

938938
if "--gui" in argv:
939-
from lib.core.gui import runGui
939+
from lib.utils.gui import runGui
940940

941941
runGui(parser)
942942

943943
raise SqlmapSilentQuitException
944944

945-
elif "--ncgui" in argv:
946-
from lib.core.ncgui import runNcGui
945+
elif "--tui" in argv:
946+
from lib.utils.tui import runTui
947947

948-
runNcGui(parser)
948+
runTui(parser)
949949

950950
raise SqlmapSilentQuitException
951951

File renamed without changes.
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def _format_option_strings(self, option):
9191
def _draw_header(self):
9292
"""Draw the header bar"""
9393
height, width = self.stdscr.getmaxyx()
94-
header = " sqlmap - Ncurses GUI "
94+
header = " sqlmap - Ncurses TUI "
9595
self.stdscr.attron(curses.color_pair(1) | curses.A_BOLD)
9696
self.stdscr.addstr(0, 0, header.center(width))
9797
self.stdscr.attroff(curses.color_pair(1) | curses.A_BOLD)
@@ -750,12 +750,11 @@ def run(self):
750750
if option['type'] == 'bool':
751751
option['value'] = not option['value']
752752

753-
def runNcGui(parser):
754-
"""Main entry point for ncurses GUI"""
753+
def runTui(parser):
754+
"""Main entry point for ncurses TUI"""
755755
# Check if ncurses is available
756756
if curses is None:
757-
raise SqlmapMissingDependence("missing 'curses' module (try installing 'windows-curses' on Windows)")
758-
757+
raise SqlmapMissingDependence("missing 'curses' module (optional Python module). Use a Python build that includes curses/ncurses, or install the platform-provided equivalent (e.g. for Windows: pip install windows-curses)")
759758
try:
760759
# Initialize and run
761760
def main(stdscr):

0 commit comments

Comments
 (0)