|
27 | 27 | from lib.core.data import logger |
28 | 28 | from lib.core.common import sanitizeAsciiString |
29 | 29 | from lib.core.enums import HTTPMETHOD |
| 30 | +from lib.core.enums import NULLCONNECTION |
30 | 31 | from lib.core.enums import PLACE |
31 | 32 | from lib.core.exception import sqlmapConnectionException |
32 | 33 | from lib.request.basic import decodePage |
@@ -354,19 +355,19 @@ def queryPage(value=None, place=None, content=False, getSeqMatcher=False, silent |
354 | 355 | Connect.getPage(url=conf.safUrl, cookie=cookie, direct=True, silent=True, ua=ua) |
355 | 356 |
|
356 | 357 | if not content and not response and kb.nullConnection: |
357 | | - if kb.nullConnection == "HEAD": |
| 358 | + if kb.nullConnection == NULLCONNECTION.HEAD: |
358 | 359 | method = HTTPMETHOD.HEAD |
359 | | - elif kb.nullConnection == "Range": |
| 360 | + elif kb.nullConnection == NULLCONNECTION.RANGE: |
360 | 361 | if not auxHeaders: |
361 | 362 | auxHeaders = {} |
362 | 363 |
|
363 | 364 | auxHeaders["Range"] = "bytes=-1" |
364 | 365 |
|
365 | 366 | _, headers = Connect.getPage(url=uri, get=get, post=post, cookie=cookie, ua=ua, silent=silent, method=method, auxHeaders=auxHeaders, raise404=raise404) |
366 | 367 |
|
367 | | - if kb.nullConnection == "HEAD" and 'Content-Length' in headers: |
| 368 | + if kb.nullConnection == NULLCONNECTION.HEAD and 'Content-Length' in headers: |
368 | 369 | pageLength = int(headers['Content-Length']) |
369 | | - elif kb.nullConnection == "Range" and 'Content-Range' in headers: |
| 370 | + elif kb.nullConnection == NULLCONNECTION.RANGE and 'Content-Range' in headers: |
370 | 371 | pageLength = int(headers['Content-Range'][headers['Content-Range'].find('/') + 1:]) |
371 | 372 |
|
372 | 373 | if not pageLength: |
|
0 commit comments