mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-03 19:55:47 +03:00
Got rid of useless TAB completion in --sql-shell
This commit is contained in:
parent
35ce6dedcf
commit
406f2cda09
|
@ -33,15 +33,6 @@ def loadHistory():
|
||||||
warnMsg = "there was a problem loading the history file '%s' (%s)" % (historyPath, msg)
|
warnMsg = "there was a problem loading the history file '%s' (%s)" % (historyPath, msg)
|
||||||
logger.warn(warnMsg)
|
logger.warn(warnMsg)
|
||||||
|
|
||||||
def queriesForAutoCompletion():
|
|
||||||
autoComplQueries = {}
|
|
||||||
|
|
||||||
for item in queries[Backend.getIdentifiedDbms()]._toflat():
|
|
||||||
if item._has_key('query') and len(item.query) > 1 and item._name != 'blind':
|
|
||||||
autoComplQueries[item.query] = None
|
|
||||||
|
|
||||||
return autoComplQueries
|
|
||||||
|
|
||||||
class CompleterNG(rlcompleter.Completer):
|
class CompleterNG(rlcompleter.Completer):
|
||||||
def global_matches(self, text):
|
def global_matches(self, text):
|
||||||
"""
|
"""
|
||||||
|
@ -66,9 +57,7 @@ def autoCompletion(sqlShell=False, osShell=False):
|
||||||
if not readline._readline:
|
if not readline._readline:
|
||||||
return
|
return
|
||||||
|
|
||||||
if sqlShell:
|
if osShell:
|
||||||
completer = CompleterNG(queriesForAutoCompletion())
|
|
||||||
elif osShell:
|
|
||||||
if Backend.isOs(OS.WINDOWS):
|
if Backend.isOs(OS.WINDOWS):
|
||||||
# Reference: http://en.wikipedia.org/wiki/List_of_DOS_commands
|
# Reference: http://en.wikipedia.org/wiki/List_of_DOS_commands
|
||||||
completer = CompleterNG({
|
completer = CompleterNG({
|
||||||
|
|
Loading…
Reference in New Issue
Block a user