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

Skip to content

Commit 805120a

Browse files
committed
Minor refactoring
1 parent 3f4186c commit 805120a

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/controller/controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ def start():
399399
if skip:
400400
continue
401401

402-
if not conf.paramDict.has_key(place):
402+
if place not in conf.paramDict:
403403
continue
404404

405405
paramDict = conf.paramDict[place]

lib/core/target.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def __setRequestParams():
6262
testableParameters = False
6363

6464
# Perform checks on GET parameters
65-
if conf.parameters.has_key(PLACE.GET) and conf.parameters[PLACE.GET]:
65+
if conf.parameters.get(PLACE.GET):
6666
parameters = conf.parameters[PLACE.GET]
6767
paramDict = paramToDict(PLACE.GET, parameters)
6868

lib/request/connect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def getPage(**kwargs):
236236
pass
237237

238238
elif target:
239-
if conf.parameters.has_key(PLACE.GET) and not get:
239+
if PLACE.GET in conf.parameters and not get:
240240
get = conf.parameters[PLACE.GET]
241241

242242
if get:
@@ -245,7 +245,7 @@ def getPage(**kwargs):
245245

246246
if conf.method == HTTPMETHOD.POST and not post:
247247
for place in (PLACE.POST, PLACE.SOAP):
248-
if conf.parameters.has_key(place):
248+
if place in conf.parameters:
249249
post = conf.parameters[place]
250250
break
251251

lib/techniques/brute/use.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def tableExistsThread():
123123
logger.warn(warnMsg)
124124
else:
125125
for item in threadData.shared.outputs:
126-
if not kb.data.cachedTables.has_key(conf.db):
126+
if conf.db not in kb.data.cachedTables:
127127
kb.data.cachedTables[conf.db] = [item]
128128
else:
129129
kb.data.cachedTables[conf.db].append(item)

0 commit comments

Comments
 (0)