mirror of
https://github.com/Ekultek/Zeus-Scanner.git
synced 2026-03-11 08:55:51 +00:00
Simplify with dict comprehension
https://docs.python.org/2/tutorial/datastructures.html#dictionaries
This commit is contained in:
parent
ab26aed61e
commit
73486352ec
1 changed files with 2 additions and 8 deletions
|
|
@ -17,10 +17,7 @@ class SqlmapHook(object):
|
|||
|
||||
def __init__(self, to_scan, port=None, api_con="http://127.0.0.1:{}", default_port=8775):
|
||||
self.to_scan = to_scan
|
||||
if port is None:
|
||||
self.port = default_port
|
||||
else:
|
||||
self.port = port
|
||||
self.port = port or default_port
|
||||
self.headers = {"Content-Type": "application/json"}
|
||||
self.connection = api_con.format(self.port)
|
||||
self.commands = {
|
||||
|
|
@ -110,10 +107,7 @@ def sqlmap_scan_main(url, port=None, verbose=None, auto_search=False, opts=None,
|
|||
"""
|
||||
create argument tuples for the sqlmap arguments passed by the user
|
||||
"""
|
||||
retval = {}
|
||||
for (arg, val) in opts:
|
||||
retval[arg] = val
|
||||
return retval
|
||||
return {key: value for key, value in opts}
|
||||
|
||||
if auto_search:
|
||||
lib.settings.logger.info(lib.settings.set_color(
|
||||
|
|
|
|||
Loading…
Reference in a new issue