getting rid of obsolete getCompiledRegex (in newer versions of Python regexes are already cached)

This commit is contained in:
Miroslav Stampar
2012-04-03 14:34:15 +00:00
parent 556b349be3
commit b0787f193c
8 changed files with 31 additions and 55 deletions

View File

@@ -7,7 +7,8 @@ Copyright (c) 2006-2012 sqlmap developers (http://www.sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
from lib.core.common import getCompiledRegex
import re
from lib.core.common import Backend
from lib.core.common import hashDBWrite
from lib.core.common import isTechniqueAvailable
@@ -52,7 +53,7 @@ class Miscellaneous:
else:
conf.tmpPath = "/tmp"
if getCompiledRegex("(?i)\A[\w]:[\/\\\\]+").search(conf.tmpPath):
if re.search(r"\A[\w]:[\/\\]+", conf.tmpPath, re.I):
Backend.setOs(OS.WINDOWS)
conf.tmpPath = normalizePath(conf.tmpPath)