|
18 | 18 | from lib.core.common import extractRegexResult |
19 | 19 | from lib.core.common import getDirs |
20 | 20 | from lib.core.common import getDocRoot |
| 21 | +from lib.core.common import getSQLSnippet |
21 | 22 | from lib.core.common import ntToPosixSlashes |
22 | 23 | from lib.core.common import isTechniqueAvailable |
23 | 24 | from lib.core.common import isWindowsDriveLetterPath |
|
32 | 33 | from lib.core.data import kb |
33 | 34 | from lib.core.data import logger |
34 | 35 | from lib.core.data import paths |
| 36 | +from lib.core.enums import DBMS |
35 | 37 | from lib.core.enums import OS |
36 | 38 | from lib.core.enums import PAYLOAD |
37 | 39 | from lib.request.connect import Connect as Request |
@@ -115,8 +117,7 @@ def __webFileInject(self, fileContent, fileName, directory): |
115 | 117 | randInt = randomInt() |
116 | 118 | query += "OR %d=%d " % (randInt, randInt) |
117 | 119 |
|
118 | | - query += "LIMIT 1 INTO OUTFILE '%s' " % outFile |
119 | | - query += "LINES TERMINATED BY 0x%s --" % hexencode(uplQuery) |
| 120 | + query += getSQLSnippet(DBMS.MYSQL, "write_file_limit", OUTFILE=outFile, HEXSTRING=hexencode(uplQuery)) |
120 | 121 | query = agent.prefixQuery(query) |
121 | 122 | query = agent.suffixQuery(query) |
122 | 123 | payload = agent.payload(newValue=query) |
@@ -247,8 +248,8 @@ def webInit(self): |
247 | 248 | continue |
248 | 249 |
|
249 | 250 | elif "<%" in uplPage or "<?" in uplPage: |
250 | | - warnMsg = "file stager uploaded " |
251 | | - warnMsg += "on '%s' but not dynamically interpreted" % localPath |
| 251 | + warnMsg = "file stager uploaded on '%s', " % localPath |
| 252 | + warnMsg += "but not dynamically interpreted" |
252 | 253 | logger.warn(warnMsg) |
253 | 254 | continue |
254 | 255 |
|
|
0 commit comments