Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b6650ad

Browse files
committed
Introducing 'new style classes' (idea from Pull request #284)
1 parent 0f191f6 commit b6650ad

13 files changed

Lines changed: 18 additions & 18 deletions

File tree

lib/core/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from lib.core.settings import PAYLOAD_DELIMITER
3535
from lib.core.unescaper import unescaper
3636

37-
class Agent:
37+
class Agent(object):
3838
"""
3939
This class defines the SQL agent methods.
4040
"""

lib/core/bigarray.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
from lib.core.settings import BIGARRAY_CHUNK_LENGTH
1313

14-
class Cache:
14+
class Cache(object):
1515
"""
1616
Auxiliary class used for storing cached chunks
1717
"""

lib/core/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def write(self, fp):
168168

169169
fp.write("\n")
170170

171-
class Format:
171+
class Format(object):
172172
@staticmethod
173173
def humanize(values, chain=" or "):
174174
return chain.join(values)
@@ -2824,7 +2824,7 @@ def expandMnemonics(mnemonics, parser, args):
28242824
Expands mnemonic options
28252825
"""
28262826

2827-
class MnemonicNode:
2827+
class MnemonicNode(object):
28282828
def __init__(self):
28292829
self.next = {}
28302830
self.current = []

lib/core/dump.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
from lib.core.settings import TRIM_STDOUT_DUMP_SIZE
3838
from lib.core.settings import UNICODE_ENCODING
3939

40-
class Dump:
40+
class Dump(object):
4141
"""
4242
This class defines methods used to parse and output the results
4343
of SQL injection actions

lib/core/progress.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from lib.core.common import dataToStdout
1010
from lib.core.data import conf
1111

12-
class ProgressBar:
12+
class ProgressBar(object):
1313
"""
1414
This class defines methods to update and draw a progress bar
1515
"""

lib/core/replication.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from lib.core.exception import sqlmapMissingDependence
1414
from lib.core.exception import sqlmapValueException
1515

16-
class Replication:
16+
class Replication(object):
1717
"""
1818
This class holds all methods/classes used for database
1919
replication purposes.

lib/core/wordlist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from lib.core.exception import sqlmapDataException
1212
from lib.core.settings import UNICODE_ENCODING
1313

14-
class Wordlist:
14+
class Wordlist(object):
1515
"""
1616
Iterator for looping over a large dictionaries
1717
"""

lib/core/xmldump.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
CHARACTERS_TO_ENCODE = range(32) + range(127, 256)
7575
ENTITIES = {'"': '"', "'": "'"}
7676

77-
class XMLDump:
77+
class XMLDump(object):
7878
'''
7979
This class purpose is to dump the data into an xml Format.
8080
The format of the xml file is described in the scheme file xml/sqlmap.xsd

lib/request/connect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
from thirdparty.multipart import multipartpost
8282

8383

84-
class Connect:
84+
class Connect(object):
8585
"""
8686
This class defines methods used to perform HTTP requests
8787
"""

lib/request/dns.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import threading
1313
import time
1414

15-
class DNSQuery:
15+
class DNSQuery(object):
1616
"""
1717
Used for making fake DNS resolution responses based on received
1818
raw request
@@ -58,7 +58,7 @@ def response(self, resolution):
5858

5959
return retVal
6060

61-
class DNSServer:
61+
class DNSServer(object):
6262
def __init__(self):
6363
self._requests = []
6464
self._lock = threading.Lock()

0 commit comments

Comments
 (0)