mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-29 05:04:15 +00:00
Minor update
This commit is contained in:
parent
a9f5d30b4a
commit
dbe2734b71
2 changed files with 25 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ from lib.core.enums import OS
|
|||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.10.8.3"
|
||||
VERSION = "1.10.8.4"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||
|
|
|
|||
|
|
@ -48,6 +48,30 @@ class TestHelpers(unittest.TestCase):
|
|||
self.assertEqual(hql._shortEntity("User"), "User")
|
||||
|
||||
|
||||
class TestOriginalValue(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.originalParameters = hql.conf.parameters
|
||||
self.originalParamDict = hql.conf.paramDict
|
||||
|
||||
def tearDown(self):
|
||||
hql.conf.parameters = self.originalParameters
|
||||
hql.conf.paramDict = self.originalParamDict
|
||||
|
||||
def test_original_value_parsed_from_raw_query_string(self):
|
||||
hql.conf.parameters = {"GET": "id=1&name=alice"}
|
||||
self.assertEqual(hql._originalValue("GET", "name"), "alice")
|
||||
|
||||
def test_original_value_falls_back_to_param_dict(self):
|
||||
hql.conf.parameters = {}
|
||||
hql.conf.paramDict = {"GET": {"name": "bob"}}
|
||||
self.assertEqual(hql._originalValue("GET", "name"), "bob")
|
||||
|
||||
def test_original_value_missing_returns_empty(self):
|
||||
hql.conf.parameters = {}
|
||||
hql.conf.paramDict = {}
|
||||
self.assertEqual(hql._originalValue("GET", "nope"), "")
|
||||
|
||||
|
||||
class TestBoundary(unittest.TestCase):
|
||||
def test_wrap_string(self):
|
||||
b = hql.Boundary("' OR ", " OR '1'='2", True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue