|
14 | 14 | from lib.core.agent import agent |
15 | 15 | from lib.core.common import dataToOutFile |
16 | 16 | from lib.core.common import Backend |
| 17 | +from lib.core.common import isNumPosStrValue |
17 | 18 | from lib.core.common import isTechniqueAvailable |
18 | 19 | from lib.core.common import randomStr |
19 | 20 | from lib.core.common import readInput |
20 | 21 | from lib.core.data import conf |
21 | 22 | from lib.core.data import logger |
22 | | -from lib.core.enums import CHARSET_TYPE |
23 | 23 | from lib.core.enums import DBMS |
| 24 | +from lib.core.enums import CHARSET_TYPE |
| 25 | +from lib.core.enums import EXPECTED |
24 | 26 | from lib.core.enums import PAYLOAD |
25 | 27 | from lib.core.exception import sqlmapUndefinedMethod |
26 | 28 | from lib.request import inject |
@@ -110,9 +112,9 @@ def __checkWrittenFile(self, wFile, dFile, fileType): |
110 | 112 | wFileSize = os.path.getsize(wFile) |
111 | 113 |
|
112 | 114 | logger.debug("checking if the %s file has been written" % fileType) |
113 | | - dFileSize = inject.getValue(lengthQuery, resumeValue=False, charsetType=CHARSET_TYPE.DIGITS) |
| 115 | + dFileSize = inject.getValue(lengthQuery, resumeValue=False, expected=EXPECTED.INT, charsetType=CHARSET_TYPE.DIGITS) |
114 | 116 |
|
115 | | - if dFileSize and dFileSize.isdigit(): |
| 117 | + if isNumPosStrValue(dFileSize): |
116 | 118 | infoMsg = "the file has been successfully written and " |
117 | 119 | infoMsg += "its size is %s bytes" % dFileSize |
118 | 120 |
|
|
0 commit comments