mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 14:55:40 +00:00
minor refactoring
This commit is contained in:
parent
2fd3f0d7b2
commit
e64f225e65
3 changed files with 15 additions and 8 deletions
|
|
@ -42,6 +42,7 @@ from lib.core.data import logger
|
|||
from lib.core.data import paths
|
||||
from lib.core.datatype import advancedDict
|
||||
from lib.core.datatype import injectionDict
|
||||
from lib.core.enums import HTTPHEADER
|
||||
from lib.core.enums import HTTPMETHOD
|
||||
from lib.core.enums import NULLCONNECTION
|
||||
from lib.core.enums import PAYLOAD
|
||||
|
|
@ -763,15 +764,15 @@ def checkNullConnection():
|
|||
try:
|
||||
page, headers = Request.getPage(method=HTTPMETHOD.HEAD)
|
||||
|
||||
if not page and 'Content-Length' in headers:
|
||||
if not page and HTTPHEADER.CONTENT_LENGTH in headers:
|
||||
kb.nullConnection = NULLCONNECTION.HEAD
|
||||
|
||||
infoMsg = "NULL connection is supported with HEAD header"
|
||||
logger.info(infoMsg)
|
||||
else:
|
||||
page, headers = Request.getPage(auxHeaders={"Range": "bytes=-1"})
|
||||
page, headers = Request.getPage(auxHeaders={HTTPHEADER.RANGE: "bytes=-1"})
|
||||
|
||||
if page and len(page) == 1 and 'Content-Range' in headers:
|
||||
if page and len(page) == 1 and HTTPHEADER.CONTENT_RANGE in headers:
|
||||
kb.nullConnection = NULLCONNECTION.RANGE
|
||||
|
||||
infoMsg = "NULL connection is supported with GET header "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue