mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 01:26:42 +03:00
First CSS style added for a HTML table dump format (Issue #254)
This commit is contained in:
parent
b6ea337937
commit
753d0f18bf
|
@ -32,6 +32,8 @@ from lib.core.enums import DUMP_FORMAT
|
|||
from lib.core.exception import sqlmapGenericException
|
||||
from lib.core.exception import sqlmapValueException
|
||||
from lib.core.replication import Replication
|
||||
from lib.core.settings import HTML_DUMP_CSS_STYLE
|
||||
from lib.core.settings import METADB_SUFFIX
|
||||
from lib.core.settings import TRIM_STDOUT_DUMP_SIZE
|
||||
from lib.core.settings import UNICODE_ENCODING
|
||||
|
||||
|
@ -503,7 +505,11 @@ class Dump:
|
|||
|
||||
elif conf.dumpFormat in (DUMP_FORMAT.CSV, DUMP_FORMAT.HTML):
|
||||
if conf.dumpFormat == DUMP_FORMAT.HTML:
|
||||
dataToDumpFile(dumpFP, "<!DOCTYPE html>\n<html>\n<head>\n<title>%s</title>\n" % ("%s%s" % ("%s." % db if METADB_SUFFIX not in db else "", table)))
|
||||
dataToDumpFile(dumpFP, HTML_DUMP_CSS_STYLE)
|
||||
dataToDumpFile(dumpFP, "\n</head>\n")
|
||||
dataToDumpFile(dumpFP, tableNode.toxml())
|
||||
dataToDumpFile(dumpFP, "\n</html>")
|
||||
else:
|
||||
dataToDumpFile(dumpFP, "\n")
|
||||
dumpFP.close()
|
||||
|
|
|
@ -499,3 +499,18 @@ SUHOSHIN_MAX_VALUE_LENGTH = 512
|
|||
|
||||
# Regular expression used for extracting form tags
|
||||
FORM_SEARCH_REGEX = r"(?si)<form(?!.+<form).+?</form>"
|
||||
|
||||
# CSS style used in HTML dump format
|
||||
HTML_DUMP_CSS_STYLE = """<style>
|
||||
table{
|
||||
margin:10;
|
||||
background-color:#ffffff;
|
||||
font-family:verdana;
|
||||
font-size:12px;
|
||||
align:center;
|
||||
}
|
||||
td{
|
||||
font-family:verdana;
|
||||
font-size:10px;
|
||||
}
|
||||
</style>"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user