mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 20:51:31 +00:00
some code refactoring
This commit is contained in:
@@ -34,8 +34,10 @@ import ntpath
|
||||
import posixpath
|
||||
import subprocess
|
||||
|
||||
from StringIO import StringIO
|
||||
from tempfile import NamedTemporaryFile
|
||||
from tempfile import mkstemp
|
||||
from xml.sax import parse
|
||||
|
||||
from extra.cloak.cloak import decloak
|
||||
from lib.contrib import magic
|
||||
@@ -1084,4 +1086,12 @@ def getConsoleWidth(default=80):
|
||||
except:
|
||||
pass
|
||||
|
||||
return width if width else default
|
||||
return width if width else default
|
||||
|
||||
def parseXmlFile(xmlFile, handler):
|
||||
file = open(paths.GENERIC_XML)
|
||||
content = file.read()
|
||||
stream = StringIO(content)
|
||||
parse(stream, handler)
|
||||
stream.close()
|
||||
file.close()
|
||||
|
||||
Reference in New Issue
Block a user