mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
Introducing 'new style classes' (idea from Pull request #284)
This commit is contained in:
parent
0f191f624c
commit
b6650add46
|
@ -34,7 +34,7 @@ from lib.core.settings import GENERIC_SQL_COMMENT
|
||||||
from lib.core.settings import PAYLOAD_DELIMITER
|
from lib.core.settings import PAYLOAD_DELIMITER
|
||||||
from lib.core.unescaper import unescaper
|
from lib.core.unescaper import unescaper
|
||||||
|
|
||||||
class Agent:
|
class Agent(object):
|
||||||
"""
|
"""
|
||||||
This class defines the SQL agent methods.
|
This class defines the SQL agent methods.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -11,7 +11,7 @@ import tempfile
|
||||||
|
|
||||||
from lib.core.settings import BIGARRAY_CHUNK_LENGTH
|
from lib.core.settings import BIGARRAY_CHUNK_LENGTH
|
||||||
|
|
||||||
class Cache:
|
class Cache(object):
|
||||||
"""
|
"""
|
||||||
Auxiliary class used for storing cached chunks
|
Auxiliary class used for storing cached chunks
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -168,7 +168,7 @@ class UnicodeRawConfigParser(RawConfigParser):
|
||||||
|
|
||||||
fp.write("\n")
|
fp.write("\n")
|
||||||
|
|
||||||
class Format:
|
class Format(object):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def humanize(values, chain=" or "):
|
def humanize(values, chain=" or "):
|
||||||
return chain.join(values)
|
return chain.join(values)
|
||||||
|
@ -2824,7 +2824,7 @@ def expandMnemonics(mnemonics, parser, args):
|
||||||
Expands mnemonic options
|
Expands mnemonic options
|
||||||
"""
|
"""
|
||||||
|
|
||||||
class MnemonicNode:
|
class MnemonicNode(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.next = {}
|
self.next = {}
|
||||||
self.current = []
|
self.current = []
|
||||||
|
|
|
@ -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 TRIM_STDOUT_DUMP_SIZE
|
||||||
from lib.core.settings import UNICODE_ENCODING
|
from lib.core.settings import UNICODE_ENCODING
|
||||||
|
|
||||||
class Dump:
|
class Dump(object):
|
||||||
"""
|
"""
|
||||||
This class defines methods used to parse and output the results
|
This class defines methods used to parse and output the results
|
||||||
of SQL injection actions
|
of SQL injection actions
|
||||||
|
|
|
@ -9,7 +9,7 @@ from lib.core.common import getUnicode
|
||||||
from lib.core.common import dataToStdout
|
from lib.core.common import dataToStdout
|
||||||
from lib.core.data import conf
|
from lib.core.data import conf
|
||||||
|
|
||||||
class ProgressBar:
|
class ProgressBar(object):
|
||||||
"""
|
"""
|
||||||
This class defines methods to update and draw a progress bar
|
This class defines methods to update and draw a progress bar
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -13,7 +13,7 @@ from lib.core.exception import sqlmapGenericException
|
||||||
from lib.core.exception import sqlmapMissingDependence
|
from lib.core.exception import sqlmapMissingDependence
|
||||||
from lib.core.exception import sqlmapValueException
|
from lib.core.exception import sqlmapValueException
|
||||||
|
|
||||||
class Replication:
|
class Replication(object):
|
||||||
"""
|
"""
|
||||||
This class holds all methods/classes used for database
|
This class holds all methods/classes used for database
|
||||||
replication purposes.
|
replication purposes.
|
||||||
|
|
|
@ -11,7 +11,7 @@ import zipfile
|
||||||
from lib.core.exception import sqlmapDataException
|
from lib.core.exception import sqlmapDataException
|
||||||
from lib.core.settings import UNICODE_ENCODING
|
from lib.core.settings import UNICODE_ENCODING
|
||||||
|
|
||||||
class Wordlist:
|
class Wordlist(object):
|
||||||
"""
|
"""
|
||||||
Iterator for looping over a large dictionaries
|
Iterator for looping over a large dictionaries
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -74,7 +74,7 @@ SCHEME_NAME_ATTR = "xsi:noNamespaceSchemaLocation"
|
||||||
CHARACTERS_TO_ENCODE = range(32) + range(127, 256)
|
CHARACTERS_TO_ENCODE = range(32) + range(127, 256)
|
||||||
ENTITIES = {'"': '"', "'": "'"}
|
ENTITIES = {'"': '"', "'": "'"}
|
||||||
|
|
||||||
class XMLDump:
|
class XMLDump(object):
|
||||||
'''
|
'''
|
||||||
This class purpose is to dump the data into an xml Format.
|
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
|
The format of the xml file is described in the scheme file xml/sqlmap.xsd
|
||||||
|
|
|
@ -81,7 +81,7 @@ from thirdparty.socks.socks import ProxyError
|
||||||
from thirdparty.multipart import multipartpost
|
from thirdparty.multipart import multipartpost
|
||||||
|
|
||||||
|
|
||||||
class Connect:
|
class Connect(object):
|
||||||
"""
|
"""
|
||||||
This class defines methods used to perform HTTP requests
|
This class defines methods used to perform HTTP requests
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -12,7 +12,7 @@ import socket
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
|
||||||
class DNSQuery:
|
class DNSQuery(object):
|
||||||
"""
|
"""
|
||||||
Used for making fake DNS resolution responses based on received
|
Used for making fake DNS resolution responses based on received
|
||||||
raw request
|
raw request
|
||||||
|
@ -58,7 +58,7 @@ class DNSQuery:
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
class DNSServer:
|
class DNSServer(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self._requests = []
|
self._requests = []
|
||||||
self._lock = threading.Lock()
|
self._lock = threading.Lock()
|
||||||
|
|
|
@ -25,7 +25,7 @@ from lib.request.connect import Connect as Request
|
||||||
from thirdparty.beautifulsoup.beautifulsoup import BeautifulSoup
|
from thirdparty.beautifulsoup.beautifulsoup import BeautifulSoup
|
||||||
from thirdparty.oset.pyoset import oset
|
from thirdparty.oset.pyoset import oset
|
||||||
|
|
||||||
class Crawler:
|
class Crawler(object):
|
||||||
"""
|
"""
|
||||||
This class defines methods used to perform crawling (command
|
This class defines methods used to perform crawling (command
|
||||||
line option '--crawl'
|
line option '--crawl'
|
||||||
|
|
|
@ -5,7 +5,7 @@ Copyright (c) 2006-2012 sqlmap developers (http://sqlmap.org/)
|
||||||
See the file 'doc/COPYING' for copying permission
|
See the file 'doc/COPYING' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
class _Getch:
|
class _Getch(object):
|
||||||
"""
|
"""
|
||||||
Gets a single character from standard input. Does not echo to
|
Gets a single character from standard input. Does not echo to
|
||||||
the screen (reference: http://code.activestate.com/recipes/134892/)
|
the screen (reference: http://code.activestate.com/recipes/134892/)
|
||||||
|
@ -22,7 +22,7 @@ class _Getch:
|
||||||
def __call__(self): return self.impl()
|
def __call__(self): return self.impl()
|
||||||
|
|
||||||
|
|
||||||
class _GetchUnix:
|
class _GetchUnix(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
import tty
|
import tty
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ class _GetchUnix:
|
||||||
return ch
|
return ch
|
||||||
|
|
||||||
|
|
||||||
class _GetchWindows:
|
class _GetchWindows(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
import msvcrt
|
import msvcrt
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ class _GetchWindows:
|
||||||
return msvcrt.getch()
|
return msvcrt.getch()
|
||||||
|
|
||||||
|
|
||||||
class _GetchMacCarbon:
|
class _GetchMacCarbon(object):
|
||||||
"""
|
"""
|
||||||
A function which returns the current ASCII key that is down;
|
A function which returns the current ASCII key that is down;
|
||||||
if no ASCII key is down, the null string is returned. The
|
if no ASCII key is down, the null string is returned. The
|
||||||
|
|
|
@ -26,7 +26,7 @@ from lib.core.settings import UNICODE_ENCODING
|
||||||
from lib.core.settings import URI_INJECTABLE_REGEX
|
from lib.core.settings import URI_INJECTABLE_REGEX
|
||||||
from lib.request.basic import decodePage
|
from lib.request.basic import decodePage
|
||||||
|
|
||||||
class Google:
|
class Google(object):
|
||||||
"""
|
"""
|
||||||
This class defines methods used to perform Google dorking (command
|
This class defines methods used to perform Google dorking (command
|
||||||
line option '-g <google dork>'
|
line option '-g <google dork>'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user