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

Skip to content

Commit c9b3b47

Browse files
committed
Minor update
1 parent d038d02 commit c9b3b47

5 files changed

Lines changed: 25 additions & 7 deletions

File tree

lib/core/common.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,6 +1118,13 @@ def sanitizeStr(value):
11181118
return getUnicode(value).replace("\n", " ").replace("\r", "")
11191119

11201120
def getHeader(headers, key):
1121+
"""
1122+
Returns header value ignoring the letter case
1123+
1124+
>>> getHeader({"Foo": "bar"}, "foo")
1125+
'bar'
1126+
"""
1127+
11211128
retVal = None
11221129
for _ in (headers or {}):
11231130
if _.upper() == key.upper():
@@ -1619,6 +1626,13 @@ def getRemoteIP():
16191626
return retVal
16201627

16211628
def getFileType(filePath):
1629+
"""
1630+
Returns "magic" file type for given file path
1631+
1632+
>>> getFileType(__file__)
1633+
'text'
1634+
"""
1635+
16221636
try:
16231637
_ = magic.from_file(filePath)
16241638
except:
@@ -4387,6 +4401,9 @@ def getSafeExString(ex, encoding=None):
43874401
"""
43884402
Safe way how to get the proper exception represtation as a string
43894403
(Note: errors to be avoided: 1) "%s" % Exception(u'\u0161') and 2) "%s" % str(Exception(u'\u0161'))
4404+
4405+
>>> getSafeExString(Exception('foobar'))
4406+
u'foobar'
43904407
"""
43914408

43924409
retVal = ex

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.1.7.9"
22+
VERSION = "1.1.7.10"
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/utils/har.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import StringIO
1414
import time
1515

16+
from lib.core.bigarray import BigArray
1617
from lib.core.settings import VERSION
1718

1819
# Reference: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/HAR/Overview.html
@@ -27,7 +28,7 @@ def create(self):
2728

2829
class HTTPCollector:
2930
def __init__(self):
30-
self.messages = []
31+
self.messages = BigArray()
3132

3233
def collectRequest(self, requestMessage, responseMessage, startTime=None, endTime=None):
3334
self.messages.append(RawPair(requestMessage, responseMessage, startTime, endTime))

sqlmap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ def main():
331331

332332
if conf.get("harFile"):
333333
with openFile(conf.harFile, "w+b") as f:
334-
f.write(json.dumps(conf.httpCollector.obtain(), indent=4, separators=(',', ': ')))
334+
json.dump(conf.httpCollector.obtain(), fp=f, indent=4, separators=(',', ': '))
335335

336336
if cmdLineOptions.get("sqlmapShell"):
337337
cmdLineOptions.clear()

txt/checksum.md5

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ a97df93b552ee4e4ba3692eae870de7c lib/controller/handler.py
2727
310efc965c862cfbd7b0da5150a5ad36 lib/controller/__init__.py
2828
d58e85ffeac2471ef3af729076b3b5f7 lib/core/agent.py
2929
6cc95a117fbd34ef31b9aa25520f0e31 lib/core/bigarray.py
30-
ebf31aa9c5af54188e999719593e8ba4 lib/core/common.py
30+
68dd8d8d430d6b569ec3210e87f4dce9 lib/core/common.py
3131
5065a4242a8cccf72f91e22e1007ae63 lib/core/convert.py
3232
a8143dab9d3a27490f7d49b6b29ea530 lib/core/data.py
3333
7936d78b1a7f1f008ff92bf2f88574ba lib/core/datatype.py
@@ -46,7 +46,7 @@ b9ff4e622c416116bee6024c0f050349 lib/core/enums.py
4646
d8e9250f3775119df07e9070eddccd16 lib/core/replication.py
4747
785f86e3f963fa3798f84286a4e83ff2 lib/core/revision.py
4848
40c80b28b3a5819b737a5a17d4565ae9 lib/core/session.py
49-
3f23a17e519b6334d343e57e0018efd1 lib/core/settings.py
49+
fa6387225fb4dd399abfcb77e5ef8b94 lib/core/settings.py
5050
d91291997d2bd2f6028aaf371bf1d3b6 lib/core/shell.py
5151
2ad85c130cc5f2b3701ea85c2f6bbf20 lib/core/subprocessng.py
5252
4416fdcab26b286a5a3a88e75aa60044 lib/core/target.py
@@ -103,7 +103,7 @@ db3090ff9a740ba096ba676fcf44ebfc lib/techniques/union/use.py
103103
c08d2487a53a1db8170178ebcf87c864 lib/utils/crawler.py
104104
ba12c69a90061aa14d848b8396e79191 lib/utils/deps.py
105105
3b9fd519164e0bf275d5fd361c3f11ff lib/utils/getch.py
106-
1cd7599b5e6addb29cbab85d292ccf6c lib/utils/har.py
106+
7143c26b3e18973bc5169c202b775245 lib/utils/har.py
107107
ccfdad414ce2ec0c394c3deaa39a82bf lib/utils/hashdb.py
108108
12e0e0ab70c6fe5786bc561c35dc067f lib/utils/hash.py
109109
e76a08237ee6a4cd6855af79610ea8a5 lib/utils/htmlentities.py
@@ -224,7 +224,7 @@ c3cc8b7727161e64ab59f312c33b541a shell/stager.aspx_
224224
1f7f125f30e0e800beb21e2ebbab18e1 shell/stager.jsp_
225225
01e3505e796edf19aad6a996101c81c9 shell/stager.php_
226226
0751a45ac4c130131f2cdb74d866b664 sqlmapapi.py
227-
f53c10492a13c9f53024d8a963bd86a3 sqlmap.py
227+
b83d4f9b170014ff158f3caa7b735415 sqlmap.py
228228
08c711a470d7e0bf705320ba3c48b886 tamper/apostrophemask.py
229229
e8509df10d3f1c28014d7825562d32dd tamper/apostrophenullencode.py
230230
bb27f7dc980ea07fcfedbd7da5e5e029 tamper/appendnullbyte.py

0 commit comments

Comments
 (0)