mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-10-26 05:31:04 +03:00 
			
		
		
		
	Merge branch 'master' of github.com:sqlmapproject/sqlmap
Conflicts: lib/core/testing.py
This commit is contained in:
		
						commit
						0d1ea7f05a
					
				|  | @ -5,7 +5,6 @@ Copyright (c) 2006-2012 sqlmap developers (http://sqlmap.org/) | ||||||
| See the file 'doc/COPYING' for copying permission | See the file 'doc/COPYING' for copying permission | ||||||
| """ | """ | ||||||
| 
 | 
 | ||||||
| import codecs |  | ||||||
| import doctest | import doctest | ||||||
| import os | import os | ||||||
| import re | import re | ||||||
|  | @ -19,7 +18,6 @@ from extra.beep.beep import beep | ||||||
| from lib.controller.controller import start | from lib.controller.controller import start | ||||||
| from lib.core.common import clearConsoleLine | from lib.core.common import clearConsoleLine | ||||||
| from lib.core.common import dataToStdout | from lib.core.common import dataToStdout | ||||||
| from lib.core.common import getUnicode |  | ||||||
| from lib.core.common import randomStr | from lib.core.common import randomStr | ||||||
| from lib.core.common import readXmlFile | from lib.core.common import readXmlFile | ||||||
| from lib.core.data import conf | from lib.core.data import conf | ||||||
|  | @ -28,7 +26,6 @@ from lib.core.data import paths | ||||||
| from lib.core.log import LOGGER_HANDLER | from lib.core.log import LOGGER_HANDLER | ||||||
| from lib.core.option import init | from lib.core.option import init | ||||||
| from lib.core.optiondict import optDict | from lib.core.optiondict import optDict | ||||||
| from lib.core.settings import UNICODE_ENCODING |  | ||||||
| from lib.parse.cmdline import cmdLineParser | from lib.parse.cmdline import cmdLineParser | ||||||
| 
 | 
 | ||||||
| failedItem = None | failedItem = None | ||||||
|  | @ -238,22 +235,26 @@ def runCase(switches=None, parse=None): | ||||||
|         retVal = False |         retVal = False | ||||||
| 
 | 
 | ||||||
|     if parse and retVal: |     if parse and retVal: | ||||||
|         console = getUnicode(console, system=True) |         ifile = open(conf.dumper.getOutputFile(), "rb") | ||||||
|         with codecs.open(conf.dumper.getOutputFile(), "rb", UNICODE_ENCODING) as f: |         content = ifile.read() | ||||||
|             content = f.read() |         ifile.close() | ||||||
| 
 | 
 | ||||||
|         for item, console_output in parse: |         for item, console_output in parse: | ||||||
|             parse_on = console if console_output else content |             if console_output is True: | ||||||
|  |                 parse_on = console | ||||||
|  |             else: | ||||||
|  |                 parse_on = content | ||||||
| 
 | 
 | ||||||
|             if item.startswith("r'") and item.endswith("'"): |             if item.startswith("r'") and item.endswith("'"): | ||||||
|                 if not re.search(item[2:-1], parse_on, re.DOTALL): |                 if not re.search(item[2:-1], parse_on, re.DOTALL): | ||||||
|                     retVal = False |                     retVal = False | ||||||
|                     failedItem = item |                     failedItem = item | ||||||
|                     break |  | ||||||
| 
 | 
 | ||||||
|             elif item not in parse_on: |                     break | ||||||
|  |             elif parse_on.find(item) < 0: | ||||||
|                 retVal = False |                 retVal = False | ||||||
|                 failedItem = item |                 failedItem = item | ||||||
|  | 
 | ||||||
|                 break |                 break | ||||||
| 
 | 
 | ||||||
|     cleanCase() |     cleanCase() | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user