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

Skip to content

Commit f38a2c2

Browse files
committed
Minor refactoring
1 parent 22bf771 commit f38a2c2

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

lib/core/decorators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def cachedmethod(f):
2828
>>> __ = cachedmethod(lambda *args, **kwargs: args[0])
2929
>>> __(2)
3030
2
31-
>>> __ = cachedmethod(lambda *args, **kwargs: list(kwargs.values())[0])
31+
>>> __ = cachedmethod(lambda *args, **kwargs: next(iter(kwargs.values())))
3232
>>> __(foobar=3)
3333
3
3434

lib/core/option.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ def _setCrawler():
347347
if conf.url:
348348
crawl(conf.url)
349349
elif conf.requestFile and kb.targets:
350-
target = list(kb.targets)[0]
350+
target = next(iter(kb.targets))
351351
crawl(target[0], target[2], target[3])
352352

353353
def _doSearch():
@@ -1735,8 +1735,7 @@ class _(six.text_type):
17351735
conf.__setitem__(_, True)
17361736

17371737
if conf.noCast:
1738-
for _ in list(DUMP_REPLACEMENTS.keys()):
1739-
del DUMP_REPLACEMENTS[_]
1738+
DUMP_REPLACEMENTS.clear()
17401739

17411740
if conf.dumpFormat:
17421741
conf.dumpFormat = conf.dumpFormat.upper()

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.4.1.59"
21+
VERSION = "1.4.1.60"
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)