Skip to content

Commit c7bb44b

Browse files
committed
Switching from old odict (non-concise ordering compared to collections) to ordereddict
1 parent f433895 commit c7bb44b

File tree

12 files changed

+151
-1445
lines changed

12 files changed

+151
-1445
lines changed

doc/THIRD-PARTY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ This file lists bundled packages and their associated licensing terms.
1515
Copyright (C) 2013, Jonathan Hartley.
1616
* The Fcrypt library located under thirdparty/fcrypt/.
1717
Copyright (C) 2000, 2001, 2004 Carey Evans.
18-
* The Odict library located under thirdparty/odict/.
19-
Copyright (C) 2005, Nicola Larosa, Michael Foord.
2018
* The Oset library located under thirdparty/oset/.
2119
Copyright (C) 2010, BlueDynamics Alliance, Austria.
2220
Copyright (C) 2009, Raymond Hettinger, and others.
@@ -281,6 +279,8 @@ be bound by the terms and conditions of this License Agreement.
281279

282280
* The bottle web framework library located under thirdparty/bottle/.
283281
Copyright (C) 2012, Marcel Hellkamp.
282+
* The ordereddict library located under thirdparty/odict/.
283+
Copyright (C) 2009, Raymond Hettinger.
284284
* The Termcolor library located under thirdparty/termcolor/.
285285
Copyright (C) 2008-2011, Volvox Development Team.
286286

lib/core/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
from thirdparty.clientform.clientform import ParseError
178178
from thirdparty.colorama.initialise import init as coloramainit
179179
from thirdparty.magic import magic
180-
from thirdparty.odict.odict import OrderedDict
180+
from thirdparty.odict import OrderedDict
181181
from thirdparty.termcolor.termcolor import colored
182182

183183
class UnicodeRawConfigParser(RawConfigParser):

lib/core/datatype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import copy
99
import types
1010

11-
from thirdparty.odict.odict import OrderedDict
11+
from thirdparty.odict import OrderedDict
1212

1313
class AttribDict(dict):
1414
"""

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.enums import OS
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.3.3.15"
22+
VERSION = "1.3.3.16"
2323
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2424
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2525
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/core/target.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
from lib.core.settings import USER_AGENT_ALIASES
7474
from lib.core.settings import XML_RECOGNITION_REGEX
7575
from lib.utils.hashdb import HashDB
76-
from thirdparty.odict.odict import OrderedDict
76+
from thirdparty.odict import OrderedDict
7777

7878
def _setRequestParams():
7979
"""

lib/request/basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
from lib.parse.html import htmlParser
4848
from lib.utils.htmlentities import htmlEntities
4949
from thirdparty.chardet import detect
50-
from thirdparty.odict.odict import OrderedDict
50+
from thirdparty.odict import OrderedDict
5151

5252
def forgeHeaders(items=None, base=None):
5353
"""

lib/request/connect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class WebSocketException(Exception):
122122
from lib.request.direct import direct
123123
from lib.request.comparison import comparison
124124
from lib.request.methodrequest import MethodRequest
125-
from thirdparty.odict.odict import OrderedDict
125+
from thirdparty.odict import OrderedDict
126126
from thirdparty.socks.socks import ProxyError
127127

128128
class Connect(object):

lib/techniques/union/use.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
from lib.core.unescaper import unescaper
6060
from lib.request.connect import Connect as Request
6161
from lib.utils.progress import ProgressBar
62-
from thirdparty.odict.odict import OrderedDict
62+
from thirdparty.odict import OrderedDict
6363

6464
def _oneShotUnionUse(expression, unpack=True, limited=False):
6565
retVal = hashDBRetrieve("%s%s" % (conf.hexConvert or False, expression), checkConf=True) # as UNION data is stored raw unconverted

thirdparty/odict/__init__.py

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,8 @@
11
#!/usr/bin/env python
2-
#
3-
# The BSD License
4-
#
5-
# Copyright 2003-2008 Nicola Larosa, Michael Foord
6-
#
7-
# Permission is hereby granted, free of charge, to any person obtaining a copy
8-
# of this software and associated documentation files (the "Software"), to deal
9-
# in the Software without restriction, including without limitation the rights
10-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11-
# copies of the Software, and to permit persons to whom the Software is
12-
# furnished to do so, subject to the following conditions:
13-
#
14-
# The above copyright notice and this permission notice shall be included in
15-
# all copies or substantial portions of the Software.
16-
#
17-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23-
# THE SOFTWARE.
24-
#
252

26-
pass
3+
import sys
4+
5+
if sys.version_info[:2] >= (2, 7):
6+
from collections import OrderedDict
7+
else:
8+
from ordereddict import OrderedDict

0 commit comments

Comments
 (0)