some more refactoring

This commit is contained in:
Miroslav Stampar
2012-07-01 01:19:54 +02:00
parent f6509db31a
commit 21d9ae0a2c
3 changed files with 50 additions and 91 deletions

View File

@@ -7,7 +7,9 @@ See the file 'doc/COPYING' for copying permission
import logging
import os
import re
import subprocess
import string
import sys
from lib.core.enums import CUSTOM_LOGGING
@@ -44,12 +46,6 @@ LOGGER_HANDLER.setFormatter(FORMATTER)
LOGGER.addHandler(LOGGER_HANDLER)
LOGGER.setLevel(logging.WARN)
# dump markers
DUMP_NEWLINE_MARKER = "__NEWLINE__"
DUMP_CR_MARKER = "__CARRIAGE_RETURN__"
DUMP_TAB_MARKER = "__TAB__"
DUMP_DEL_MARKER = "__DEL__"
# markers for special cases when parameter values contain html encoded characters
PARAMETER_AMP_MARKER = "__AMP__"
PARAMETER_SEMICOLON_MARKER = "__SEMICOLON__"
@@ -475,6 +471,9 @@ MAX_TOTAL_REDIRECTIONS = 10
# Reference: http://www.tcpipguide.com/free/t_DNSLabelsNamesandSyntaxRules.htm
MAX_DNS_LABEL = 63
# Alphabet used for prefix and suffix strings of name resolution requests in DNS technique (excluding hexadecimal chars for not mixing with inner content)
DNS_BOUNDARIES_ALPHABET = re.sub("[a-fA-F]", "", string.letters)
# Connection chunk size (processing large responses in chunks to avoid MemoryError crashes - e.g. large table dump in full UNION/inband injections)
MAX_CONNECTION_CHUNK_SIZE = 10 * 1024 * 1024