Introducing 'new style classes' (idea from Pull request #284)

This commit is contained in:
Miroslav Stampar
2012-12-06 10:42:53 +01:00
parent 0f191f624c
commit b6650add46
13 changed files with 18 additions and 18 deletions

View File

@@ -34,7 +34,7 @@ from lib.core.settings import GENERIC_SQL_COMMENT
from lib.core.settings import PAYLOAD_DELIMITER
from lib.core.unescaper import unescaper
class Agent:
class Agent(object):
"""
This class defines the SQL agent methods.
"""

View File

@@ -11,7 +11,7 @@ import tempfile
from lib.core.settings import BIGARRAY_CHUNK_LENGTH
class Cache:
class Cache(object):
"""
Auxiliary class used for storing cached chunks
"""

View File

@@ -168,7 +168,7 @@ class UnicodeRawConfigParser(RawConfigParser):
fp.write("\n")
class Format:
class Format(object):
@staticmethod
def humanize(values, chain=" or "):
return chain.join(values)
@@ -2824,7 +2824,7 @@ def expandMnemonics(mnemonics, parser, args):
Expands mnemonic options
"""
class MnemonicNode:
class MnemonicNode(object):
def __init__(self):
self.next = {}
self.current = []

View File

@@ -37,7 +37,7 @@ from lib.core.settings import METADB_SUFFIX
from lib.core.settings import TRIM_STDOUT_DUMP_SIZE
from lib.core.settings import UNICODE_ENCODING
class Dump:
class Dump(object):
"""
This class defines methods used to parse and output the results
of SQL injection actions

View File

@@ -9,7 +9,7 @@ from lib.core.common import getUnicode
from lib.core.common import dataToStdout
from lib.core.data import conf
class ProgressBar:
class ProgressBar(object):
"""
This class defines methods to update and draw a progress bar
"""

View File

@@ -13,7 +13,7 @@ from lib.core.exception import sqlmapGenericException
from lib.core.exception import sqlmapMissingDependence
from lib.core.exception import sqlmapValueException
class Replication:
class Replication(object):
"""
This class holds all methods/classes used for database
replication purposes.

View File

@@ -11,7 +11,7 @@ import zipfile
from lib.core.exception import sqlmapDataException
from lib.core.settings import UNICODE_ENCODING
class Wordlist:
class Wordlist(object):
"""
Iterator for looping over a large dictionaries
"""

View File

@@ -74,7 +74,7 @@ SCHEME_NAME_ATTR = "xsi:noNamespaceSchemaLocation"
CHARACTERS_TO_ENCODE = range(32) + range(127, 256)
ENTITIES = {'"': '"', "'": "'"}
class XMLDump:
class XMLDump(object):
'''
This class purpose is to dump the data into an xml Format.
The format of the xml file is described in the scheme file xml/sqlmap.xsd