mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 20:51:31 +00:00
Compare commits
108 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
323af987ed | ||
|
|
80dc67f85a | ||
|
|
ca2f094e4a | ||
|
|
3aa6692b82 | ||
|
|
aabfcbc3e1 | ||
|
|
d42174e8a0 | ||
|
|
a1bf89d31e | ||
|
|
99ea44c7b3 | ||
|
|
abc092959f | ||
|
|
d5547d908c | ||
|
|
25fe5dce21 | ||
|
|
1f82d9587a | ||
|
|
15d9c8f9ed | ||
|
|
01310a47fd | ||
|
|
56177c3d2a | ||
|
|
c5d7c542a2 | ||
|
|
4357b0087d | ||
|
|
d3bfe59401 | ||
|
|
9eb970e7c7 | ||
|
|
46495f70f8 | ||
|
|
30ba167cc1 | ||
|
|
d7180d38c4 | ||
|
|
b1aaac5ba2 | ||
|
|
8962e152ac | ||
|
|
c58383e684 | ||
|
|
4585243175 | ||
|
|
fbfed061b8 | ||
|
|
fdbc323aa6 | ||
|
|
6336389322 | ||
|
|
a7b59243e2 | ||
|
|
c8eea24ac4 | ||
|
|
1be7a5aea8 | ||
|
|
d0d4cf4f6d | ||
|
|
1f83076e70 | ||
|
|
b0a1efaa44 | ||
|
|
de527f1814 | ||
|
|
96adc7c098 | ||
|
|
7940b572ef | ||
|
|
05293e01a4 | ||
|
|
216565fb05 | ||
|
|
6e3eaca547 | ||
|
|
5592f55cae | ||
|
|
12e3ed14ae | ||
|
|
dd4010f16f | ||
|
|
4cd146cc86 | ||
|
|
e85bc30f95 | ||
|
|
b7411211af | ||
|
|
a11f79e16f | ||
|
|
7c9e4c4a65 | ||
|
|
76202e565d | ||
|
|
86ac3025ed | ||
|
|
ebaee3a4e6 | ||
|
|
33a6547f5b | ||
|
|
ad529f24cb | ||
|
|
3d2f89345f | ||
|
|
58f10093a0 | ||
|
|
6aaf7d3960 | ||
|
|
b8fa0edea6 | ||
|
|
55b2b43f0e | ||
|
|
7bc0b08fd6 | ||
|
|
62bba470d6 | ||
|
|
eda669e10b | ||
|
|
c382321134 | ||
|
|
2ace4ef471 | ||
|
|
02dcf2a926 | ||
|
|
5c55602296 | ||
|
|
aa9cc3987e | ||
|
|
d7ee423fc5 | ||
|
|
1092dfb877 | ||
|
|
bf4f84b70a | ||
|
|
c45cf60fb4 | ||
|
|
3f53b2bc05 | ||
|
|
9c103b3dd6 | ||
|
|
7f62572f43 | ||
|
|
e846209b87 | ||
|
|
a246b8da5e | ||
|
|
70665c5d2b | ||
|
|
111620e395 | ||
|
|
2382d2654e | ||
|
|
4cdc3af585 | ||
|
|
212f28d1ad | ||
|
|
e1f7690de4 | ||
|
|
7e425d4c9b | ||
|
|
fe2042ea58 | ||
|
|
54e953d206 | ||
|
|
8c26c67ce9 | ||
|
|
c722f8e3bd | ||
|
|
521da5e734 | ||
|
|
43fba39366 | ||
|
|
afdaba76dc | ||
|
|
d98d64504c | ||
|
|
290058451d | ||
|
|
e7372a9512 | ||
|
|
864ab597c0 | ||
|
|
e8731e1af5 | ||
|
|
df4293473d | ||
|
|
90b444c927 | ||
|
|
99f07b64c5 | ||
|
|
07ae377987 | ||
|
|
4a355b99be | ||
|
|
7008361017 | ||
|
|
a14a3d0e54 | ||
|
|
3aae1849bb | ||
|
|
7d07976969 | ||
|
|
9dc1344478 | ||
|
|
e8e7d66356 | ||
|
|
2038512518 | ||
|
|
184454ba8e |
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@@ -1 +1 @@
|
|||||||
custom: 'https://www.paypal.com/donate?hosted_button_id=A34GMDLKA2V7G'
|
github: sqlmapproject
|
||||||
|
|||||||
8
.github/ISSUE_TEMPLATE/bug_report.md
vendored
8
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -21,10 +21,10 @@ A clear and concise description of what you expected to happen.
|
|||||||
If applicable, add screenshots to help explain your problem.
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
**Running environment:**
|
**Running environment:**
|
||||||
- sqlmap version [e.g. 1.3.5.93#dev]
|
- sqlmap version [e.g. 1.7.2.12#dev]
|
||||||
- Installation method [e.g. git]
|
- Installation method [e.g. pip]
|
||||||
- Operating system: [e.g. Microsoft Windows 10]
|
- Operating system: [e.g. Microsoft Windows 11]
|
||||||
- Python version [e.g. 3.5.2]
|
- Python version [e.g. 3.11.2]
|
||||||
|
|
||||||
**Target details:**
|
**Target details:**
|
||||||
- DBMS [e.g. Microsoft SQL Server]
|
- DBMS [e.g. Microsoft SQL Server]
|
||||||
|
|||||||
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
python-version: [ '2.x', '3.10', 'pypy-2.7', 'pypy-3.7' ]
|
python-version: [ '2.x', '3.11', 'pypy-2.7', 'pypy-3.7' ]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
|
|||||||
2
LICENSE
2
LICENSE
@@ -1,7 +1,7 @@
|
|||||||
COPYING -- Describes the terms under which sqlmap is distributed. A copy
|
COPYING -- Describes the terms under which sqlmap is distributed. A copy
|
||||||
of the GNU General Public License (GPL) is appended to this file.
|
of the GNU General Public License (GPL) is appended to this file.
|
||||||
|
|
||||||
sqlmap is (C) 2006-2022 Bernardo Damele Assumpcao Guimaraes, Miroslav Stampar.
|
sqlmap is (C) 2006-2023 Bernardo Damele Assumpcao Guimaraes, Miroslav Stampar.
|
||||||
|
|
||||||
This program is free software; you may redistribute and/or modify it under
|
This program is free software; you may redistribute and/or modify it under
|
||||||
the terms of the GNU General Public License as published by the Free
|
the terms of the GNU General Public License as published by the Free
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ Translations
|
|||||||
* [Croatian](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-hr-HR.md)
|
* [Croatian](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-hr-HR.md)
|
||||||
* [Dutch](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-nl-NL.md)
|
* [Dutch](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-nl-NL.md)
|
||||||
* [French](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-fr-FR.md)
|
* [French](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-fr-FR.md)
|
||||||
|
* [Georgian](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-ka-GE.md)
|
||||||
* [German](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-de-GER.md)
|
* [German](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-de-GER.md)
|
||||||
* [Greek](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-gr-GR.md)
|
* [Greek](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-gr-GR.md)
|
||||||
* [Indonesian](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-id-ID.md)
|
* [Indonesian](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-id-ID.md)
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
# Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
# See the file 'LICENSE' for copying permission
|
# See the file 'LICENSE' for copying permission
|
||||||
|
|
||||||
id
|
id
|
||||||
@@ -1844,6 +1844,10 @@ banner_id
|
|||||||
error
|
error
|
||||||
language_id
|
language_id
|
||||||
val
|
val
|
||||||
|
parol
|
||||||
|
familiya
|
||||||
|
imya
|
||||||
|
otchestvo
|
||||||
|
|
||||||
# site:jp
|
# site:jp
|
||||||
|
|
||||||
@@ -2731,6 +2735,34 @@ ssn
|
|||||||
account
|
account
|
||||||
confidential
|
confidential
|
||||||
|
|
||||||
|
# site:nl
|
||||||
|
|
||||||
|
naam
|
||||||
|
straat
|
||||||
|
gemeente
|
||||||
|
beschrijving
|
||||||
|
id_gebruiker
|
||||||
|
gebruiker_id
|
||||||
|
gebruikersnaam
|
||||||
|
wachtwoord
|
||||||
|
telefoon
|
||||||
|
voornaam
|
||||||
|
achternaam
|
||||||
|
geslacht
|
||||||
|
huisnummer
|
||||||
|
gemeente
|
||||||
|
leeftijd
|
||||||
|
|
||||||
|
# site:cn
|
||||||
|
|
||||||
|
yonghuming
|
||||||
|
mima
|
||||||
|
xingming
|
||||||
|
xingbie
|
||||||
|
touxiang
|
||||||
|
youxiang
|
||||||
|
shouji
|
||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
|
|
||||||
u_pass
|
u_pass
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
# Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
# See the file 'LICENSE' for copying permission
|
# See the file 'LICENSE' for copying permission
|
||||||
|
|
||||||
# CTFs
|
# CTFs
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
# Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
# See the file 'LICENSE' for copying permission
|
# See the file 'LICENSE' for copying permission
|
||||||
|
|
||||||
[Banners]
|
[Banners]
|
||||||
@@ -399,6 +399,7 @@ XDBWEBSERVICES
|
|||||||
|
|
||||||
# MySQL
|
# MySQL
|
||||||
information_schema
|
information_schema
|
||||||
|
performance_schema
|
||||||
mysql
|
mysql
|
||||||
phpmyadmin
|
phpmyadmin
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
# Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
# See the file 'LICENSE' for copying permission
|
# See the file 'LICENSE' for copying permission
|
||||||
|
|
||||||
users
|
users
|
||||||
@@ -3578,3 +3578,11 @@ users
|
|||||||
user_usergroup_map
|
user_usergroup_map
|
||||||
viewlevels
|
viewlevels
|
||||||
weblinks
|
weblinks
|
||||||
|
|
||||||
|
# site:nl
|
||||||
|
|
||||||
|
gebruikers
|
||||||
|
|
||||||
|
# site:cn
|
||||||
|
|
||||||
|
yonghu
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
# Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
# See the file 'LICENSE' for copying permission
|
# See the file 'LICENSE' for copying permission
|
||||||
|
|
||||||
# SQL-92 keywords (reference: http://developer.mimer.com/validator/sql-reserved-words.tml)
|
# SQL-92 keywords (reference: http://developer.mimer.com/validator/sql-reserved-words.tml)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
# Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
# See the file 'LICENSE' for copying permission
|
# See the file 'LICENSE' for copying permission
|
||||||
|
|
||||||
# Opera
|
# Opera
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -34,7 +34,7 @@
|
|||||||
<!-- Reference: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724832%28v=vs.85%29.aspx -->
|
<!-- Reference: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724832%28v=vs.85%29.aspx -->
|
||||||
|
|
||||||
<regexp value="Windows.*\b10\.0">
|
<regexp value="Windows.*\b10\.0">
|
||||||
<info type="Windows" distrib="2016|2019|10|11"/>
|
<info type="Windows" distrib="2016|2019|2022|10|11"/>
|
||||||
</regexp>
|
</regexp>
|
||||||
|
|
||||||
<regexp value="Windows.*\b6\.3">
|
<regexp value="Windows.*\b6\.3">
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<!-- Microsoft IIS -->
|
<!-- Microsoft IIS -->
|
||||||
|
|
||||||
<regexp value="Microsoft-IIS/(10\.0)">
|
<regexp value="Microsoft-IIS/(10\.0)">
|
||||||
<info technology="Microsoft IIS" tech_version="1" type="Windows" distrib="2019|2016|10"/>
|
<info technology="Microsoft IIS" tech_version="1" type="Windows" distrib="2016|2019|2022|10|11"/>
|
||||||
</regexp>
|
</regexp>
|
||||||
|
|
||||||
<regexp value="Microsoft-IIS/(8\.5)">
|
<regexp value="Microsoft-IIS/(8\.5)">
|
||||||
@@ -878,7 +878,11 @@
|
|||||||
</regexp>
|
</regexp>
|
||||||
|
|
||||||
<regexp value="Apache/2\.4\.46 \(Ubuntu\)">
|
<regexp value="Apache/2\.4\.46 \(Ubuntu\)">
|
||||||
<info type="Linux" distrib="Ubuntu" release="21.04|21.10" codename="eoan|focal"/>
|
<info type="Linux" distrib="Ubuntu" release="21.04|21.10" codename="hirsute|impish"/>
|
||||||
|
</regexp>
|
||||||
|
|
||||||
|
<regexp value="Apache/2\.4\.52 \(Ubuntu\)">
|
||||||
|
<info type="Linux" distrib="Ubuntu" release="22.04" codename="jammy"/>
|
||||||
</regexp>
|
</regexp>
|
||||||
|
|
||||||
<!-- Nginx -->
|
<!-- Nginx -->
|
||||||
|
|||||||
@@ -199,6 +199,7 @@
|
|||||||
<error regexp="io\.prestosql\.jdbc"/>
|
<error regexp="io\.prestosql\.jdbc"/>
|
||||||
<error regexp="com\.simba\.presto\.jdbc"/>
|
<error regexp="com\.simba\.presto\.jdbc"/>
|
||||||
<error regexp="UNION query has different number of fields: \d+, \d+"/>
|
<error regexp="UNION query has different number of fields: \d+, \d+"/>
|
||||||
|
<error regexp="line \d+:\d+: mismatched input '[^']+'. Expecting:"/>
|
||||||
</dbms>
|
</dbms>
|
||||||
|
|
||||||
<dbms value="Altibase">
|
<dbms value="Altibase">
|
||||||
@@ -210,6 +211,11 @@
|
|||||||
<error regexp="Syntax error,[^\n]+assumed to mean"/>
|
<error regexp="Syntax error,[^\n]+assumed to mean"/>
|
||||||
</dbms>
|
</dbms>
|
||||||
|
|
||||||
|
<dbms value="ClickHouse">
|
||||||
|
<error regexp="Code: \d+. DB::Exception:"/>
|
||||||
|
<error regexp="Syntax error: failed at position \d+"/>
|
||||||
|
</dbms>
|
||||||
|
|
||||||
<dbms value="CrateDB">
|
<dbms value="CrateDB">
|
||||||
<error regexp="io\.crate\.client\.jdbc"/>
|
<error regexp="io\.crate\.client\.jdbc"/>
|
||||||
</dbms>
|
</dbms>
|
||||||
|
|||||||
@@ -838,7 +838,7 @@
|
|||||||
<title>IBM DB2 OR error-based - WHERE or HAVING clause</title>
|
<title>IBM DB2 OR error-based - WHERE or HAVING clause</title>
|
||||||
<stype>2</stype>
|
<stype>2</stype>
|
||||||
<level>4</level>
|
<level>4</level>
|
||||||
<risk>1</risk>
|
<risk>3</risk>
|
||||||
<clause>1</clause>
|
<clause>1</clause>
|
||||||
<where>1</where>
|
<where>1</where>
|
||||||
<vector>OR [RANDNUM]=RAISE_ERROR('70001','[DELIMITER_START]'||([QUERY])||'[DELIMITER_STOP]')</vector>
|
<vector>OR [RANDNUM]=RAISE_ERROR('70001','[DELIMITER_START]'||([QUERY])||'[DELIMITER_STOP]')</vector>
|
||||||
@@ -853,6 +853,44 @@
|
|||||||
</details>
|
</details>
|
||||||
</test>
|
</test>
|
||||||
|
|
||||||
|
<test>
|
||||||
|
<title>ClickHouse AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause</title>
|
||||||
|
<stype>2</stype>
|
||||||
|
<level>3</level>
|
||||||
|
<risk>1</risk>
|
||||||
|
<clause>1,2,3,9</clause>
|
||||||
|
<where>1</where>
|
||||||
|
<vector>AND [RANDNUM]=('[DELIMITER_START]'||CAST(([QUERY]) AS String)||'[DELIMITER_STOP]')</vector>
|
||||||
|
<request>
|
||||||
|
<payload>AND [RANDNUM]=('[DELIMITER_START]'||(CASE WHEN ([RANDNUM]=[RANDNUM]) THEN '1' ELSE '0' END)||'[DELIMITER_STOP]')</payload>
|
||||||
|
</request>
|
||||||
|
<response>
|
||||||
|
<grep>[DELIMITER_START](?P<result>.*?)[DELIMITER_STOP]</grep>
|
||||||
|
</response>
|
||||||
|
<details>
|
||||||
|
<dbms>ClickHouse</dbms>
|
||||||
|
</details>
|
||||||
|
</test>
|
||||||
|
|
||||||
|
<test>
|
||||||
|
<title>ClickHouse OR error-based - WHERE, HAVING, ORDER BY or GROUP BY clause</title>
|
||||||
|
<stype>2</stype>
|
||||||
|
<level>4</level>
|
||||||
|
<risk>3</risk>
|
||||||
|
<clause>1,2,3,9</clause>
|
||||||
|
<where>1</where>
|
||||||
|
<vector>OR [RANDNUM]=('[DELIMITER_START]'||CAST(([QUERY]) AS String)||'[DELIMITER_STOP]')</vector>
|
||||||
|
<request>
|
||||||
|
<payload>OR [RANDNUM]=('[DELIMITER_START]'||(CASE WHEN ([RANDNUM]=[RANDNUM]) THEN '1' ELSE '0' END)||'[DELIMITER_STOP]')</payload>
|
||||||
|
</request>
|
||||||
|
<response>
|
||||||
|
<grep>[DELIMITER_START](?P<result>.*?)[DELIMITER_STOP]</grep>
|
||||||
|
</response>
|
||||||
|
<details>
|
||||||
|
<dbms>ClickHouse</dbms>
|
||||||
|
</details>
|
||||||
|
</test>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
TODO: if possible, add payload for SQLite, Microsoft Access,
|
TODO: if possible, add payload for SQLite, Microsoft Access,
|
||||||
and SAP MaxDB - no known techniques at this time
|
and SAP MaxDB - no known techniques at this time
|
||||||
|
|||||||
@@ -133,5 +133,25 @@
|
|||||||
<dbms>Firebird</dbms>
|
<dbms>Firebird</dbms>
|
||||||
</details>
|
</details>
|
||||||
</test>
|
</test>
|
||||||
|
|
||||||
|
<test>
|
||||||
|
<title>ClickHouse inline queries</title>
|
||||||
|
<stype>3</stype>
|
||||||
|
<level>3</level>
|
||||||
|
<risk>1</risk>
|
||||||
|
<clause>1,2,3,8</clause>
|
||||||
|
<where>3</where>
|
||||||
|
<vector>('[DELIMITER_START]'||CAST(([QUERY]) AS String)||'[DELIMITER_STOP]')</vector>
|
||||||
|
<request>
|
||||||
|
<payload>('[DELIMITER_START]'||(CASE WHEN ([RANDNUM]=[RANDNUM]) THEN '1' ELSE '0' END)||'[DELIMITER_STOP]')</payload>
|
||||||
|
</request>
|
||||||
|
<response>
|
||||||
|
<grep>[DELIMITER_START](?P<result>.*?)[DELIMITER_STOP]</grep>
|
||||||
|
</response>
|
||||||
|
<details>
|
||||||
|
<dbms>ClickHouse</dbms>
|
||||||
|
</details>
|
||||||
|
</test>
|
||||||
|
|
||||||
<!-- End of inline queries tests -->
|
<!-- End of inline queries tests -->
|
||||||
</root>
|
</root>
|
||||||
|
|||||||
@@ -195,9 +195,9 @@
|
|||||||
<risk>2</risk>
|
<risk>2</risk>
|
||||||
<clause>1,2,3,8,9</clause>
|
<clause>1,2,3,8,9</clause>
|
||||||
<where>1</where>
|
<where>1</where>
|
||||||
<vector>AND [RANDNUM]=IF(([INFERENCE]),(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS A, INFORMATION_SCHEMA.COLUMNS B, INFORMATION_SCHEMA.COLUMNS C),[RANDNUM])</vector>
|
<vector>AND [RANDNUM]=IF(([INFERENCE]),(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS A, INFORMATION_SCHEMA.COLUMNS B, INFORMATION_SCHEMA.COLUMNS C WHERE 0 XOR 1),[RANDNUM])</vector>
|
||||||
<request>
|
<request>
|
||||||
<payload>AND [RANDNUM]=(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS A, INFORMATION_SCHEMA.COLUMNS B, INFORMATION_SCHEMA.COLUMNS C)</payload>
|
<payload>AND [RANDNUM]=(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS A, INFORMATION_SCHEMA.COLUMNS B, INFORMATION_SCHEMA.COLUMNS C WHERE 0 XOR 1)</payload>
|
||||||
</request>
|
</request>
|
||||||
<response>
|
<response>
|
||||||
<time>[DELAYED]</time>
|
<time>[DELAYED]</time>
|
||||||
@@ -235,9 +235,9 @@
|
|||||||
<risk>3</risk>
|
<risk>3</risk>
|
||||||
<clause>1,2,3,9</clause>
|
<clause>1,2,3,9</clause>
|
||||||
<where>1</where>
|
<where>1</where>
|
||||||
<vector>OR [RANDNUM]=IF(([INFERENCE]),(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS A, INFORMATION_SCHEMA.COLUMNS B, INFORMATION_SCHEMA.COLUMNS C),[RANDNUM])</vector>
|
<vector>OR [RANDNUM]=IF(([INFERENCE]),(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS A, INFORMATION_SCHEMA.COLUMNS B, INFORMATION_SCHEMA.COLUMNS C WHERE 0 XOR 1),[RANDNUM])</vector>
|
||||||
<request>
|
<request>
|
||||||
<payload>OR [RANDNUM]=(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS A, INFORMATION_SCHEMA.COLUMNS B, INFORMATION_SCHEMA.COLUMNS C)</payload>
|
<payload>OR [RANDNUM]=(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS A, INFORMATION_SCHEMA.COLUMNS B, INFORMATION_SCHEMA.COLUMNS C WHERE 0 XOR 1)</payload>
|
||||||
</request>
|
</request>
|
||||||
<response>
|
<response>
|
||||||
<time>[DELAYED]</time>
|
<time>[DELAYED]</time>
|
||||||
@@ -276,9 +276,9 @@
|
|||||||
<risk>2</risk>
|
<risk>2</risk>
|
||||||
<clause>1,2,3,9</clause>
|
<clause>1,2,3,9</clause>
|
||||||
<where>1</where>
|
<where>1</where>
|
||||||
<vector>AND [RANDNUM]=IF(([INFERENCE]),(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS A, INFORMATION_SCHEMA.COLUMNS B, INFORMATION_SCHEMA.COLUMNS C),[RANDNUM])</vector>
|
<vector>AND [RANDNUM]=IF(([INFERENCE]),(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS A, INFORMATION_SCHEMA.COLUMNS B, INFORMATION_SCHEMA.COLUMNS C WHERE 0 XOR 1),[RANDNUM])</vector>
|
||||||
<request>
|
<request>
|
||||||
<payload>AND [RANDNUM]=(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS A, INFORMATION_SCHEMA.COLUMNS B, INFORMATION_SCHEMA.COLUMNS C)</payload>
|
<payload>AND [RANDNUM]=(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS A, INFORMATION_SCHEMA.COLUMNS B, INFORMATION_SCHEMA.COLUMNS C WHERE 0 XOR 1)</payload>
|
||||||
<comment>#</comment>
|
<comment>#</comment>
|
||||||
</request>
|
</request>
|
||||||
<response>
|
<response>
|
||||||
@@ -318,9 +318,9 @@
|
|||||||
<risk>3</risk>
|
<risk>3</risk>
|
||||||
<clause>1,2,3,9</clause>
|
<clause>1,2,3,9</clause>
|
||||||
<where>1</where>
|
<where>1</where>
|
||||||
<vector>OR [RANDNUM]=IF(([INFERENCE]),(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS A, INFORMATION_SCHEMA.COLUMNS B, INFORMATION_SCHEMA.COLUMNS C),[RANDNUM])</vector>
|
<vector>OR [RANDNUM]=IF(([INFERENCE]),(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS A, INFORMATION_SCHEMA.COLUMNS B, INFORMATION_SCHEMA.COLUMNS C WHERE 0 XOR 1),[RANDNUM])</vector>
|
||||||
<request>
|
<request>
|
||||||
<payload>OR [RANDNUM]=(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS A, INFORMATION_SCHEMA.COLUMNS B, INFORMATION_SCHEMA.COLUMNS C)</payload>
|
<payload>OR [RANDNUM]=(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS A, INFORMATION_SCHEMA.COLUMNS B, INFORMATION_SCHEMA.COLUMNS C WHERE 0 XOR 1)</payload>
|
||||||
<comment>#</comment>
|
<comment>#</comment>
|
||||||
</request>
|
</request>
|
||||||
<response>
|
<response>
|
||||||
@@ -1494,6 +1494,44 @@
|
|||||||
</details>
|
</details>
|
||||||
</test>
|
</test>
|
||||||
|
|
||||||
|
<test>
|
||||||
|
<title>ClickHouse AND time-based blind (heavy query)</title>
|
||||||
|
<stype>5</stype>
|
||||||
|
<level>4</level>
|
||||||
|
<risk>1</risk>
|
||||||
|
<clause>1,2,3</clause>
|
||||||
|
<where>1</where>
|
||||||
|
<vector>AND [RANDNUM]=(SELECT COUNT(fuzzBits('[RANDSTR]', 0.001)) FROM numbers(if(([INFERENCE]), 1000000, 1)))</vector>
|
||||||
|
<request>
|
||||||
|
<payload>AND [RANDNUM]=(SELECT COUNT(fuzzBits('[RANDSTR]', 0.001)) FROM numbers(1000000))</payload>
|
||||||
|
</request>
|
||||||
|
<response>
|
||||||
|
<time>[DELAYED]</time>
|
||||||
|
</response>
|
||||||
|
<details>
|
||||||
|
<dbms>ClickHouse</dbms>
|
||||||
|
</details>
|
||||||
|
</test>
|
||||||
|
|
||||||
|
<test>
|
||||||
|
<title>ClickHouse OR time-based blind (heavy query)</title>
|
||||||
|
<stype>5</stype>
|
||||||
|
<level>5</level>
|
||||||
|
<risk>3</risk>
|
||||||
|
<clause>1,2,3</clause>
|
||||||
|
<where>1</where>
|
||||||
|
<vector>OR [RANDNUM]=(SELECT COUNT(fuzzBits('[RANDSTR]', 0.001)) FROM numbers(if(([INFERENCE]), 1000000, 1)))</vector>
|
||||||
|
<request>
|
||||||
|
<payload>OR [RANDNUM]=(SELECT COUNT(fuzzBits('[RANDSTR]', 0.001)) FROM numbers(1000000))</payload>
|
||||||
|
</request>
|
||||||
|
<response>
|
||||||
|
<time>[DELAYED]</time>
|
||||||
|
</response>
|
||||||
|
<details>
|
||||||
|
<dbms>ClickHouse</dbms>
|
||||||
|
</details>
|
||||||
|
</test>
|
||||||
|
|
||||||
<!-- End of time-based boolean tests -->
|
<!-- End of time-based boolean tests -->
|
||||||
|
|
||||||
<!-- Time-based boolean tests - Numerous clauses -->
|
<!-- Time-based boolean tests - Numerous clauses -->
|
||||||
@@ -1608,9 +1646,9 @@
|
|||||||
<risk>2</risk>
|
<risk>2</risk>
|
||||||
<clause>1,2,3,9</clause>
|
<clause>1,2,3,9</clause>
|
||||||
<where>1</where>
|
<where>1</where>
|
||||||
<vector>IF(([INFERENCE]),(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS A, INFORMATION_SCHEMA.COLUMNS B, INFORMATION_SCHEMA.COLUMNS C),[RANDNUM])</vector>
|
<vector>IF(([INFERENCE]),(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS A, INFORMATION_SCHEMA.COLUMNS B, INFORMATION_SCHEMA.COLUMNS C WHERE 0 XOR 1),[RANDNUM])</vector>
|
||||||
<request>
|
<request>
|
||||||
<payload>(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS A, INFORMATION_SCHEMA.COLUMNS B, INFORMATION_SCHEMA.COLUMNS C)</payload>
|
<payload>(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS A, INFORMATION_SCHEMA.COLUMNS B, INFORMATION_SCHEMA.COLUMNS C WHERE 0 XOR 1)</payload>
|
||||||
</request>
|
</request>
|
||||||
<response>
|
<response>
|
||||||
<time>[DELAYED]</time>
|
<time>[DELAYED]</time>
|
||||||
|
|||||||
@@ -357,8 +357,8 @@
|
|||||||
<blind query="SELECT tbl_name FROM sqlite_master WHERE type='table' LIMIT %d,1" count="SELECT COUNT(tbl_name) FROM sqlite_master WHERE type='table'"/>
|
<blind query="SELECT tbl_name FROM sqlite_master WHERE type='table' LIMIT %d,1" count="SELECT COUNT(tbl_name) FROM sqlite_master WHERE type='table'"/>
|
||||||
</tables>
|
</tables>
|
||||||
<columns>
|
<columns>
|
||||||
<inband query="SELECT MAX(sql) FROM sqlite_master WHERE tbl_name='%s'"/>
|
<inband query="SELECT MAX(sql) FROM sqlite_master WHERE type='table' AND tbl_name='%s'"/>
|
||||||
<blind query="SELECT sql FROM sqlite_master WHERE tbl_name='%s' LIMIT 1" condition=""/>
|
<blind query="SELECT sql FROM sqlite_master WHERE type='table' AND tbl_name='%s' LIMIT 1" condition=""/>
|
||||||
</columns>
|
</columns>
|
||||||
<dump_table>
|
<dump_table>
|
||||||
<inband query="SELECT %s FROM %s"/>
|
<inband query="SELECT %s FROM %s"/>
|
||||||
@@ -938,8 +938,8 @@
|
|||||||
<length query="LENGTH(RTRIM(CAST(%s AS CHAR(254))))"/>
|
<length query="LENGTH(RTRIM(CAST(%s AS CHAR(254))))"/>
|
||||||
<isnull query="COALESCE(%s,' ')"/>
|
<isnull query="COALESCE(%s,' ')"/>
|
||||||
<delimiter query="||"/>
|
<delimiter query="||"/>
|
||||||
<limit query="{LIMIT %d OFFSET %d}"/>
|
<limit query="OFFSET %d ROWS FETCH FIRST %d ROWS ONLY"/>
|
||||||
<limitregexp query="{LIMIT\s+([\d]+)\s+OFFSET\s+([\d]+)}"/>
|
<limitregexp query="OFFSET\s+([\d]+)\s+ROWS\s+FETCH\s+FIRST\s+([\d]+)\s+ROWS\s+ONLY"/>
|
||||||
<limitgroupstart query="2"/>
|
<limitgroupstart query="2"/>
|
||||||
<limitgroupstop query="1"/>
|
<limitgroupstop query="1"/>
|
||||||
<limitstring/>
|
<limitstring/>
|
||||||
@@ -962,11 +962,11 @@
|
|||||||
<is_dba query="(SELECT COUNT(*) FROM SYS.SYSUSERS)>=0"/>
|
<is_dba query="(SELECT COUNT(*) FROM SYS.SYSUSERS)>=0"/>
|
||||||
<dbs>
|
<dbs>
|
||||||
<inband query="SELECT SCHEMANAME FROM SYS.SYSSCHEMAS"/>
|
<inband query="SELECT SCHEMANAME FROM SYS.SYSSCHEMAS"/>
|
||||||
<blind query="SELECT SCHEMANAME FROM SYS.SYSSCHEMAS {LIMIT 1 OFFSET %d}" count="SELECT COUNT(SCHEMANAME) FROM SYS.SYSSCHEMAS"/>
|
<blind query="SELECT SCHEMANAME FROM SYS.SYSSCHEMAS OFFSET %d ROWS FETCH FIRST 1 ROW ONLY" count="SELECT COUNT(SCHEMANAME) FROM SYS.SYSSCHEMAS"/>
|
||||||
</dbs>
|
</dbs>
|
||||||
<tables>
|
<tables>
|
||||||
<inband query="SELECT SCHEMANAME,TABLENAME FROM SYS.SYSTABLES JOIN SYS.SYSSCHEMAS ON SYS.SYSTABLES.SCHEMAID=SYS.SYSSCHEMAS.SCHEMAID" condition="SCHEMANAME"/>
|
<inband query="SELECT SCHEMANAME,TABLENAME FROM SYS.SYSTABLES JOIN SYS.SYSSCHEMAS ON SYS.SYSTABLES.SCHEMAID=SYS.SYSSCHEMAS.SCHEMAID" condition="SCHEMANAME"/>
|
||||||
<blind query="SELECT TABLENAME FROM SYS.SYSTABLES JOIN SYS.SYSSCHEMAS ON SYS.SYSTABLES.SCHEMAID=SYS.SYSSCHEMAS.SCHEMAID WHERE SCHEMANAME='%s' {LIMIT 1 OFFSET %d}" count="SELECT COUNT(TABLENAME) FROM SYS.SYSTABLES JOIN SYS.SYSSCHEMAS ON SYS.SYSTABLES.SCHEMAID=SYS.SYSSCHEMAS.SCHEMAID WHERE SCHEMANAME='%s'"/>
|
<blind query="SELECT TABLENAME FROM SYS.SYSTABLES JOIN SYS.SYSSCHEMAS ON SYS.SYSTABLES.SCHEMAID=SYS.SYSSCHEMAS.SCHEMAID WHERE SCHEMANAME='%s' OFFSET %d ROWS FETCH FIRST 1 ROW ONLY" count="SELECT COUNT(TABLENAME) FROM SYS.SYSTABLES JOIN SYS.SYSSCHEMAS ON SYS.SYSTABLES.SCHEMAID=SYS.SYSSCHEMAS.SCHEMAID WHERE SCHEMANAME='%s'"/>
|
||||||
</tables>
|
</tables>
|
||||||
<columns>
|
<columns>
|
||||||
<!-- NOTE: COLUMNDATATYPE without CAST() causes problems during enumeration -->
|
<!-- NOTE: COLUMNDATATYPE without CAST() causes problems during enumeration -->
|
||||||
@@ -975,11 +975,11 @@
|
|||||||
</columns>
|
</columns>
|
||||||
<dump_table>
|
<dump_table>
|
||||||
<inband query="SELECT %s FROM %s"/>
|
<inband query="SELECT %s FROM %s"/>
|
||||||
<blind query="SELECT %s FROM %s {LIMIT 1 OFFSET %d}" count="SELECT COUNT(*) FROM %s"/>
|
<blind query="SELECT %s FROM %s OFFSET %d ROWS FETCH FIRST 1 ROW ONLY" count="SELECT COUNT(*) FROM %s"/>
|
||||||
</dump_table>
|
</dump_table>
|
||||||
<users>
|
<users>
|
||||||
<inband query="SELECT USERNAME FROM SYS.SYSUSERS"/>
|
<inband query="SELECT USERNAME FROM SYS.SYSUSERS"/>
|
||||||
<blind query="SELECT USERNAME FROM SYS.SYSUSERS {LIMIT 1 OFFSET %d}" count="SELECT COUNT(USERNAME) FROM SYS.SYSUSERS"/>
|
<blind query="SELECT USERNAME FROM SYS.SYSUSERS OFFSET %d ROWS FETCH FIRST 1 ROW ONLY" count="SELECT COUNT(USERNAME) FROM SYS.SYSUSERS"/>
|
||||||
</users>
|
</users>
|
||||||
<!-- NOTE: No one can view the 'SYSUSERS'.'PASSWORD' column -->
|
<!-- NOTE: No one can view the 'SYSUSERS'.'PASSWORD' column -->
|
||||||
<passwords/>
|
<passwords/>
|
||||||
@@ -1319,6 +1319,75 @@
|
|||||||
</search_column>
|
</search_column>
|
||||||
</dbms>
|
</dbms>
|
||||||
|
|
||||||
|
<dbms value="ClickHouse">
|
||||||
|
<cast query="CAST(%s AS String)"/>
|
||||||
|
<length query="length(%s)"/>
|
||||||
|
<isnull query="ifNull(%s, '')"/>
|
||||||
|
<delimiter query="||"/>
|
||||||
|
<limit query="LIMIT %d OFFSET %d"/>
|
||||||
|
<limitregexp query="\s+LIMIT\s+([\d]+)\s+OFFSET\s+([\d]+)" query2="\s+LIMIT\s+([\d]+)"/>
|
||||||
|
<limitgroupstart query="2"/>
|
||||||
|
<limitgroupstop query="1"/>
|
||||||
|
<limitstring query=" LIMIT "/>
|
||||||
|
<order query="ORDER BY %s ASC"/>
|
||||||
|
<count query="COUNT(%s)"/>
|
||||||
|
<comment query="--" query2="//"/>
|
||||||
|
<substring query="substring(%s,%d,%d)"/>
|
||||||
|
<concatenate query="%s||%s"/>
|
||||||
|
<case query="SELECT (CASE WHEN (%s) THEN '1' ELSE '0' END)"/>
|
||||||
|
<inference query="substring((%s),%d,1)>'%c'" />
|
||||||
|
<banner query="select version()"/>
|
||||||
|
<current_user query="currentUser()"/>
|
||||||
|
<current_db query="currentDatabase()"/>
|
||||||
|
<hostname query="hostName()"/>
|
||||||
|
<table_comment/>
|
||||||
|
<column_comment/>
|
||||||
|
<is_dba query="(SELECT access_type FROM system.grants WHERE user_name=currentUser())='ALL'"/>
|
||||||
|
<check_udf/>
|
||||||
|
<users>
|
||||||
|
<inband query="SELECT name FROM system.users"/>
|
||||||
|
<blind query="SELECT name FROM system.users LIMIT %d,1" count="SELECT COUNT(name) FROM system.users"/>
|
||||||
|
</users>
|
||||||
|
<passwords/>
|
||||||
|
<privileges>
|
||||||
|
<inband query="SELECT DISTINCT user_name,access_type FROM system.grants" condition="user_name"/>
|
||||||
|
<blind query="SELECT DISTINCT(access_type) FROM system.grants WHERE user_name='%s' ORDER BY access_type LIMIT %d,1" count="SELECT COUNT(DISTINCT(access_type)) FROM system.grants WHERE user_name='%s'"/>
|
||||||
|
</privileges>
|
||||||
|
<roles>
|
||||||
|
<inband query="SELECT DISTINCT user_name,role_name FROM system.role_grants" condition="user_name"/>
|
||||||
|
<blind query="SELECT DISTINCT(role_name) FROM system.role_grants WHERE user_name='%s' ORDER BY role_name LIMIT %d,1" count="SELECT COUNT(DISTINCT(role_name)) FROM system.role_grants WHERE user_name='%s'"/>
|
||||||
|
</roles>
|
||||||
|
<statements/>
|
||||||
|
<dbs>
|
||||||
|
<inband query="SELECT schema_name FROM information_schema.schemata"/>
|
||||||
|
<blind query="SELECT schema_name FROM information_schema.schemata ORDER BY schema_name LIMIT 1 OFFSET %d" count="SELECT COUNT(schema_name) FROM information_schema.schemata"/>
|
||||||
|
</dbs>
|
||||||
|
<tables>
|
||||||
|
<inband query="SELECT table_schema,table_name FROM information_schema.tables" condition="table_schema"/>
|
||||||
|
<blind query="SELECT table_name FROM information_schema.tables WHERE table_schema='%s' LIMIT 1 OFFSET %d" count="SELECT COUNT(table_name) FROM information_schema.tables WHERE table_schema='%s'"/>
|
||||||
|
</tables>
|
||||||
|
<columns>
|
||||||
|
<inband query="SELECT column_name,column_type FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name='%s' AND table_schema='%s'" condition="column_name"/>
|
||||||
|
<blind query="SELECT column_name FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name='%s' AND table_schema='%s' LIMIT %d,1" query2="SELECT column_type FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name='%s' AND column_name='%s' AND table_schema='%s'" count="SELECT COUNT(column_name) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name='%s' AND table_schema='%s'" condition="column_name"/>
|
||||||
|
</columns>
|
||||||
|
<dump_table>
|
||||||
|
<inband query="SELECT %s FROM %s.%s ORDER BY %s"/>
|
||||||
|
<blind query="SELECT %s FROM %s.%s ORDER BY %s LIMIT %d,1 " count="SELECT COUNT(*) FROM %s.%s"/>
|
||||||
|
</dump_table>
|
||||||
|
<search_table>
|
||||||
|
<inband query="SELECT table_schema,table_name FROM INFORMATION_SCHEMA.TABLES WHERE %s" condition="table_name" condition2="table_schema"/>
|
||||||
|
<blind query="SELECT DISTINCT(table_schema) FROM INFORMATION_SCHEMA.TABLES WHERE %s" query2="SELECT DISTINCT(table_name) FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='%s'" count="SELECT COUNT(DISTINCT(table_schema)) FROM INFORMATION_SCHEMA.TABLES WHERE %s" count2="SELECT COUNT(DISTINCT(table_name)) FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='%s'" condition="table_name" condition2="table_schema"/>
|
||||||
|
</search_table>
|
||||||
|
<search_column>
|
||||||
|
<inband query="SELECT table_schema,table_name FROM INFORMATION_SCHEMA.COLUMNS WHERE %s" condition="column_name" condition2="table_schema" condition3="table_name"/>
|
||||||
|
<blind query="SELECT DISTINCT(table_schema) FROM INFORMATION_SCHEMA.COLUMNS WHERE %s" query2="SELECT DISTINCT(table_name) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='%s'" count="SELECT COUNT(DISTINCT(table_schema)) FROM INFORMATION_SCHEMA.COLUMNS WHERE %s" count2="SELECT COUNT(DISTINCT(table_name)) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='%s'" condition="column_name" condition2="table_schema" condition3="table_name"/>
|
||||||
|
</search_column>
|
||||||
|
<search_db>
|
||||||
|
<inband query="SELECT schema_name FROM INFORMATION_SCHEMA.SCHEMATA WHERE %s" condition="schema_name"/>
|
||||||
|
<blind query="SELECT schema_name FROM INFORMATION_SCHEMA.SCHEMATA WHERE %s" count="SELECT COUNT(schema_name) FROM INFORMATION_SCHEMA.SCHEMATA WHERE %s" condition="schema_name"/>
|
||||||
|
</search_db>
|
||||||
|
</dbms>
|
||||||
|
|
||||||
<dbms value="CrateDB">
|
<dbms value="CrateDB">
|
||||||
<cast query="CAST(%s AS TEXT)"/>
|
<cast query="CAST(%s AS TEXT)"/>
|
||||||
<length query="CHAR_LENGTH((%s)::text)"/>
|
<length query="CHAR_LENGTH((%s)::text)"/>
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
# Version 1.7 (2022-01-02)
|
||||||
|
|
||||||
|
* [View changes](https://github.com/sqlmapproject/sqlmap/compare/1.6...1.7)
|
||||||
|
* [View issues](https://github.com/sqlmapproject/sqlmap/milestone/8?closed=1)
|
||||||
|
|
||||||
# Version 1.6 (2022-01-03)
|
# Version 1.6 (2022-01-03)
|
||||||
|
|
||||||
* [View changes](https://github.com/sqlmapproject/sqlmap/compare/1.5...1.6)
|
* [View changes](https://github.com/sqlmapproject/sqlmap/compare/1.5...1.6)
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
برنامه `sqlmap`، برنامهی منبع باز هست که برای تست نفوذ پذیزی دربرابر حملههای احتمالی `sql injection` (جلوگیری از لو رفتن پایگاه داده) جلو گیری میکند. این برنامه مجهز به مکانیزیم تشخیص قدرتمندی میباشد. همچنین داری طیف گستردهای از اسکریپت ها میباشد که برای متخصص تست نفوذ کار کردن با بانک اطلاعاتی را راحتر میکند. از جمع اوری اطلاعات درباره بانک داده تا دسترسی به داده های سیستم و اجرا دستورات از طریق `via out-of-band` درسیستم عامل را امکان پذیر میکند.
|
برنامه `sqlmap`، یک برنامهی تست نفوذ منبع باز است که فرآیند تشخیص و اکسپلویت پایگاه های داده با مشکل امنیتی SQL Injection را بطور خودکار انجام می دهد. این برنامه مجهز به موتور تشخیص قدرتمندی میباشد. همچنین داری طیف گستردهای از اسکریپت ها میباشد که برای متخصصان تست نفوذ کار کردن با بانک اطلاعاتی را راحتر میکند. از جمع اوری اطلاعات درباره بانک داده تا دسترسی به داده های سیستم و اجرا دستورات از طریق ارتباط Out Of Band درسیستم عامل را امکان پذیر میکند.
|
||||||
|
|
||||||
|
|
||||||
عکس
|
تصویر محیط ابزار
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
<div dir=rtl>
|
<div dir=rtl>
|
||||||
|
|
||||||
برای دیدن کردن از [مجموعهی از اسکریپتها](https://github.com/sqlmapproject/sqlmap/wiki/Screenshots) میتوانید از ویکی دیدن کنید.
|
برای نمایش [مجموعه ای از اسکریپتها](https://github.com/sqlmapproject/sqlmap/wiki/Screenshots) میتوانید از دانشنامه دیدن کنید.
|
||||||
|
|
||||||
|
|
||||||
نصب
|
نصب
|
||||||
@@ -32,11 +32,11 @@
|
|||||||
برای دانلود اخرین نسخه tarball، با کلیک در [اینجا](https://github.com/sqlmapproject/sqlmap/tarball/master) یا دانلود اخرین نسخه zipball با کلیک در [اینجا](https://github.com/sqlmapproject/sqlmap/zipball/master) میتوانید این کار را انجام دهید.
|
برای دانلود اخرین نسخه tarball، با کلیک در [اینجا](https://github.com/sqlmapproject/sqlmap/tarball/master) یا دانلود اخرین نسخه zipball با کلیک در [اینجا](https://github.com/sqlmapproject/sqlmap/zipball/master) میتوانید این کار را انجام دهید.
|
||||||
|
|
||||||
|
|
||||||
طرز استفاده
|
نحوه استفاده
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
||||||
برای گرفتن لیست ارگومانهای اساسی میتوانید از دستور زیر استفاده کنید:
|
برای دریافت لیست ارگومانهای اساسی میتوانید از دستور زیر استفاده کنید:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
<div dir=rtl>
|
<div dir=rtl>
|
||||||
|
|
||||||
|
|
||||||
برای گرفتن لیست تمامی ارگومانهای میتوانید از دستور زیر استفاده کنید:
|
برای دریافت لیست تمامی ارگومانها میتوانید از دستور زیر استفاده کنید:
|
||||||
|
|
||||||
<div dir=ltr>
|
<div dir=ltr>
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
<div dir=rtl>
|
<div dir=rtl>
|
||||||
|
|
||||||
|
|
||||||
برای اطلاعات بیشتر برای اجرا از [اینجا](https://asciinema.org/a/46601) میتوانید استفاده کنید. برای گرفتن اطلاعات بیشتر توسعه میشود به [راهنمای](https://github.com/sqlmapproject/sqlmap/wiki/Usage) `sqlmap` سر بزنید.
|
برای اجرای سریع و ساده ابزار می توانید از [اینجا](https://asciinema.org/a/46601) استفاده کنید. برای دریافت اطلاعات بیشتر در رابطه با قابلیت ها ، امکانات قابل پشتیبانی و لیست کامل امکانات و دستورات همراه با مثال می توانید به [راهنمای](https://github.com/sqlmapproject/sqlmap/wiki/Usage) `sqlmap` سر بزنید.
|
||||||
|
|
||||||
|
|
||||||
لینکها
|
لینکها
|
||||||
@@ -74,11 +74,11 @@
|
|||||||
|
|
||||||
|
|
||||||
* خانه: https://sqlmap.org
|
* خانه: https://sqlmap.org
|
||||||
* دانلود: [.tar.gz](https://github.com/sqlmapproject/sqlmap/tarball/master) or [.zip](https://github.com/sqlmapproject/sqlmap/zipball/master)
|
* دانلود: [.tar.gz](https://github.com/sqlmapproject/sqlmap/tarball/master) یا [.zip](https://github.com/sqlmapproject/sqlmap/zipball/master)
|
||||||
* کایمت و نظرات: https://github.com/sqlmapproject/sqlmap/commits/master.atom
|
* نظرات: https://github.com/sqlmapproject/sqlmap/commits/master.atom
|
||||||
* پیگری مشکلات: https://github.com/sqlmapproject/sqlmap/issues
|
* پیگیری مشکلات: https://github.com/sqlmapproject/sqlmap/issues
|
||||||
* راهنمای کاربران: https://github.com/sqlmapproject/sqlmap/wiki
|
* راهنمای کاربران: https://github.com/sqlmapproject/sqlmap/wiki
|
||||||
* سوالات متداول: https://github.com/sqlmapproject/sqlmap/wiki/FAQ
|
* سوالات متداول: https://github.com/sqlmapproject/sqlmap/wiki/FAQ
|
||||||
* تویتر: [@sqlmap](https://twitter.com/sqlmap)
|
* توییتر: [@sqlmap](https://twitter.com/sqlmap)
|
||||||
* رسانه: [https://www.youtube.com/user/inquisb/videos](https://www.youtube.com/user/inquisb/videos)
|
* رسانه: [https://www.youtube.com/user/inquisb/videos](https://www.youtube.com/user/inquisb/videos)
|
||||||
* عکسها: https://github.com/sqlmapproject/sqlmap/wiki/Screenshots
|
* تصاویر: https://github.com/sqlmapproject/sqlmap/wiki/Screenshots
|
||||||
|
|||||||
49
doc/translations/README-ka-GE.md
Normal file
49
doc/translations/README-ka-GE.md
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
# sqlmap 
|
||||||
|
|
||||||
|
[](https://github.com/sqlmapproject/sqlmap/actions/workflows/tests.yml) [](https://www.python.org/) [](https://raw.githubusercontent.com/sqlmapproject/sqlmap/master/LICENSE) [](https://twitter.com/sqlmap)
|
||||||
|
|
||||||
|
sqlmap არის შეღწევადობის ტესტირებისათვის განკუთვილი ინსტრუმენტი, რომლის კოდიც ღიად არის ხელმისაწვდომი. ინსტრუმენტი ახდენს SQL-ინექციის სისუსტეების აღმოჩენისა, გამოყენების და მონაცემთა ბაზათა სერვერების დაუფლების პროცესების ავტომატიზაციას. იგი აღჭურვილია მძლავრი აღმომჩენი მექანიძმით, შეღწევადობის პროფესიონალი ტესტერისათვის შესაფერისი ბევრი ფუნქციით და სკრიპტების ფართო სპექტრით, რომლებიც შეიძლება გამოყენებულ იქნეს მრავალი მიზნით, მათ შორის: მონაცემთა ბაზიდან მონაცემების შეგროვებისათვის, ძირითად საფაილო სისტემაზე წვდომისათვის და out-of-band კავშირების გზით ოპერაციულ სისტემაში ბრძანებათა შესრულებისათვის.
|
||||||
|
|
||||||
|
ეკრანის ანაბეჭდები
|
||||||
|
----
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
შეგიძლიათ ესტუმროთ [ეკრანის ანაბეჭდთა კოლექციას](https://github.com/sqlmapproject/sqlmap/wiki/Screenshots), სადაც დემონსტრირებულია ინსტრუმენტის ზოგიერთი ფუნქცია.
|
||||||
|
|
||||||
|
ინსტალაცია
|
||||||
|
----
|
||||||
|
|
||||||
|
თქვენ შეგიძლიათ უახლესი tar-არქივის ჩამოტვირთვა [აქ](https://github.com/sqlmapproject/sqlmap/tarball/master) დაწკაპუნებით, ან უახლესი zip-არქივის ჩამოტვირთვა [აქ](https://github.com/sqlmapproject/sqlmap/zipball/master) დაწკაპუნებით.
|
||||||
|
|
||||||
|
ასევე შეგიძლიათ (და სასურველია) sqlmap-ის ჩამოტვირთვა [Git](https://github.com/sqlmapproject/sqlmap)-საცავის (repository) კლონირებით:
|
||||||
|
|
||||||
|
git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git sqlmap-dev
|
||||||
|
|
||||||
|
sqlmap ნებისმიერ პლატფორმაზე მუშაობს [Python](https://www.python.org/download/)-ის **2.6**, **2.7** და **3.x** ვერსიებთან.
|
||||||
|
|
||||||
|
გამოყენება
|
||||||
|
----
|
||||||
|
|
||||||
|
ძირითადი ვარიანტებისა და პარამეტრების ჩამონათვალის მისაღებად გამოიყენეთ ბრძანება:
|
||||||
|
|
||||||
|
python sqlmap.py -h
|
||||||
|
|
||||||
|
ვარიანტებისა და პარამეტრების სრული ჩამონათვალის მისაღებად გამოიყენეთ ბრძანება:
|
||||||
|
|
||||||
|
python sqlmap.py -hh
|
||||||
|
|
||||||
|
გამოყენების მარტივი მაგალითი შეგიძლიათ იხილოთ [აქ](https://asciinema.org/a/46601). sqlmap-ის შესაძლებლობათა მიმოხილვის, მხარდაჭერილი ფუნქციონალისა და ყველა ვარიანტის აღწერების მისაღებად გამოყენების მაგალითებთან ერთად, გირჩევთ, იხილოთ [მომხმარებლის სახელმძღვანელო](https://github.com/sqlmapproject/sqlmap/wiki/Usage).
|
||||||
|
|
||||||
|
ბმულები
|
||||||
|
----
|
||||||
|
|
||||||
|
* საწყისი გვერდი: https://sqlmap.org
|
||||||
|
* ჩამოტვირთვა: [.tar.gz](https://github.com/sqlmapproject/sqlmap/tarball/master) ან [.zip](https://github.com/sqlmapproject/sqlmap/zipball/master)
|
||||||
|
* RSS არხი: https://github.com/sqlmapproject/sqlmap/commits/master.atom
|
||||||
|
* პრობლემებისათვის თვალყურის დევნება: https://github.com/sqlmapproject/sqlmap/issues
|
||||||
|
* მომხმარებლის სახელმძღვანელო: https://github.com/sqlmapproject/sqlmap/wiki
|
||||||
|
* ხშირად დასმული კითხვები (ხდკ): https://github.com/sqlmapproject/sqlmap/wiki/FAQ
|
||||||
|
* Twitter: [@sqlmap](https://twitter.com/sqlmap)
|
||||||
|
* დემონსტრაციები: [https://www.youtube.com/user/inquisb/videos](https://www.youtube.com/user/inquisb/videos)
|
||||||
|
* ეკრანის ანაბეჭდები: https://github.com/sqlmapproject/sqlmap/wiki/Screenshots
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"""
|
"""
|
||||||
beep.py - Make a beep sound
|
beep.py - Make a beep sound
|
||||||
|
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"""
|
"""
|
||||||
cloak.py - Simple file encryption/compression utility
|
cloak.py - Simple file encryption/compression utility
|
||||||
|
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ if sys.version_info >= (3, 0):
|
|||||||
xrange = range
|
xrange = range
|
||||||
ord = lambda _: _
|
ord = lambda _: _
|
||||||
|
|
||||||
KEY = b"ENWsCymUeJcXqSbD"
|
KEY = b"E6wRbVhD0IBeCiGJ"
|
||||||
|
|
||||||
def xor(message, key):
|
def xor(message, key):
|
||||||
return b"".join(struct.pack('B', ord(message[i]) ^ ord(key[i % len(key)])) for i in range(len(message)))
|
return b"".join(struct.pack('B', ord(message[i]) ^ ord(key[i % len(key)])) for i in range(len(message)))
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"""
|
"""
|
||||||
dbgtool.py - Portable executable to ASCII debug script converter
|
dbgtool.py - Portable executable to ASCII debug script converter
|
||||||
|
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
# Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
# See the file 'LICENSE' for copying permission
|
# See the file 'LICENSE' for copying permission
|
||||||
|
|
||||||
# Removes trailing spaces from blank lines inside project files
|
# Removes trailing spaces from blank lines inside project files
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
# Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
# See the file 'LICENSE' for copying permission
|
# See the file 'LICENSE' for copying permission
|
||||||
|
|
||||||
# Stress test against Python3
|
# Stress test against Python3
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
# Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
# Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
# See the file 'LICENSE' for copying permission
|
# See the file 'LICENSE' for copying permission
|
||||||
|
|
||||||
# Removes duplicate entries in wordlist like files
|
# Removes duplicate entries in wordlist like files
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
# Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
# See the file 'LICENSE' for copying permission
|
# See the file 'LICENSE' for copying permission
|
||||||
|
|
||||||
find . -type d -name "__pycache__" -exec rm -rf {} \; &>/dev/null
|
find . -type d -name "__pycache__" -exec rm -rf {} \; &>/dev/null
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
# Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
# See the file 'LICENSE' for copying permission
|
# See the file 'LICENSE' for copying permission
|
||||||
|
|
||||||
# sudo pip install modernize
|
# sudo pip install modernize
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
# Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
# See the file 'LICENSE' for copying permission
|
# See the file 'LICENSE' for copying permission
|
||||||
|
|
||||||
# Runs pycodestyle on all python files (prerequisite: pip install pycodestyle)
|
# Runs pycodestyle on all python files (prerequisite: pip install pycodestyle)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
# Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
# See the file 'LICENSE' for copying permission
|
# See the file 'LICENSE' for copying permission
|
||||||
|
|
||||||
# Runs py3diatra on all python files (prerequisite: pip install pydiatra)
|
# Runs py3diatra on all python files (prerequisite: pip install pydiatra)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
# Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
# See the file 'LICENSE' for copying permission
|
# See the file 'LICENSE' for copying permission
|
||||||
|
|
||||||
# Runs pyflakes on all python files (prerequisite: apt-get install pyflakes)
|
# Runs pyflakes on all python files (prerequisite: apt-get install pyflakes)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
# Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
# See the file 'LICENSE' for copying permission
|
# See the file 'LICENSE' for copying permission
|
||||||
|
|
||||||
find . -wholename "./thirdparty" -prune -o -type f -iname "*.py" -exec pylint --rcfile=./.pylintrc '{}' \;
|
find . -wholename "./thirdparty" -prune -o -type f -iname "*.py" -exec pylint --rcfile=./.pylintrc '{}' \;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ cat > $TMP_DIR/setup.py << EOF
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ cat > sqlmap/__init__.py << EOF
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"""
|
"""
|
||||||
vulnserver.py - Trivial SQLi vulnerable HTTP server (Note: for testing purposes)
|
vulnserver.py - Trivial SQLi vulnerable HTTP server (Note: for testing purposes)
|
||||||
|
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -44,7 +44,8 @@ SCHEMA = """
|
|||||||
CREATE TABLE users (
|
CREATE TABLE users (
|
||||||
id INTEGER,
|
id INTEGER,
|
||||||
name TEXT,
|
name TEXT,
|
||||||
surname TEXT
|
surname TEXT,
|
||||||
|
PRIMARY KEY (id)
|
||||||
);
|
);
|
||||||
INSERT INTO users (id, name, surname) VALUES (1, 'luther', 'blisset');
|
INSERT INTO users (id, name, surname) VALUES (1, 'luther', 'blisset');
|
||||||
INSERT INTO users (id, name, surname) VALUES (2, 'fluffy', 'bunny');
|
INSERT INTO users (id, name, surname) VALUES (2, 'fluffy', 'bunny');
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -10,7 +10,6 @@ import logging
|
|||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
import socket
|
import socket
|
||||||
import subprocess
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from extra.beep.beep import beep
|
from extra.beep.beep import beep
|
||||||
@@ -271,15 +270,18 @@ def checkSqlInjection(place, parameter, value):
|
|||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if kb.dbmsFilter and not intersect(payloadDbms, kb.dbmsFilter, True):
|
elif kb.dbmsFilter and not intersect(payloadDbms, kb.dbmsFilter, True):
|
||||||
debugMsg = "skipping test '%s' because " % title
|
debugMsg = "skipping test '%s' because " % title
|
||||||
debugMsg += "its declared DBMS is different than provided"
|
debugMsg += "its declared DBMS is different than provided"
|
||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
elif kb.reduceTests == False:
|
||||||
|
pass
|
||||||
|
|
||||||
# Skip DBMS-specific test if it does not match the
|
# Skip DBMS-specific test if it does not match the
|
||||||
# previously identified DBMS (via DBMS-specific payload)
|
# previously identified DBMS (via DBMS-specific payload)
|
||||||
if injection.dbms and not intersect(payloadDbms, injection.dbms, True):
|
elif injection.dbms and not intersect(payloadDbms, injection.dbms, True):
|
||||||
debugMsg = "skipping test '%s' because " % title
|
debugMsg = "skipping test '%s' because " % title
|
||||||
debugMsg += "its declared DBMS is different than identified"
|
debugMsg += "its declared DBMS is different than identified"
|
||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
@@ -287,7 +289,7 @@ def checkSqlInjection(place, parameter, value):
|
|||||||
|
|
||||||
# Skip DBMS-specific test if it does not match the
|
# Skip DBMS-specific test if it does not match the
|
||||||
# previously identified DBMS (via DBMS-specific error message)
|
# previously identified DBMS (via DBMS-specific error message)
|
||||||
if kb.reduceTests and not intersect(payloadDbms, kb.reduceTests, True):
|
elif kb.reduceTests and not intersect(payloadDbms, kb.reduceTests, True):
|
||||||
debugMsg = "skipping test '%s' because the heuristic " % title
|
debugMsg = "skipping test '%s' because the heuristic " % title
|
||||||
debugMsg += "tests showed that the back-end DBMS "
|
debugMsg += "tests showed that the back-end DBMS "
|
||||||
debugMsg += "could be '%s'" % unArrayizeValue(kb.reduceTests)
|
debugMsg += "could be '%s'" % unArrayizeValue(kb.reduceTests)
|
||||||
@@ -780,23 +782,9 @@ def checkSqlInjection(place, parameter, value):
|
|||||||
injection.conf.regexp = conf.regexp
|
injection.conf.regexp = conf.regexp
|
||||||
injection.conf.optimize = conf.optimize
|
injection.conf.optimize = conf.optimize
|
||||||
|
|
||||||
if not kb.alerted:
|
|
||||||
if conf.beep:
|
if conf.beep:
|
||||||
beep()
|
beep()
|
||||||
|
|
||||||
if conf.alert:
|
|
||||||
infoMsg = "executing alerting shell command(s) ('%s')" % conf.alert
|
|
||||||
logger.info(infoMsg)
|
|
||||||
|
|
||||||
try:
|
|
||||||
process = subprocess.Popen(conf.alert, shell=True)
|
|
||||||
process.wait()
|
|
||||||
except Exception as ex:
|
|
||||||
errMsg = "error occurred while executing '%s' ('%s')" % (conf.alert, getSafeExString(ex))
|
|
||||||
logger.error(errMsg)
|
|
||||||
|
|
||||||
kb.alerted = True
|
|
||||||
|
|
||||||
# There is no need to perform this test for other
|
# There is no need to perform this test for other
|
||||||
# <where> tags
|
# <where> tags
|
||||||
break
|
break
|
||||||
@@ -810,7 +798,7 @@ def checkSqlInjection(place, parameter, value):
|
|||||||
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
warnMsg = "user aborted during detection phase"
|
warnMsg = "user aborted during detection phase"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
if conf.multipleTargets:
|
if conf.multipleTargets:
|
||||||
msg = "how do you want to proceed? [ne(X)t target/(s)kip current test/(e)nd detection phase/(n)ext parameter/(c)hange verbosity/(q)uit]"
|
msg = "how do you want to proceed? [ne(X)t target/(s)kip current test/(e)nd detection phase/(n)ext parameter/(c)hange verbosity/(q)uit]"
|
||||||
@@ -826,7 +814,7 @@ def checkSqlInjection(place, parameter, value):
|
|||||||
choice = None
|
choice = None
|
||||||
while not ((choice or "").isdigit() and 0 <= int(choice) <= 6):
|
while not ((choice or "").isdigit() and 0 <= int(choice) <= 6):
|
||||||
if choice:
|
if choice:
|
||||||
logger.warn("invalid value")
|
logger.warning("invalid value")
|
||||||
msg = "enter new verbosity level: [0-6] "
|
msg = "enter new verbosity level: [0-6] "
|
||||||
choice = readInput(msg, default=str(conf.verbose), checkBatch=False)
|
choice = readInput(msg, default=str(conf.verbose), checkBatch=False)
|
||||||
conf.verbose = int(choice)
|
conf.verbose = int(choice)
|
||||||
@@ -851,15 +839,13 @@ def checkSqlInjection(place, parameter, value):
|
|||||||
warnMsg = "in OR boolean-based injection cases, please consider usage "
|
warnMsg = "in OR boolean-based injection cases, please consider usage "
|
||||||
warnMsg += "of switch '--drop-set-cookie' if you experience any "
|
warnMsg += "of switch '--drop-set-cookie' if you experience any "
|
||||||
warnMsg += "problems during data retrieval"
|
warnMsg += "problems during data retrieval"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
if not checkFalsePositives(injection):
|
if not checkFalsePositives(injection):
|
||||||
if conf.hostname in kb.vulnHosts:
|
if conf.hostname in kb.vulnHosts:
|
||||||
kb.vulnHosts.remove(conf.hostname)
|
kb.vulnHosts.remove(conf.hostname)
|
||||||
|
|
||||||
if NOTE.FALSE_POSITIVE_OR_UNEXPLOITABLE not in injection.notes:
|
if NOTE.FALSE_POSITIVE_OR_UNEXPLOITABLE not in injection.notes:
|
||||||
injection.notes.append(NOTE.FALSE_POSITIVE_OR_UNEXPLOITABLE)
|
injection.notes.append(NOTE.FALSE_POSITIVE_OR_UNEXPLOITABLE)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
injection = None
|
injection = None
|
||||||
|
|
||||||
@@ -976,7 +962,7 @@ def checkFalsePositives(injection):
|
|||||||
|
|
||||||
if not retVal:
|
if not retVal:
|
||||||
warnMsg = "false positive or unexploitable injection point detected"
|
warnMsg = "false positive or unexploitable injection point detected"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
kb.injection = popValue()
|
kb.injection = popValue()
|
||||||
|
|
||||||
@@ -1002,7 +988,7 @@ def checkSuhosinPatch(injection):
|
|||||||
warnMsg = "parameter length constraining "
|
warnMsg = "parameter length constraining "
|
||||||
warnMsg += "mechanism detected (e.g. Suhosin patch). "
|
warnMsg += "mechanism detected (e.g. Suhosin patch). "
|
||||||
warnMsg += "Potential problems in enumeration phase can be expected"
|
warnMsg += "Potential problems in enumeration phase can be expected"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
kb.injection = popValue()
|
kb.injection = popValue()
|
||||||
|
|
||||||
@@ -1023,7 +1009,7 @@ def checkFilteredChars(injection):
|
|||||||
warnMsg += "filtered by the back-end server. There is a strong "
|
warnMsg += "filtered by the back-end server. There is a strong "
|
||||||
warnMsg += "possibility that sqlmap won't be able to properly "
|
warnMsg += "possibility that sqlmap won't be able to properly "
|
||||||
warnMsg += "exploit this vulnerability"
|
warnMsg += "exploit this vulnerability"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
# inference techniques depend on character '>'
|
# inference techniques depend on character '>'
|
||||||
if not any(_ in injection.data for _ in (PAYLOAD.TECHNIQUE.ERROR, PAYLOAD.TECHNIQUE.UNION, PAYLOAD.TECHNIQUE.QUERY)):
|
if not any(_ in injection.data for _ in (PAYLOAD.TECHNIQUE.ERROR, PAYLOAD.TECHNIQUE.UNION, PAYLOAD.TECHNIQUE.QUERY)):
|
||||||
@@ -1031,7 +1017,7 @@ def checkFilteredChars(injection):
|
|||||||
warnMsg = "it appears that the character '>' is "
|
warnMsg = "it appears that the character '>' is "
|
||||||
warnMsg += "filtered by the back-end server. You are strongly "
|
warnMsg += "filtered by the back-end server. You are strongly "
|
||||||
warnMsg += "advised to rerun with the '--tamper=between'"
|
warnMsg += "advised to rerun with the '--tamper=between'"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
kb.injection = popValue()
|
kb.injection = popValue()
|
||||||
|
|
||||||
@@ -1122,7 +1108,7 @@ def heuristicCheckSqlInjection(place, parameter):
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
infoMsg += "not be injectable"
|
infoMsg += "not be injectable"
|
||||||
logger.warn(infoMsg)
|
logger.warning(infoMsg)
|
||||||
|
|
||||||
kb.heuristicMode = True
|
kb.heuristicMode = True
|
||||||
kb.disableHtmlDecoding = True
|
kb.disableHtmlDecoding = True
|
||||||
@@ -1230,7 +1216,7 @@ def checkDynamicContent(firstPage, secondPage):
|
|||||||
if count > conf.retries:
|
if count > conf.retries:
|
||||||
warnMsg = "target URL content appears to be too dynamic. "
|
warnMsg = "target URL content appears to be too dynamic. "
|
||||||
warnMsg += "Switching to '--text-only' "
|
warnMsg += "Switching to '--text-only' "
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
conf.textOnly = True
|
conf.textOnly = True
|
||||||
return
|
return
|
||||||
@@ -1288,7 +1274,7 @@ def checkStability():
|
|||||||
warnMsg += "injectable parameters are detected, or in case of "
|
warnMsg += "injectable parameters are detected, or in case of "
|
||||||
warnMsg += "junk results, refer to user's manual paragraph "
|
warnMsg += "junk results, refer to user's manual paragraph "
|
||||||
warnMsg += "'Page comparison'"
|
warnMsg += "'Page comparison'"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
message = "how do you want to proceed? [(C)ontinue/(s)tring/(r)egex/(q)uit] "
|
message = "how do you want to proceed? [(C)ontinue/(s)tring/(r)egex/(q)uit] "
|
||||||
choice = readInput(message, default='C').upper()
|
choice = readInput(message, default='C').upper()
|
||||||
@@ -1367,11 +1353,10 @@ def checkWaf():
|
|||||||
retVal = False
|
retVal = False
|
||||||
payload = "%d %s" % (randomInt(), IPS_WAF_CHECK_PAYLOAD)
|
payload = "%d %s" % (randomInt(), IPS_WAF_CHECK_PAYLOAD)
|
||||||
|
|
||||||
|
place = PLACE.GET
|
||||||
if PLACE.URI in conf.parameters:
|
if PLACE.URI in conf.parameters:
|
||||||
place = PLACE.POST
|
|
||||||
value = "%s=%s" % (randomStr(), agent.addPayloadDelimiters(payload))
|
value = "%s=%s" % (randomStr(), agent.addPayloadDelimiters(payload))
|
||||||
else:
|
else:
|
||||||
place = PLACE.GET
|
|
||||||
value = "" if not conf.parameters.get(PLACE.GET) else conf.parameters[PLACE.GET] + DEFAULT_GET_POST_DELIMITER
|
value = "" if not conf.parameters.get(PLACE.GET) else conf.parameters[PLACE.GET] + DEFAULT_GET_POST_DELIMITER
|
||||||
value += "%s=%s" % (randomStr(), agent.addPayloadDelimiters(payload))
|
value += "%s=%s" % (randomStr(), agent.addPayloadDelimiters(payload))
|
||||||
|
|
||||||
@@ -1514,7 +1499,7 @@ def checkConnection(suppressOutput=False):
|
|||||||
warnMsg = "you provided '%s' as the string to " % conf.string
|
warnMsg = "you provided '%s' as the string to " % conf.string
|
||||||
warnMsg += "match, but such a string is not within the target "
|
warnMsg += "match, but such a string is not within the target "
|
||||||
warnMsg += "URL raw response, sqlmap will carry on anyway"
|
warnMsg += "URL raw response, sqlmap will carry on anyway"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
if conf.regexp:
|
if conf.regexp:
|
||||||
infoMsg = "testing if the provided regular expression matches within "
|
infoMsg = "testing if the provided regular expression matches within "
|
||||||
@@ -1525,7 +1510,7 @@ def checkConnection(suppressOutput=False):
|
|||||||
warnMsg = "you provided '%s' as the regular expression " % conf.regexp
|
warnMsg = "you provided '%s' as the regular expression " % conf.regexp
|
||||||
warnMsg += "which does not have any match within the target URL raw response. sqlmap "
|
warnMsg += "which does not have any match within the target URL raw response. sqlmap "
|
||||||
warnMsg += "will carry on anyway"
|
warnMsg += "will carry on anyway"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
kb.errorIsNone = False
|
kb.errorIsNone = False
|
||||||
|
|
||||||
@@ -1540,12 +1525,12 @@ def checkConnection(suppressOutput=False):
|
|||||||
elif wasLastResponseDBMSError():
|
elif wasLastResponseDBMSError():
|
||||||
warnMsg = "there is a DBMS error found in the HTTP response body "
|
warnMsg = "there is a DBMS error found in the HTTP response body "
|
||||||
warnMsg += "which could interfere with the results of the tests"
|
warnMsg += "which could interfere with the results of the tests"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
elif wasLastResponseHTTPError():
|
elif wasLastResponseHTTPError():
|
||||||
if getLastRequestHTTPError() not in (conf.ignoreCode or []):
|
if getLastRequestHTTPError() not in (conf.ignoreCode or []):
|
||||||
warnMsg = "the web server responded with an HTTP error code (%d) " % getLastRequestHTTPError()
|
warnMsg = "the web server responded with an HTTP error code (%d) " % getLastRequestHTTPError()
|
||||||
warnMsg += "which could interfere with the results of the tests"
|
warnMsg += "which could interfere with the results of the tests"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
else:
|
else:
|
||||||
kb.errorIsNone = True
|
kb.errorIsNone = True
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -9,6 +9,7 @@ from __future__ import division
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import subprocess
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from lib.controller.action import action
|
from lib.controller.action import action
|
||||||
@@ -186,12 +187,12 @@ def _showInjections():
|
|||||||
if conf.tamper:
|
if conf.tamper:
|
||||||
warnMsg = "changes made by tampering scripts are not "
|
warnMsg = "changes made by tampering scripts are not "
|
||||||
warnMsg += "included in shown payload content(s)"
|
warnMsg += "included in shown payload content(s)"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
if conf.hpp:
|
if conf.hpp:
|
||||||
warnMsg = "changes made by HTTP parameter pollution are not "
|
warnMsg = "changes made by HTTP parameter pollution are not "
|
||||||
warnMsg += "included in shown payload content(s)"
|
warnMsg += "included in shown payload content(s)"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
def _randomFillBlankFields(value):
|
def _randomFillBlankFields(value):
|
||||||
retVal = value
|
retVal = value
|
||||||
@@ -511,6 +512,23 @@ def start():
|
|||||||
testSqlInj = True
|
testSqlInj = True
|
||||||
paramKey = (conf.hostname, conf.path, place, parameter)
|
paramKey = (conf.hostname, conf.path, place, parameter)
|
||||||
|
|
||||||
|
if kb.processUserMarks:
|
||||||
|
if testSqlInj and place not in (PLACE.CUSTOM_POST, PLACE.CUSTOM_HEADER):
|
||||||
|
if kb.processNonCustom is None:
|
||||||
|
message = "other non-custom parameters found. "
|
||||||
|
message += "Do you want to process them too? [Y/n/q] "
|
||||||
|
choice = readInput(message, default='Y').upper()
|
||||||
|
|
||||||
|
if choice == 'Q':
|
||||||
|
raise SqlmapUserQuitException
|
||||||
|
else:
|
||||||
|
kb.processNonCustom = choice == 'Y'
|
||||||
|
|
||||||
|
if not kb.processNonCustom:
|
||||||
|
infoMsg = "skipping %sparameter '%s'" % ("%s " % paramType if paramType != parameter else "", parameter)
|
||||||
|
logger.info(infoMsg)
|
||||||
|
continue
|
||||||
|
|
||||||
if paramKey in kb.testedParams:
|
if paramKey in kb.testedParams:
|
||||||
testSqlInj = False
|
testSqlInj = False
|
||||||
|
|
||||||
@@ -556,7 +574,7 @@ def start():
|
|||||||
|
|
||||||
if not check:
|
if not check:
|
||||||
warnMsg = "%sparameter '%s' does not appear to be dynamic" % ("%s " % paramType if paramType != parameter else "", parameter)
|
warnMsg = "%sparameter '%s' does not appear to be dynamic" % ("%s " % paramType if paramType != parameter else "", parameter)
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
if conf.skipStatic:
|
if conf.skipStatic:
|
||||||
infoMsg = "skipping static %sparameter '%s'" % ("%s " % paramType if paramType != parameter else "", parameter)
|
infoMsg = "skipping static %sparameter '%s'" % ("%s " % paramType if paramType != parameter else "", parameter)
|
||||||
@@ -598,6 +616,19 @@ def start():
|
|||||||
|
|
||||||
kb.injections.append(injection)
|
kb.injections.append(injection)
|
||||||
|
|
||||||
|
if not kb.alerted:
|
||||||
|
if conf.alert:
|
||||||
|
infoMsg = "executing alerting shell command(s) ('%s')" % conf.alert
|
||||||
|
logger.info(infoMsg)
|
||||||
|
try:
|
||||||
|
process = subprocess.Popen(conf.alert, shell=True)
|
||||||
|
process.wait()
|
||||||
|
except Exception as ex:
|
||||||
|
errMsg = "error occurred while executing '%s' ('%s')" % (conf.alert, getSafeExString(ex))
|
||||||
|
logger.error(errMsg)
|
||||||
|
|
||||||
|
kb.alerted = True
|
||||||
|
|
||||||
# In case when user wants to end detection phase (Ctrl+C)
|
# In case when user wants to end detection phase (Ctrl+C)
|
||||||
if not proceed:
|
if not proceed:
|
||||||
break
|
break
|
||||||
@@ -612,7 +643,7 @@ def start():
|
|||||||
|
|
||||||
if not injectable:
|
if not injectable:
|
||||||
warnMsg = "%sparameter '%s' does not seem to be injectable" % ("%s " % paramType if paramType != parameter else "", parameter)
|
warnMsg = "%sparameter '%s' does not seem to be injectable" % ("%s " % paramType if paramType != parameter else "", parameter)
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
if place == PLACE.COOKIE:
|
if place == PLACE.COOKIE:
|
||||||
@@ -709,7 +740,7 @@ def start():
|
|||||||
|
|
||||||
if conf.multipleTargets:
|
if conf.multipleTargets:
|
||||||
warnMsg = "user aborted in multiple target mode"
|
warnMsg = "user aborted in multiple target mode"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
message = "do you want to skip to the next target in list? [Y/n/q]"
|
message = "do you want to skip to the next target in list? [Y/n/q]"
|
||||||
choice = readInput(message, default='Y').upper()
|
choice = readInput(message, default='Y').upper()
|
||||||
@@ -749,7 +780,7 @@ def start():
|
|||||||
warnMsg = "it appears that the target "
|
warnMsg = "it appears that the target "
|
||||||
warnMsg += "has a maximum connections "
|
warnMsg += "has a maximum connections "
|
||||||
warnMsg += "constraint"
|
warnMsg += "constraint"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
if kb.dataOutputFlag and not conf.multipleTargets:
|
if kb.dataOutputFlag and not conf.multipleTargets:
|
||||||
logger.info("fetched data logged to text files under '%s'" % conf.outputPath)
|
logger.info("fetched data logged to text files under '%s'" % conf.outputPath)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -14,6 +14,7 @@ from lib.core.exception import SqlmapConnectionException
|
|||||||
from lib.core.settings import ACCESS_ALIASES
|
from lib.core.settings import ACCESS_ALIASES
|
||||||
from lib.core.settings import ALTIBASE_ALIASES
|
from lib.core.settings import ALTIBASE_ALIASES
|
||||||
from lib.core.settings import CACHE_ALIASES
|
from lib.core.settings import CACHE_ALIASES
|
||||||
|
from lib.core.settings import CLICKHOUSE_ALIASES
|
||||||
from lib.core.settings import CRATEDB_ALIASES
|
from lib.core.settings import CRATEDB_ALIASES
|
||||||
from lib.core.settings import CUBRID_ALIASES
|
from lib.core.settings import CUBRID_ALIASES
|
||||||
from lib.core.settings import DB2_ALIASES
|
from lib.core.settings import DB2_ALIASES
|
||||||
@@ -46,6 +47,8 @@ from plugins.dbms.altibase.connector import Connector as AltibaseConn
|
|||||||
from plugins.dbms.altibase import AltibaseMap
|
from plugins.dbms.altibase import AltibaseMap
|
||||||
from plugins.dbms.cache.connector import Connector as CacheConn
|
from plugins.dbms.cache.connector import Connector as CacheConn
|
||||||
from plugins.dbms.cache import CacheMap
|
from plugins.dbms.cache import CacheMap
|
||||||
|
from plugins.dbms.clickhouse.connector import Connector as ClickHouseConn
|
||||||
|
from plugins.dbms.clickhouse import ClickHouseMap
|
||||||
from plugins.dbms.cratedb.connector import Connector as CrateDBConn
|
from plugins.dbms.cratedb.connector import Connector as CrateDBConn
|
||||||
from plugins.dbms.cratedb import CrateDBMap
|
from plugins.dbms.cratedb import CrateDBMap
|
||||||
from plugins.dbms.cubrid.connector import Connector as CubridConn
|
from plugins.dbms.cubrid.connector import Connector as CubridConn
|
||||||
@@ -122,6 +125,7 @@ def setHandler():
|
|||||||
(DBMS.PRESTO, PRESTO_ALIASES, PrestoMap, PrestoConn),
|
(DBMS.PRESTO, PRESTO_ALIASES, PrestoMap, PrestoConn),
|
||||||
(DBMS.ALTIBASE, ALTIBASE_ALIASES, AltibaseMap, AltibaseConn),
|
(DBMS.ALTIBASE, ALTIBASE_ALIASES, AltibaseMap, AltibaseConn),
|
||||||
(DBMS.MIMERSQL, MIMERSQL_ALIASES, MimerSQLMap, MimerSQLConn),
|
(DBMS.MIMERSQL, MIMERSQL_ALIASES, MimerSQLMap, MimerSQLConn),
|
||||||
|
(DBMS.CLICKHOUSE, CLICKHOUSE_ALIASES, ClickHouseMap, ClickHouseConn),
|
||||||
(DBMS.CRATEDB, CRATEDB_ALIASES, CrateDBMap, CrateDBConn),
|
(DBMS.CRATEDB, CRATEDB_ALIASES, CrateDBMap, CrateDBConn),
|
||||||
(DBMS.CUBRID, CUBRID_ALIASES, CubridMap, CubridConn),
|
(DBMS.CUBRID, CUBRID_ALIASES, CubridMap, CubridConn),
|
||||||
(DBMS.CACHE, CACHE_ALIASES, CacheMap, CacheConn),
|
(DBMS.CACHE, CACHE_ALIASES, CacheMap, CacheConn),
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -134,7 +134,7 @@ class Agent(object):
|
|||||||
origValue = extractRegexResult(r"%s\s*:\s*(?P<result>\d+)\Z" % quote, origValue) or extractRegexResult(r"(?P<result>[^%s]*)\Z" % quote, origValue)
|
origValue = extractRegexResult(r"%s\s*:\s*(?P<result>\d+)\Z" % quote, origValue) or extractRegexResult(r"(?P<result>[^%s]*)\Z" % quote, origValue)
|
||||||
else:
|
else:
|
||||||
_ = extractRegexResult(r"(?s)(?P<result>[^\s<>{}();'\"&]+\Z)", origValue) or ""
|
_ = extractRegexResult(r"(?s)(?P<result>[^\s<>{}();'\"&]+\Z)", origValue) or ""
|
||||||
origValue = _.split('=', 1)[1] if '=' in _ else ""
|
origValue = _.split('=', 1)[1] if '=' in _ else _
|
||||||
elif place == PLACE.CUSTOM_HEADER:
|
elif place == PLACE.CUSTOM_HEADER:
|
||||||
paramString = origValue
|
paramString = origValue
|
||||||
origValue = origValue[origValue.find(',') + 1:]
|
origValue = origValue[origValue.find(',') + 1:]
|
||||||
@@ -196,9 +196,9 @@ class Agent(object):
|
|||||||
if place in (PLACE.URI, PLACE.CUSTOM_POST, PLACE.CUSTOM_HEADER):
|
if place in (PLACE.URI, PLACE.CUSTOM_POST, PLACE.CUSTOM_HEADER):
|
||||||
_ = "%s%s" % (origValue, kb.customInjectionMark)
|
_ = "%s%s" % (origValue, kb.customInjectionMark)
|
||||||
|
|
||||||
if kb.postHint == POST_HINT.JSON and not isNumber(newValue) and '"%s"' % _ not in paramString:
|
if kb.postHint == POST_HINT.JSON and isNumber(origValue) and not isNumber(newValue) and '"%s"' % _ not in paramString:
|
||||||
newValue = '"%s"' % self.addPayloadDelimiters(newValue)
|
newValue = '"%s"' % self.addPayloadDelimiters(newValue)
|
||||||
elif kb.postHint == POST_HINT.JSON_LIKE and not isNumber(newValue) and re.search(r"['\"]%s['\"]" % re.escape(_), paramString) is None:
|
elif kb.postHint == POST_HINT.JSON_LIKE and isNumber(origValue) and not isNumber(newValue) and re.search(r"['\"]%s['\"]" % re.escape(_), paramString) is None:
|
||||||
newValue = "'%s'" % self.addPayloadDelimiters(newValue)
|
newValue = "'%s'" % self.addPayloadDelimiters(newValue)
|
||||||
else:
|
else:
|
||||||
newValue = self.addPayloadDelimiters(newValue)
|
newValue = self.addPayloadDelimiters(newValue)
|
||||||
@@ -489,7 +489,7 @@ class Agent(object):
|
|||||||
if field and Backend.getIdentifiedDbms():
|
if field and Backend.getIdentifiedDbms():
|
||||||
rootQuery = queries[Backend.getIdentifiedDbms()]
|
rootQuery = queries[Backend.getIdentifiedDbms()]
|
||||||
|
|
||||||
if field.startswith("(CASE") or field.startswith("(IIF") or conf.noCast:
|
if field.startswith("(CASE") or field.startswith("(IIF") or conf.noCast and not (field.startswith("COUNT(") and getTechnique() in (PAYLOAD.TECHNIQUE.ERROR, PAYLOAD.TECHNIQUE.UNION) and Backend.getIdentifiedDbms() == DBMS.MSSQL):
|
||||||
nulledCastedField = field
|
nulledCastedField = field
|
||||||
else:
|
else:
|
||||||
if not (Backend.isDbms(DBMS.SQLITE) and not isDBMSVersionAtLeast('3')):
|
if not (Backend.isDbms(DBMS.SQLITE) and not isDBMSVersionAtLeast('3')):
|
||||||
@@ -581,7 +581,7 @@ class Agent(object):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
prefixRegex = r"(?:\s+(?:FIRST|SKIP|LIMIT(?: \d+)?)\s+\d+)*"
|
prefixRegex = r"(?:\s+(?:FIRST|SKIP|LIMIT(?: \d+)?)\s+\d+)*"
|
||||||
fieldsSelectTop = re.search(r"\ASELECT\s+TOP(\s+[\d]|\s*\([^)]+\))\s+(.+?)\s+FROM", query, re.I)
|
fieldsSelectTop = re.search(r"\ASELECT\s+TOP(\s+\d+|\s*\([^)]+\))\s+(.+?)\s+FROM", query, re.I)
|
||||||
fieldsSelectRownum = re.search(r"\ASELECT\s+([^()]+?),\s*ROWNUM AS LIMIT FROM", query, re.I)
|
fieldsSelectRownum = re.search(r"\ASELECT\s+([^()]+?),\s*ROWNUM AS LIMIT FROM", query, re.I)
|
||||||
fieldsSelectDistinct = re.search(r"\ASELECT%s\s+DISTINCT\((.+?)\)\s+FROM" % prefixRegex, query, re.I)
|
fieldsSelectDistinct = re.search(r"\ASELECT%s\s+DISTINCT\((.+?)\)\s+FROM" % prefixRegex, query, re.I)
|
||||||
fieldsSelectCase = re.search(r"\ASELECT%s\s+(\(CASE WHEN\s+.+\s+END\))" % prefixRegex, query, re.I)
|
fieldsSelectCase = re.search(r"\ASELECT%s\s+(\(CASE WHEN\s+.+\s+END\))" % prefixRegex, query, re.I)
|
||||||
@@ -596,6 +596,9 @@ class Agent(object):
|
|||||||
if not _:
|
if not _:
|
||||||
fieldsSelectFrom = None
|
fieldsSelectFrom = None
|
||||||
|
|
||||||
|
if re.search(r"\bWHERE\b.+(MIN|MAX)", query, re.I):
|
||||||
|
fieldsMinMaxstr = None
|
||||||
|
|
||||||
fieldsToCastStr = fieldsNoSelect
|
fieldsToCastStr = fieldsNoSelect
|
||||||
|
|
||||||
if fieldsSubstr:
|
if fieldsSubstr:
|
||||||
@@ -729,7 +732,7 @@ class Agent(object):
|
|||||||
concatenatedQuery = concatenatedQuery.replace("SELECT ", "'%s'+" % kb.chars.start, 1)
|
concatenatedQuery = concatenatedQuery.replace("SELECT ", "'%s'+" % kb.chars.start, 1)
|
||||||
concatenatedQuery += "+'%s'" % kb.chars.stop
|
concatenatedQuery += "+'%s'" % kb.chars.stop
|
||||||
elif fieldsSelectTop:
|
elif fieldsSelectTop:
|
||||||
topNum = re.search(r"\ASELECT\s+TOP(\s+[\d]|\s*\([^)]+\))\s+", concatenatedQuery, re.I).group(1)
|
topNum = re.search(r"\ASELECT\s+TOP(\s+\d+|\s*\([^)]+\))\s+", concatenatedQuery, re.I).group(1)
|
||||||
concatenatedQuery = concatenatedQuery.replace("SELECT TOP%s " % topNum, "TOP%s '%s'+" % (topNum, kb.chars.start), 1)
|
concatenatedQuery = concatenatedQuery.replace("SELECT TOP%s " % topNum, "TOP%s '%s'+" % (topNum, kb.chars.start), 1)
|
||||||
concatenatedQuery = concatenatedQuery.replace(" FROM ", "+'%s' FROM " % kb.chars.stop, 1)
|
concatenatedQuery = concatenatedQuery.replace(" FROM ", "+'%s' FROM " % kb.chars.stop, 1)
|
||||||
elif fieldsSelectCase:
|
elif fieldsSelectCase:
|
||||||
@@ -1024,8 +1027,8 @@ class Agent(object):
|
|||||||
limitStr = queries[Backend.getIdentifiedDbms()].limit.query % (num + 1, 1)
|
limitStr = queries[Backend.getIdentifiedDbms()].limit.query % (num + 1, 1)
|
||||||
limitedQuery += " %s" % limitStr
|
limitedQuery += " %s" % limitStr
|
||||||
|
|
||||||
elif Backend.getIdentifiedDbms() in (DBMS.DERBY, DBMS.CRATEDB):
|
elif Backend.getIdentifiedDbms() in (DBMS.DERBY, DBMS.CRATEDB, DBMS.CLICKHOUSE):
|
||||||
limitStr = queries[Backend.getIdentifiedDbms()].limit.query % (1, num)
|
limitStr = queries[Backend.getIdentifiedDbms()].limit.query % (num, 1)
|
||||||
limitedQuery += " %s" % limitStr
|
limitedQuery += " %s" % limitStr
|
||||||
|
|
||||||
elif Backend.getIdentifiedDbms() in (DBMS.FRONTBASE, DBMS.VIRTUOSO):
|
elif Backend.getIdentifiedDbms() in (DBMS.FRONTBASE, DBMS.VIRTUOSO):
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -351,7 +351,7 @@ class Backend(object):
|
|||||||
elif kb.dbms is not None and kb.dbms != dbms:
|
elif kb.dbms is not None and kb.dbms != dbms:
|
||||||
warnMsg = "there appears to be a high probability that "
|
warnMsg = "there appears to be a high probability that "
|
||||||
warnMsg += "this could be a false positive case"
|
warnMsg += "this could be a false positive case"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
msg = "sqlmap previously fingerprinted back-end DBMS as "
|
msg = "sqlmap previously fingerprinted back-end DBMS as "
|
||||||
msg += "%s. However now it has been fingerprinted " % kb.dbms
|
msg += "%s. However now it has been fingerprinted " % kb.dbms
|
||||||
@@ -371,7 +371,7 @@ class Backend(object):
|
|||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
warnMsg = "invalid value"
|
warnMsg = "invalid value"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
elif kb.dbms is None:
|
elif kb.dbms is None:
|
||||||
kb.dbms = aliasToDbmsEnum(dbms)
|
kb.dbms = aliasToDbmsEnum(dbms)
|
||||||
@@ -429,7 +429,7 @@ class Backend(object):
|
|||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
warnMsg = "invalid value"
|
warnMsg = "invalid value"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
elif kb.os is None and isinstance(os, six.string_types):
|
elif kb.os is None and isinstance(os, six.string_types):
|
||||||
kb.os = os.capitalize()
|
kb.os = os.capitalize()
|
||||||
@@ -466,7 +466,7 @@ class Backend(object):
|
|||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
warnMsg = "invalid value. Valid values are 1 and 2"
|
warnMsg = "invalid value. Valid values are 1 and 2"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
return kb.arch
|
return kb.arch
|
||||||
|
|
||||||
@@ -590,7 +590,7 @@ class Backend(object):
|
|||||||
def isVersionGreaterOrEqualThan(version):
|
def isVersionGreaterOrEqualThan(version):
|
||||||
retVal = False
|
retVal = False
|
||||||
|
|
||||||
if Backend.getVersion() is not None and version is not None:
|
if all(_ not in (None, UNKNOWN_DBMS_VERSION) for _ in (Backend.getVersion(), version)):
|
||||||
_version = unArrayizeValue(Backend.getVersion())
|
_version = unArrayizeValue(Backend.getVersion())
|
||||||
_version = re.sub(r"[<>= ]", "", _version)
|
_version = re.sub(r"[<>= ]", "", _version)
|
||||||
|
|
||||||
@@ -663,7 +663,7 @@ def paramToDict(place, parameters=None):
|
|||||||
warnMsg += "chars/statements from manual SQL injection test(s). "
|
warnMsg += "chars/statements from manual SQL injection test(s). "
|
||||||
warnMsg += "Please, always use only valid parameter values "
|
warnMsg += "Please, always use only valid parameter values "
|
||||||
warnMsg += "so sqlmap could be able to run properly"
|
warnMsg += "so sqlmap could be able to run properly"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
message = "are you really sure that you want to continue (sqlmap could have problems)? [y/N] "
|
message = "are you really sure that you want to continue (sqlmap could have problems)? [y/N] "
|
||||||
|
|
||||||
@@ -673,7 +673,7 @@ def paramToDict(place, parameters=None):
|
|||||||
warnMsg = "provided value for parameter '%s' is empty. " % parameter
|
warnMsg = "provided value for parameter '%s' is empty. " % parameter
|
||||||
warnMsg += "Please, always use only valid parameter values "
|
warnMsg += "Please, always use only valid parameter values "
|
||||||
warnMsg += "so sqlmap could be able to run properly"
|
warnMsg += "so sqlmap could be able to run properly"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
if place in (PLACE.POST, PLACE.GET):
|
if place in (PLACE.POST, PLACE.GET):
|
||||||
for regex in (r"\A((?:<[^>]+>)+\w+)((?:<[^>]+>)+)\Z", r"\A([^\w]+.*\w+)([^\w]+)\Z"):
|
for regex in (r"\A((?:<[^>]+>)+\w+)((?:<[^>]+>)+)\Z", r"\A([^\w]+.*\w+)([^\w]+)\Z"):
|
||||||
@@ -738,7 +738,7 @@ def paramToDict(place, parameters=None):
|
|||||||
if len(conf.testParameter) > 1:
|
if len(conf.testParameter) > 1:
|
||||||
warnMsg = "provided parameters '%s' " % paramStr
|
warnMsg = "provided parameters '%s' " % paramStr
|
||||||
warnMsg += "are not inside the %s" % place
|
warnMsg += "are not inside the %s" % place
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
else:
|
else:
|
||||||
parameter = conf.testParameter[0]
|
parameter = conf.testParameter[0]
|
||||||
|
|
||||||
@@ -763,7 +763,7 @@ def paramToDict(place, parameters=None):
|
|||||||
if len(decoded) > MIN_ENCODED_LEN_CHECK and all(_ in getBytes(string.printable) for _ in decoded):
|
if len(decoded) > MIN_ENCODED_LEN_CHECK and all(_ in getBytes(string.printable) for _ in decoded):
|
||||||
warnMsg = "provided parameter '%s' " % parameter
|
warnMsg = "provided parameter '%s' " % parameter
|
||||||
warnMsg += "appears to be '%s' encoded" % encoding
|
warnMsg += "appears to be '%s' encoded" % encoding
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
break
|
break
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
@@ -814,7 +814,7 @@ def getManualDirectories():
|
|||||||
else:
|
else:
|
||||||
warnMsg = "unable to automatically retrieve the web server "
|
warnMsg = "unable to automatically retrieve the web server "
|
||||||
warnMsg += "document root"
|
warnMsg += "document root"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
directories = []
|
directories = []
|
||||||
|
|
||||||
@@ -900,7 +900,7 @@ def getAutoDirectories():
|
|||||||
retVal.add(directory)
|
retVal.add(directory)
|
||||||
else:
|
else:
|
||||||
warnMsg = "unable to automatically parse any web server path"
|
warnMsg = "unable to automatically parse any web server path"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
return list(retVal)
|
return list(retVal)
|
||||||
|
|
||||||
@@ -1034,7 +1034,10 @@ def dataToStdout(data, forceOutput=False, bold=False, contentType=None, status=C
|
|||||||
except UnicodeEncodeError:
|
except UnicodeEncodeError:
|
||||||
sys.stdout.write(re.sub(r"[^ -~]", '?', clearColors(data)))
|
sys.stdout.write(re.sub(r"[^ -~]", '?', clearColors(data)))
|
||||||
finally:
|
finally:
|
||||||
|
try:
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
except IOError:
|
||||||
|
raise SystemExit
|
||||||
|
|
||||||
if multiThreadMode:
|
if multiThreadMode:
|
||||||
logging._releaseLock()
|
logging._releaseLock()
|
||||||
@@ -1637,7 +1640,7 @@ def parseTargetDirect():
|
|||||||
if remote:
|
if remote:
|
||||||
warnMsg = "direct connection over the network for "
|
warnMsg = "direct connection over the network for "
|
||||||
warnMsg += "%s DBMS is not supported" % dbmsName
|
warnMsg += "%s DBMS is not supported" % dbmsName
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
conf.hostname = "localhost"
|
conf.hostname = "localhost"
|
||||||
conf.port = 0
|
conf.port = 0
|
||||||
@@ -1819,7 +1822,7 @@ def expandAsteriskForColumns(expression):
|
|||||||
the SQL query string (expression)
|
the SQL query string (expression)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
match = re.search(r"(?i)\ASELECT(\s+TOP\s+[\d]+)?\s+\*\s+FROM\s+((`[^`]+`|[^\s]+)+)", expression)
|
match = re.search(r"(?i)\ASELECT(\s+TOP\s+[\d]+)?\s+\*\s+FROM\s+(([`'\"][^`'\"]+[`'\"]|[\w.]+)+)(\s|\Z)", expression)
|
||||||
|
|
||||||
if match:
|
if match:
|
||||||
infoMsg = "you did not provide the fields in your query. "
|
infoMsg = "you did not provide the fields in your query. "
|
||||||
@@ -1900,7 +1903,7 @@ def parseUnionPage(page):
|
|||||||
if re.search(r"(?si)\A%s.*%s\Z" % (kb.chars.start, kb.chars.stop), page):
|
if re.search(r"(?si)\A%s.*%s\Z" % (kb.chars.start, kb.chars.stop), page):
|
||||||
if len(page) > LARGE_OUTPUT_THRESHOLD:
|
if len(page) > LARGE_OUTPUT_THRESHOLD:
|
||||||
warnMsg = "large output detected. This might take a while"
|
warnMsg = "large output detected. This might take a while"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
data = BigArray()
|
data = BigArray()
|
||||||
keys = set()
|
keys = set()
|
||||||
@@ -2789,7 +2792,7 @@ def wasLastResponseDelayed():
|
|||||||
if len(kb.responseTimes[kb.responseTimeMode]) < MIN_TIME_RESPONSES:
|
if len(kb.responseTimes[kb.responseTimeMode]) < MIN_TIME_RESPONSES:
|
||||||
warnMsg = "time-based standard deviation method used on a model "
|
warnMsg = "time-based standard deviation method used on a model "
|
||||||
warnMsg += "with less than %d response times" % MIN_TIME_RESPONSES
|
warnMsg += "with less than %d response times" % MIN_TIME_RESPONSES
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
lowerStdLimit = average(kb.responseTimes[kb.responseTimeMode]) + TIME_STDEV_COEFF * deviation
|
lowerStdLimit = average(kb.responseTimes[kb.responseTimeMode]) + TIME_STDEV_COEFF * deviation
|
||||||
retVal = (threadData.lastQueryDuration >= max(MIN_VALID_DELAYED_RESPONSE, lowerStdLimit))
|
retVal = (threadData.lastQueryDuration >= max(MIN_VALID_DELAYED_RESPONSE, lowerStdLimit))
|
||||||
@@ -3399,19 +3402,39 @@ def parseSqliteTableSchema(value):
|
|||||||
>>> kb.data.cachedColumns = {}
|
>>> kb.data.cachedColumns = {}
|
||||||
>>> parseSqliteTableSchema("CREATE TABLE users(\\n\\t\\tid INTEGER,\\n\\t\\tname TEXT\\n);")
|
>>> parseSqliteTableSchema("CREATE TABLE users(\\n\\t\\tid INTEGER,\\n\\t\\tname TEXT\\n);")
|
||||||
True
|
True
|
||||||
>>> repr(kb.data.cachedColumns).count(',') == 1
|
>>> tuple(kb.data.cachedColumns[conf.db][conf.tbl].items()) == (('id', 'INTEGER'), ('name', 'TEXT'))
|
||||||
|
True
|
||||||
|
>>> parseSqliteTableSchema("CREATE TABLE dummy(`foo bar` BIGINT, \\"foo\\" VARCHAR, 'bar' TEXT)");
|
||||||
|
True
|
||||||
|
>>> tuple(kb.data.cachedColumns[conf.db][conf.tbl].items()) == (('foo bar', 'BIGINT'), ('foo', 'VARCHAR'), ('bar', 'TEXT'))
|
||||||
|
True
|
||||||
|
>>> parseSqliteTableSchema("CREATE TABLE suppliers(\\n\\tsupplier_id INTEGER PRIMARY KEY DESC,\\n\\tname TEXT NOT NULL\\n);");
|
||||||
|
True
|
||||||
|
>>> tuple(kb.data.cachedColumns[conf.db][conf.tbl].items()) == (('supplier_id', 'INTEGER'), ('name', 'TEXT'))
|
||||||
|
True
|
||||||
|
>>> parseSqliteTableSchema("CREATE TABLE country_languages (\\n\\tcountry_id INTEGER NOT NULL,\\n\\tlanguage_id INTEGER NOT NULL,\\n\\tPRIMARY KEY (country_id, language_id),\\n\\tFOREIGN KEY (country_id) REFERENCES countries (country_id) ON DELETE CASCADE ON UPDATE NO ACTION,\\tFOREIGN KEY (language_id) REFERENCES languages (language_id) ON DELETE CASCADE ON UPDATE NO ACTION);");
|
||||||
|
True
|
||||||
|
>>> tuple(kb.data.cachedColumns[conf.db][conf.tbl].items()) == (('country_id', 'INTEGER'), ('language_id', 'INTEGER'))
|
||||||
True
|
True
|
||||||
"""
|
"""
|
||||||
|
|
||||||
retVal = False
|
retVal = False
|
||||||
|
|
||||||
|
value = extractRegexResult(r"(?s)\((?P<result>.+)\)", value)
|
||||||
|
|
||||||
if value:
|
if value:
|
||||||
table = {}
|
table = {}
|
||||||
columns = {}
|
columns = OrderedDict()
|
||||||
|
|
||||||
for match in re.finditer(r"[(,]\s*[\"'`]?(\w+)[\"'`]?(?:\s+(INT|INTEGER|TINYINT|SMALLINT|MEDIUMINT|BIGINT|UNSIGNED BIG INT|INT2|INT8|INTEGER|CHARACTER|VARCHAR|VARYING CHARACTER|NCHAR|NATIVE CHARACTER|NVARCHAR|TEXT|CLOB|LONGTEXT|BLOB|NONE|REAL|DOUBLE|DOUBLE PRECISION|FLOAT|REAL|NUMERIC|DECIMAL|BOOLEAN|DATE|DATETIME|NUMERIC)\b)?", decodeStringEscape(value), re.I):
|
value = re.sub(r"\(.+?\)", "", value).strip()
|
||||||
|
|
||||||
|
for match in re.finditer(r"(?:\A|,)\s*(([\"'`]).+?\2|\w+)(?:\s+(INT|INTEGER|TINYINT|SMALLINT|MEDIUMINT|BIGINT|UNSIGNED BIG INT|INT2|INT8|INTEGER|CHARACTER|VARCHAR|VARYING CHARACTER|NCHAR|NATIVE CHARACTER|NVARCHAR|TEXT|CLOB|LONGTEXT|BLOB|NONE|REAL|DOUBLE|DOUBLE PRECISION|FLOAT|REAL|NUMERIC|DECIMAL|BOOLEAN|DATE|DATETIME|NUMERIC)\b)?", decodeStringEscape(value), re.I):
|
||||||
|
column = match.group(1).strip(match.group(2) or "")
|
||||||
|
if re.search(r"(?i)\A(CONSTRAINT|PRIMARY|UNIQUE|CHECK|FOREIGN)\b", column.strip()):
|
||||||
|
continue
|
||||||
retVal = True
|
retVal = True
|
||||||
columns[match.group(1)] = match.group(2) or "TEXT"
|
|
||||||
|
columns[column] = match.group(3) or "TEXT"
|
||||||
|
|
||||||
table[safeSQLIdentificatorNaming(conf.tbl, True)] = columns
|
table[safeSQLIdentificatorNaming(conf.tbl, True)] = columns
|
||||||
kb.data.cachedColumns[conf.db] = table
|
kb.data.cachedColumns[conf.db] = table
|
||||||
@@ -3593,7 +3616,7 @@ def initTechnique(technique=None):
|
|||||||
else:
|
else:
|
||||||
warnMsg = "there is no injection data available for technique "
|
warnMsg = "there is no injection data available for technique "
|
||||||
warnMsg += "'%s'" % enumValueToNameLookup(PAYLOAD.TECHNIQUE, technique)
|
warnMsg += "'%s'" % enumValueToNameLookup(PAYLOAD.TECHNIQUE, technique)
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
except SqlmapDataException:
|
except SqlmapDataException:
|
||||||
errMsg = "missing data in old session file(s). "
|
errMsg = "missing data in old session file(s). "
|
||||||
@@ -3708,7 +3731,7 @@ def getSortedInjectionTests():
|
|||||||
if test.stype == PAYLOAD.TECHNIQUE.UNION:
|
if test.stype == PAYLOAD.TECHNIQUE.UNION:
|
||||||
retVal = SORT_ORDER.LAST
|
retVal = SORT_ORDER.LAST
|
||||||
|
|
||||||
elif "details" in test and "dbms" in test.details:
|
elif "details" in test and "dbms" in (test.details or {}):
|
||||||
if intersect(test.details.dbms, Backend.getIdentifiedDbms()):
|
if intersect(test.details.dbms, Backend.getIdentifiedDbms()):
|
||||||
retVal = SORT_ORDER.SECOND
|
retVal = SORT_ORDER.SECOND
|
||||||
else:
|
else:
|
||||||
@@ -3744,7 +3767,7 @@ def showHttpErrorCodes():
|
|||||||
if kb.httpErrorCodes:
|
if kb.httpErrorCodes:
|
||||||
warnMsg = "HTTP error codes detected during run:\n"
|
warnMsg = "HTTP error codes detected during run:\n"
|
||||||
warnMsg += ", ".join("%d (%s) - %d times" % (code, _http_client.responses[code] if code in _http_client.responses else '?', count) for code, count in kb.httpErrorCodes.items())
|
warnMsg += ", ".join("%d (%s) - %d times" % (code, _http_client.responses[code] if code in _http_client.responses else '?', count) for code, count in kb.httpErrorCodes.items())
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
if any((str(_).startswith('4') or str(_).startswith('5')) and _ != _http_client.INTERNAL_SERVER_ERROR and _ != kb.originalCode for _ in kb.httpErrorCodes):
|
if any((str(_).startswith('4') or str(_).startswith('5')) and _ != _http_client.INTERNAL_SERVER_ERROR and _ != kb.originalCode for _ in kb.httpErrorCodes):
|
||||||
msg = "too many 4xx and/or 5xx HTTP error codes "
|
msg = "too many 4xx and/or 5xx HTTP error codes "
|
||||||
msg += "could mean that some kind of protection is involved (e.g. WAF)"
|
msg += "could mean that some kind of protection is involved (e.g. WAF)"
|
||||||
@@ -3972,7 +3995,7 @@ def createGithubIssue(errMsg, excMsg):
|
|||||||
if closed:
|
if closed:
|
||||||
warnMsg += " and resolved. Please update to the latest "
|
warnMsg += " and resolved. Please update to the latest "
|
||||||
warnMsg += "development version from official GitHub repository at '%s'" % GIT_PAGE
|
warnMsg += "development version from official GitHub repository at '%s'" % GIT_PAGE
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
return
|
return
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
@@ -4002,7 +4025,7 @@ def createGithubIssue(errMsg, excMsg):
|
|||||||
warnMsg += " ('%s')" % _excMsg
|
warnMsg += " ('%s')" % _excMsg
|
||||||
if "Unauthorized" in warnMsg:
|
if "Unauthorized" in warnMsg:
|
||||||
warnMsg += ". Please update to the latest revision"
|
warnMsg += ". Please update to the latest revision"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
def maskSensitiveData(msg):
|
def maskSensitiveData(msg):
|
||||||
"""
|
"""
|
||||||
@@ -4010,7 +4033,7 @@ def maskSensitiveData(msg):
|
|||||||
|
|
||||||
>>> maskSensitiveData('python sqlmap.py -u "http://www.test.com/vuln.php?id=1" --banner') == 'python sqlmap.py -u *********************************** --banner'
|
>>> maskSensitiveData('python sqlmap.py -u "http://www.test.com/vuln.php?id=1" --banner') == 'python sqlmap.py -u *********************************** --banner'
|
||||||
True
|
True
|
||||||
>>> maskSensitiveData('sqlmap.py -u test.com/index.go?id=index') == 'sqlmap.py -u **************************'
|
>>> maskSensitiveData('sqlmap.py -u test.com/index.go?id=index --auth-type=basic --auth-creds=foo:bar\\ndummy line') == 'sqlmap.py -u ************************** --auth-type=***** --auth-creds=*******\\ndummy line'
|
||||||
True
|
True
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -4026,7 +4049,7 @@ def maskSensitiveData(msg):
|
|||||||
retVal = retVal.replace(value, '*' * len(value))
|
retVal = retVal.replace(value, '*' * len(value))
|
||||||
|
|
||||||
# Just in case (for problematic parameters regarding user encoding)
|
# Just in case (for problematic parameters regarding user encoding)
|
||||||
for match in re.finditer(r"(?i)[ -]-(u|url|data|cookie|auth-\w+|proxy|host|referer|headers?|H)( |=)(.*?)(?= -?-[a-z]|\Z)", retVal):
|
for match in re.finditer(r"(?im)[ -]-(u|url|data|cookie|auth-\w+|proxy|host|referer|headers?|H)( |=)(.*?)(?= -?-[a-z]|$)", retVal):
|
||||||
retVal = retVal.replace(match.group(3), '*' * len(match.group(3)))
|
retVal = retVal.replace(match.group(3), '*' * len(match.group(3)))
|
||||||
|
|
||||||
# Fail-safe substitutions
|
# Fail-safe substitutions
|
||||||
@@ -4269,6 +4292,7 @@ def safeSQLIdentificatorNaming(name, isTable=False):
|
|||||||
retVal = "[%s]" % retVal
|
retVal = "[%s]" % retVal
|
||||||
|
|
||||||
if _ and DEFAULT_MSSQL_SCHEMA not in retVal and '.' not in re.sub(r"\[[^]]+\]", "", retVal):
|
if _ and DEFAULT_MSSQL_SCHEMA not in retVal and '.' not in re.sub(r"\[[^]]+\]", "", retVal):
|
||||||
|
if (conf.db or "").lower() != "information_schema": # NOTE: https://github.com/sqlmapproject/sqlmap/issues/5192
|
||||||
retVal = "%s.%s" % (DEFAULT_MSSQL_SCHEMA, retVal)
|
retVal = "%s.%s" % (DEFAULT_MSSQL_SCHEMA, retVal)
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
@@ -4395,7 +4419,7 @@ def expandMnemonics(mnemonics, parser, args):
|
|||||||
|
|
||||||
if not options:
|
if not options:
|
||||||
warnMsg = "mnemonic '%s' can't be resolved" % name
|
warnMsg = "mnemonic '%s' can't be resolved" % name
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
elif name in options:
|
elif name in options:
|
||||||
found = name
|
found = name
|
||||||
debugMsg = "mnemonic '%s' resolved to %s). " % (name, found)
|
debugMsg = "mnemonic '%s' resolved to %s). " % (name, found)
|
||||||
@@ -4404,7 +4428,7 @@ def expandMnemonics(mnemonics, parser, args):
|
|||||||
found = sorted(options.keys(), key=len)[0]
|
found = sorted(options.keys(), key=len)[0]
|
||||||
warnMsg = "detected ambiguity (mnemonic '%s' can be resolved to any of: %s). " % (name, ", ".join("'%s'" % key for key in options))
|
warnMsg = "detected ambiguity (mnemonic '%s' can be resolved to any of: %s). " % (name, ", ".join("'%s'" % key for key in options))
|
||||||
warnMsg += "Resolved to shortest of those ('%s')" % found
|
warnMsg += "Resolved to shortest of those ('%s')" % found
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
if found:
|
if found:
|
||||||
found = options[found]
|
found = options[found]
|
||||||
@@ -4693,7 +4717,7 @@ def findPageForms(content, url, raise_=False, addToTargets=False):
|
|||||||
else:
|
else:
|
||||||
url = urldecode(request.get_full_url(), kb.pageEncoding)
|
url = urldecode(request.get_full_url(), kb.pageEncoding)
|
||||||
method = request.get_method()
|
method = request.get_method()
|
||||||
data = request.data
|
data = unArrayizeValue(request.data)
|
||||||
data = urldecode(data, kb.pageEncoding, spaceplus=False)
|
data = urldecode(data, kb.pageEncoding, spaceplus=False)
|
||||||
|
|
||||||
if not data and method and method.upper() == HTTPMETHOD.POST:
|
if not data and method and method.upper() == HTTPMETHOD.POST:
|
||||||
@@ -4810,7 +4834,7 @@ def checkOldOptions(args):
|
|||||||
warnMsg = "switch/option '%s' is deprecated" % _
|
warnMsg = "switch/option '%s' is deprecated" % _
|
||||||
if DEPRECATED_OPTIONS[_]:
|
if DEPRECATED_OPTIONS[_]:
|
||||||
warnMsg += " (hint: %s)" % DEPRECATED_OPTIONS[_]
|
warnMsg += " (hint: %s)" % DEPRECATED_OPTIONS[_]
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
def checkSystemEncoding():
|
def checkSystemEncoding():
|
||||||
"""
|
"""
|
||||||
@@ -4828,7 +4852,7 @@ def checkSystemEncoding():
|
|||||||
logger.critical(errMsg)
|
logger.critical(errMsg)
|
||||||
|
|
||||||
warnMsg = "temporary switching to charset 'cp1256'"
|
warnMsg = "temporary switching to charset 'cp1256'"
|
||||||
logger.warn(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
_reload_module(sys)
|
_reload_module(sys)
|
||||||
sys.setdefaultencoding("cp1256")
|
sys.setdefaultencoding("cp1256")
|
||||||
@@ -5303,6 +5327,7 @@ def parseRequestFile(reqFile, checkParams=True):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
getPostReq = False
|
getPostReq = False
|
||||||
|
forceBody = False
|
||||||
url = None
|
url = None
|
||||||
host = None
|
host = None
|
||||||
method = None
|
method = None
|
||||||
@@ -5323,7 +5348,7 @@ def parseRequestFile(reqFile, checkParams=True):
|
|||||||
line = line.strip('\r')
|
line = line.strip('\r')
|
||||||
match = re.search(r"\A([A-Z]+) (.+) HTTP/[\d.]+\Z", line) if not method else None
|
match = re.search(r"\A([A-Z]+) (.+) HTTP/[\d.]+\Z", line) if not method else None
|
||||||
|
|
||||||
if len(line.strip()) == 0 and method and method != HTTPMETHOD.GET and data is None:
|
if len(line.strip()) == 0 and method and (method != HTTPMETHOD.GET or forceBody) and data is None:
|
||||||
data = ""
|
data = ""
|
||||||
params = True
|
params = True
|
||||||
|
|
||||||
@@ -5370,6 +5395,7 @@ def parseRequestFile(reqFile, checkParams=True):
|
|||||||
# headers and consider the following lines as
|
# headers and consider the following lines as
|
||||||
# POSTed data
|
# POSTed data
|
||||||
if key.upper() == HTTP_HEADER.CONTENT_LENGTH.upper():
|
if key.upper() == HTTP_HEADER.CONTENT_LENGTH.upper():
|
||||||
|
forceBody = True
|
||||||
params = True
|
params = True
|
||||||
|
|
||||||
# Avoid proxy and connection type related headers
|
# Avoid proxy and connection type related headers
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -12,6 +12,7 @@ import functools
|
|||||||
import math
|
import math
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
|
import re
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import uuid
|
import uuid
|
||||||
@@ -277,7 +278,37 @@ else:
|
|||||||
xrange = xrange
|
xrange = xrange
|
||||||
buffer = buffer
|
buffer = buffer
|
||||||
|
|
||||||
try:
|
def LooseVersion(version):
|
||||||
from pkg_resources import parse_version as LooseVersion
|
"""
|
||||||
except ImportError:
|
>>> LooseVersion("1.0") == LooseVersion("1.0")
|
||||||
from distutils.version import LooseVersion
|
True
|
||||||
|
>>> LooseVersion("1.0.1") > LooseVersion("1.0")
|
||||||
|
True
|
||||||
|
>>> LooseVersion("1.0.1-") == LooseVersion("1.0.1")
|
||||||
|
True
|
||||||
|
>>> LooseVersion("1.0.11") < LooseVersion("1.0.111")
|
||||||
|
True
|
||||||
|
>>> LooseVersion("foobar") > LooseVersion("1.0")
|
||||||
|
False
|
||||||
|
>>> LooseVersion("1.0") > LooseVersion("foobar")
|
||||||
|
False
|
||||||
|
>>> LooseVersion("3.22-mysql") == LooseVersion("3.22-mysql-ubuntu0.3")
|
||||||
|
True
|
||||||
|
>>> LooseVersion("8.0.22-0ubuntu0.20.04.2")
|
||||||
|
8.000022
|
||||||
|
"""
|
||||||
|
|
||||||
|
match = re.search(r"\A(\d[\d.]*)", version or "")
|
||||||
|
|
||||||
|
if match:
|
||||||
|
result = 0
|
||||||
|
value = match.group(1)
|
||||||
|
weight = 1.0
|
||||||
|
for part in value.strip('.').split('.'):
|
||||||
|
if part.isdigit():
|
||||||
|
result += int(part) * weight
|
||||||
|
weight *= 1e-3
|
||||||
|
else:
|
||||||
|
result = float("NaN")
|
||||||
|
|
||||||
|
return result
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user