mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
295cd15dff | ||
|
|
3463341bad | ||
|
|
88553d3540 | ||
|
|
ab90447600 | ||
|
|
a23faaeb8c | ||
|
|
6942abf090 | ||
|
|
3c25f79a9b | ||
|
|
94ab17829e | ||
|
|
c4c1571902 | ||
|
|
da86486cd9 | ||
|
|
dccc837703 | ||
|
|
452915ed4a | ||
|
|
35e575c287 | ||
|
|
015a8f0a6d | ||
|
|
0896a49500 | ||
|
|
95511c8ff9 | ||
|
|
8bf1650d65 | ||
|
|
ff645a767b | ||
|
|
cfa7b3c3bd | ||
|
|
76b310cc43 | ||
|
|
9a6acd2054 | ||
|
|
387020ece8 | ||
|
|
732b9670d2 | ||
|
|
1159c9ccae | ||
|
|
cadbf170f0 | ||
|
|
fc486c8b34 | ||
|
|
cfe43e3f2b |
@@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
**sqlmap is sponsored by [SpyderSec](https://spydersec.com/).**
|
|
||||||
|
|
||||||
Screenshots
|
Screenshots
|
||||||
----
|
----
|
||||||
|
|
||||||
@@ -68,6 +66,7 @@ Translations
|
|||||||
* [Polish](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-pl-PL.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)
|
* [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)
|
* [Russian](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-ru-RUS.md)
|
||||||
|
* [Serbian](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-rs-RS.md)
|
||||||
* [Spanish](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-es-MX.md)
|
* [Spanish](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-es-MX.md)
|
||||||
* [Turkish](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-tr-TR.md)
|
* [Turkish](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-tr-TR.md)
|
||||||
* [Ukrainian](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-uk-UA.md)
|
* [Ukrainian](https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-uk-UA.md)
|
||||||
|
|||||||
@@ -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)
|
[](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 merupakan alat _(tool)_ bantu _open source_ dalam melakukan tes penetrasi yang mengotomasi proses deteksi dan eksploitasi kelemahan _SQL injection_ dan pengambil-alihan server basis data. sqlmap dilengkapi dengan pendeteksi canggih, fitur-fitur hanal bagi _penetration tester_, beragam cara untuk mendeteksi basis data, hingga mengakses _file system_ dan mengeksekusi perintah dalam sistem operasi melalui koneksi _out-of-band_.
|
sqlmap merupakan alat _(tool)_ bantu _open source_ dalam melakukan tes penetrasi yang mengotomasi proses deteksi dan eksploitasi kelemahan _SQL injection_ dan pengambil-alihan server basis data. sqlmap dilengkapi dengan pendeteksi canggih, fitur-fitur handal bagi _penetration tester_, beragam cara untuk mendeteksi basis data, hingga mengakses _file system_ dan mengeksekusi perintah dalam sistem operasi melalui koneksi _out-of-band_.
|
||||||
|
|
||||||
Tangkapan Layar
|
Tangkapan Layar
|
||||||
----
|
----
|
||||||
@@ -14,8 +14,7 @@ Anda dapat mengunjungi [koleksi tangkapan layar](https://github.com/sqlmapprojec
|
|||||||
Instalasi
|
Instalasi
|
||||||
----
|
----
|
||||||
|
|
||||||
Anda dapat mengunduh tarball versi terbaru [di sini]
|
Anda dapat mengunduh tarball versi terbaru [di sini](https://github.com/sqlmapproject/sqlmap/tarball/master) atau zipball [di sini](https://github.com/sqlmapproject/sqlmap/zipball/master).
|
||||||
(https://github.com/sqlmapproject/sqlmap/tarball/master) atau zipball [di sini](https://github.com/sqlmapproject/sqlmap/zipball/master).
|
|
||||||
|
|
||||||
Sebagai alternatif, Anda dapat mengunduh sqlmap dengan men-_clone_ repositori [Git](https://github.com/sqlmapproject/sqlmap):
|
Sebagai alternatif, Anda dapat mengunduh sqlmap dengan men-_clone_ repositori [Git](https://github.com/sqlmapproject/sqlmap):
|
||||||
|
|
||||||
|
|||||||
50
doc/translations/README-rs-RS.md
Normal file
50
doc/translations/README-rs-RS.md
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
# 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 je alat otvorenog koda namenjen za penetraciono testiranje koji automatizuje proces detekcije i eksploatacije sigurnosnih propusta SQL injekcije i preuzimanje baza podataka. Dolazi s moćnim mehanizmom za detekciju, mnoštvom korisnih opcija za napredno penetracijsko testiranje te široki spektar opcija od onih za prepoznavanja baze podataka, preko uzimanja podataka iz baze, do pristupa zahvaćenom fajl sistemu i izvršavanja komandi na operativnom sistemu korištenjem tzv. "out-of-band" veza.
|
||||||
|
|
||||||
|
Slike
|
||||||
|
----
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Možete posetiti [kolekciju slika](https://github.com/sqlmapproject/sqlmap/wiki/Screenshots) gde su demonstrirane neke od e se demonstriraju neke od funkcija na wiki stranicama.
|
||||||
|
|
||||||
|
Instalacija
|
||||||
|
----
|
||||||
|
|
||||||
|
Možete preuzeti najnoviji tarball klikom [ovde](https://github.com/sqlmapproject/sqlmap/tarball/master) ili najnoviji zipball klikom [ovde](https://github.com/sqlmapproject/sqlmap/zipball/master).
|
||||||
|
|
||||||
|
Opciono, možete preuzeti sqlmap kloniranjem [Git](https://github.com/sqlmapproject/sqlmap) repozitorija:
|
||||||
|
|
||||||
|
git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git sqlmap-dev
|
||||||
|
|
||||||
|
sqlmap radi bez posebnih zahteva korištenjem [Python](http://www.python.org/download/) verzije **2.6**, **2.7** i/ili **3.x** na bilo kojoj platformi.
|
||||||
|
|
||||||
|
Korišćenje
|
||||||
|
----
|
||||||
|
|
||||||
|
Kako biste dobili listu osnovnih opcija i prekidača koristite:
|
||||||
|
|
||||||
|
python sqlmap.py -h
|
||||||
|
|
||||||
|
Kako biste dobili listu svih opcija i prekidača koristite:
|
||||||
|
|
||||||
|
python sqlmap.py -hh
|
||||||
|
|
||||||
|
Možete pronaći primer izvršavanja [ovde](https://asciinema.org/a/46601).
|
||||||
|
Kako biste dobili pregled mogućnosti sqlmap-a, liste podržanih funkcija, te opis svih opcija i prekidača, zajedno s primerima, preporučen je uvid u [korisnički priručnik](https://github.com/sqlmapproject/sqlmap/wiki/Usage).
|
||||||
|
|
||||||
|
Linkovi
|
||||||
|
----
|
||||||
|
|
||||||
|
* Početna stranica: http://sqlmap.org
|
||||||
|
* Preuzimanje: [.tar.gz](https://github.com/sqlmapproject/sqlmap/tarball/master) ili [.zip](https://github.com/sqlmapproject/sqlmap/zipball/master)
|
||||||
|
* RSS feed promena u kodu: https://github.com/sqlmapproject/sqlmap/commits/master.atom
|
||||||
|
* Prijava problema: https://github.com/sqlmapproject/sqlmap/issues
|
||||||
|
* Korisnički priručnik: https://github.com/sqlmapproject/sqlmap/wiki
|
||||||
|
* Najčešće postavljena pitanja (FAQ): https://github.com/sqlmapproject/sqlmap/wiki/FAQ
|
||||||
|
* Twitter: [@sqlmap](https://twitter.com/sqlmap)
|
||||||
|
* Demo: [http://www.youtube.com/user/inquisb/videos](http://www.youtube.com/user/inquisb/videos)
|
||||||
|
* Slike: https://github.com/sqlmapproject/sqlmap/wiki/Screenshots
|
||||||
@@ -3,15 +3,14 @@
|
|||||||
[](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)
|
[](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 là một công cụ kiểm tra thâm nhập mã nguồn mở, nhằm tự động hóa quá trình phát hiện, khai thác lỗ hổng tiêm SQL và tiếp quản các máy chủ cơ sở dữ liệu. Nó đi kèm với
|
sqlmap là một công cụ kiểm tra thâm nhập mã nguồn mở, nhằm tự động hóa quá trình phát hiện, khai thác lỗ hổng tiêm SQL và tiếp quản các máy chủ cơ sở dữ liệu. Nó đi kèm với
|
||||||
một hệ thống phát hiện mạnh mẽ, nhiều tính năng thích hợp cho người kiểm tra thâm nhập và một loạt các tùy chọn bao gồm lấy dấu cơ sở dữ liệu, truy xuất dữ liệu từ cơ sở dữ
|
một hệ thống phát hiện mạnh mẽ, nhiều tính năng thích hợp cho người kiểm tra thâm nhập (pentester) và một loạt các tùy chọn bao gồm phát hiện cơ sở dữ liệu, truy xuất dữ liệu từ cơ sở dữ liệu, truy cập tệp của hệ thống và thực hiện các lệnh trên hệ điều hành từ xa.
|
||||||
liệu, truy cập tệp của hệ thống và thực hiện các lệnh trên hệ điều hành thông qua kết nối ngoài.
|
|
||||||
|
|
||||||
Ảnh chụp màn hình
|
Ảnh chụp màn hình
|
||||||
----
|
----
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Bạn có thể truy cập vào [bộ sưu tập ảnh chụp màn hình](https://github.com/sqlmapproject/sqlmap/wiki/Screenshots), chúng trình bày một số tính năng trên wiki.
|
Bạn có thể truy cập vào [bộ sưu tập ảnh chụp màn hình](https://github.com/sqlmapproject/sqlmap/wiki/Screenshots), chúng trình bày một số tính năng có thể tìm thấy trong wiki.
|
||||||
|
|
||||||
Cài đặt
|
Cài đặt
|
||||||
----
|
----
|
||||||
@@ -19,11 +18,11 @@ Cài đặt
|
|||||||
|
|
||||||
Bạn có thể tải xuống tập tin nén tar mới nhất bằng cách nhấp vào [đây](https://github.com/sqlmapproject/sqlmap/tarball/master) hoặc tập tin nén zip mới nhất bằng cách nhấp vào [đây](https://github.com/sqlmapproject/sqlmap/zipball/master).
|
Bạn có thể tải xuống tập tin nén tar mới nhất bằng cách nhấp vào [đây](https://github.com/sqlmapproject/sqlmap/tarball/master) hoặc tập tin nén zip mới nhất bằng cách nhấp vào [đây](https://github.com/sqlmapproject/sqlmap/zipball/master).
|
||||||
|
|
||||||
Tốt hơn là bạn có thể tải xuống sqlmap bằng cách clone với [Git](https://github.com/sqlmapproject/sqlmap):
|
Tốt hơn là bạn nên tải xuống sqlmap bằng cách clone với [Git](https://github.com/sqlmapproject/sqlmap):
|
||||||
|
|
||||||
git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git sqlmap-dev
|
git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git sqlmap-dev
|
||||||
|
|
||||||
sqlmap hoạt động hiệu quả với [Python](http://www.python.org/download/) phiên bản **2.6**, **2.7** và **3.x** trên bất kì nền tảng nào.
|
sqlmap hoạt động hiệu quả với [Python](http://www.python.org/download/) phiên bản **2.6**, **2.7** và **3.x** trên bất kì hệ điều hành nào.
|
||||||
|
|
||||||
Sử dụng
|
Sử dụng
|
||||||
----
|
----
|
||||||
@@ -36,7 +35,7 @@ Sử dụng
|
|||||||
|
|
||||||
python sqlmap.py -hh
|
python sqlmap.py -hh
|
||||||
|
|
||||||
Bạn có thể tìm thấy video chạy mẫu [tại đây](https://asciinema.org/a/46601).
|
Bạn có thể xem video chạy thử [tại đây](https://asciinema.org/a/46601).
|
||||||
Để có cái nhìn tổng quan về các khả năng của sqlmap, danh sách các tính năng được hỗ trợ và mô tả về tất cả các tùy chọn, cùng với các ví dụ, bạn nên tham khảo [hướng dẫn sử dụng](https://github.com/sqlmapproject/sqlmap/wiki/Usage) (Tiếng Anh).
|
Để có cái nhìn tổng quan về các khả năng của sqlmap, danh sách các tính năng được hỗ trợ và mô tả về tất cả các tùy chọn, cùng với các ví dụ, bạn nên tham khảo [hướng dẫn sử dụng](https://github.com/sqlmapproject/sqlmap/wiki/Usage) (Tiếng Anh).
|
||||||
|
|
||||||
Liên kết
|
Liên kết
|
||||||
@@ -44,7 +43,7 @@ Liên kết
|
|||||||
|
|
||||||
* Trang chủ: http://sqlmap.org
|
* Trang chủ: http://sqlmap.org
|
||||||
* Tải xuống: [.tar.gz](https://github.com/sqlmapproject/sqlmap/tarball/master) hoặc [.zip](https://github.com/sqlmapproject/sqlmap/zipball/master)
|
* Tải xuống: [.tar.gz](https://github.com/sqlmapproject/sqlmap/tarball/master) hoặc [.zip](https://github.com/sqlmapproject/sqlmap/zipball/master)
|
||||||
* Lịch sử thay nguồn đổi cấp dữ liệu RSS: https://github.com/sqlmapproject/sqlmap/commits/master.atom
|
* Nguồn cấp dữ liệu RSS về commits: https://github.com/sqlmapproject/sqlmap/commits/master.atom
|
||||||
* Theo dõi vấn đề: https://github.com/sqlmapproject/sqlmap/issues
|
* Theo dõi vấn đề: https://github.com/sqlmapproject/sqlmap/issues
|
||||||
* Hướng dẫn sử dụng: https://github.com/sqlmapproject/sqlmap/wiki
|
* Hướng dẫn sử dụng: https://github.com/sqlmapproject/sqlmap/wiki
|
||||||
* Các câu hỏi thường gặp (FAQ): https://github.com/sqlmapproject/sqlmap/wiki/FAQ
|
* Các câu hỏi thường gặp (FAQ): https://github.com/sqlmapproject/sqlmap/wiki/FAQ
|
||||||
|
|||||||
@@ -404,8 +404,8 @@ def checkSqlInjection(place, parameter, value):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# Parse boundary's <prefix>, <suffix> and <ptype>
|
# Parse boundary's <prefix>, <suffix> and <ptype>
|
||||||
prefix = boundary.prefix if boundary.prefix else ""
|
prefix = boundary.prefix or ""
|
||||||
suffix = boundary.suffix if boundary.suffix else ""
|
suffix = boundary.suffix or ""
|
||||||
ptype = boundary.ptype
|
ptype = boundary.ptype
|
||||||
|
|
||||||
# Options --prefix/--suffix have a higher priority (if set by user)
|
# Options --prefix/--suffix have a higher priority (if set by user)
|
||||||
@@ -642,7 +642,7 @@ def checkSqlInjection(place, parameter, value):
|
|||||||
output = output or extractRegexResult(check, threadData.lastRedirectMsg[1] if threadData.lastRedirectMsg and threadData.lastRedirectMsg[0] == threadData.lastRequestUID else None, re.DOTALL | re.IGNORECASE)
|
output = output or extractRegexResult(check, threadData.lastRedirectMsg[1] if threadData.lastRedirectMsg and threadData.lastRedirectMsg[0] == threadData.lastRequestUID else None, re.DOTALL | re.IGNORECASE)
|
||||||
|
|
||||||
if output:
|
if output:
|
||||||
result = output == "1"
|
result = output == '1'
|
||||||
|
|
||||||
if result:
|
if result:
|
||||||
infoMsg = "%sparameter '%s' is '%s' injectable " % ("%s " % paramType if paramType != parameter else "", parameter, title)
|
infoMsg = "%sparameter '%s' is '%s' injectable " % ("%s " % paramType if paramType != parameter else "", parameter, title)
|
||||||
|
|||||||
@@ -22,7 +22,10 @@ from lib.core.exception import SqlmapSystemException
|
|||||||
from lib.core.settings import BIGARRAY_CHUNK_SIZE
|
from lib.core.settings import BIGARRAY_CHUNK_SIZE
|
||||||
from lib.core.settings import BIGARRAY_COMPRESS_LEVEL
|
from lib.core.settings import BIGARRAY_COMPRESS_LEVEL
|
||||||
|
|
||||||
|
try:
|
||||||
DEFAULT_SIZE_OF = sys.getsizeof(object())
|
DEFAULT_SIZE_OF = sys.getsizeof(object())
|
||||||
|
except TypeError:
|
||||||
|
DEFAULT_SIZE_OF = 16
|
||||||
|
|
||||||
def _size_of(instance):
|
def _size_of(instance):
|
||||||
"""
|
"""
|
||||||
@@ -56,6 +59,12 @@ class BigArray(list):
|
|||||||
>>> _[20] = 0
|
>>> _[20] = 0
|
||||||
>>> _[99999]
|
>>> _[99999]
|
||||||
99999
|
99999
|
||||||
|
>>> _ += [0]
|
||||||
|
>>> _[100000]
|
||||||
|
0
|
||||||
|
>>> _ = _ + [1]
|
||||||
|
>>> _[-1]
|
||||||
|
1
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, items=None):
|
def __init__(self, items=None):
|
||||||
@@ -69,6 +78,20 @@ class BigArray(list):
|
|||||||
for item in (items or []):
|
for item in (items or []):
|
||||||
self.append(item)
|
self.append(item)
|
||||||
|
|
||||||
|
def __add__(self, value):
|
||||||
|
retval = BigArray(self)
|
||||||
|
|
||||||
|
for _ in value:
|
||||||
|
retval.append(_)
|
||||||
|
|
||||||
|
return retval
|
||||||
|
|
||||||
|
def __iadd__(self, value):
|
||||||
|
for _ in value:
|
||||||
|
self.append(_)
|
||||||
|
|
||||||
|
return self
|
||||||
|
|
||||||
def append(self, value):
|
def append(self, value):
|
||||||
self.chunks[-1].append(value)
|
self.chunks[-1].append(value)
|
||||||
|
|
||||||
@@ -145,7 +168,7 @@ class BigArray(list):
|
|||||||
self.chunks, self.filenames = state
|
self.chunks, self.filenames = state
|
||||||
|
|
||||||
def __getitem__(self, y):
|
def __getitem__(self, y):
|
||||||
if y < 0:
|
while y < 0:
|
||||||
y += len(self)
|
y += len(self)
|
||||||
|
|
||||||
index = y // self.chunk_length
|
index = y // self.chunk_length
|
||||||
|
|||||||
@@ -2270,6 +2270,7 @@ def isMultiThreadMode():
|
|||||||
"""
|
"""
|
||||||
Checks if running in multi-thread(ing) mode
|
Checks if running in multi-thread(ing) mode
|
||||||
|
|
||||||
|
>>> import time
|
||||||
>>> isMultiThreadMode()
|
>>> isMultiThreadMode()
|
||||||
False
|
False
|
||||||
>>> _ = lambda: time.sleep(0.1)
|
>>> _ = lambda: time.sleep(0.1)
|
||||||
@@ -2707,7 +2708,14 @@ def popValue():
|
|||||||
'foobar'
|
'foobar'
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return getCurrentThreadData().valueStack.pop()
|
retVal = None
|
||||||
|
|
||||||
|
try:
|
||||||
|
retVal = getCurrentThreadData().valueStack.pop()
|
||||||
|
except IndexError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
return retVal
|
||||||
|
|
||||||
def wasLastResponseDBMSError():
|
def wasLastResponseDBMSError():
|
||||||
"""
|
"""
|
||||||
@@ -5249,7 +5257,7 @@ def parseRequestFile(reqFile, checkParams=True):
|
|||||||
if "HTTP/" not in request:
|
if "HTTP/" not in request:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if re.search(r"^[\n]*%s.*?\.(%s)\sHTTP\/" % (HTTPMETHOD.GET, "|".join(CRAWL_EXCLUDE_EXTENSIONS)), request, re.I | re.M):
|
if re.search(r"^[\n]*%s[^?]*?\.(%s)\sHTTP\/" % (HTTPMETHOD.GET, "|".join(CRAWL_EXCLUDE_EXTENSIONS)), request, re.I | re.M):
|
||||||
if not re.search(r"^[\n]*%s[^\n]*\*[^\n]*\sHTTP\/" % HTTPMETHOD.GET, request, re.I | re.M):
|
if not re.search(r"^[\n]*%s[^\n]*\*[^\n]*\sHTTP\/" % HTTPMETHOD.GET, request, re.I | re.M):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
@@ -370,10 +370,10 @@ OBSOLETE_OPTIONS = {
|
|||||||
"--check-payload": None,
|
"--check-payload": None,
|
||||||
"--check-waf": None,
|
"--check-waf": None,
|
||||||
"--pickled-options": "use '--api -c ...' instead",
|
"--pickled-options": "use '--api -c ...' instead",
|
||||||
|
"--identify-waf": "functionality being done automatically",
|
||||||
}
|
}
|
||||||
|
|
||||||
DEPRECATED_OPTIONS = {
|
DEPRECATED_OPTIONS = {
|
||||||
"--identify-waf": "functionality being done automatically",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DUMP_DATA_PREPROCESS = {
|
DUMP_DATA_PREPROCESS = {
|
||||||
|
|||||||
@@ -16,9 +16,11 @@ from lib.core.common import Backend
|
|||||||
from lib.core.common import checkFile
|
from lib.core.common import checkFile
|
||||||
from lib.core.common import dataToDumpFile
|
from lib.core.common import dataToDumpFile
|
||||||
from lib.core.common import dataToStdout
|
from lib.core.common import dataToStdout
|
||||||
|
from lib.core.common import filterNone
|
||||||
from lib.core.common import getSafeExString
|
from lib.core.common import getSafeExString
|
||||||
from lib.core.common import isListLike
|
from lib.core.common import isListLike
|
||||||
from lib.core.common import isMultiThreadMode
|
from lib.core.common import isMultiThreadMode
|
||||||
|
from lib.core.common import isNoneValue
|
||||||
from lib.core.common import normalizeUnicode
|
from lib.core.common import normalizeUnicode
|
||||||
from lib.core.common import openFile
|
from lib.core.common import openFile
|
||||||
from lib.core.common import prioritySortColumns
|
from lib.core.common import prioritySortColumns
|
||||||
@@ -200,9 +202,9 @@ class Dump(object):
|
|||||||
self._write("%s:" % header)
|
self._write("%s:" % header)
|
||||||
|
|
||||||
for user in users:
|
for user in users:
|
||||||
settings = userSettings[user]
|
settings = filterNone(userSettings[user])
|
||||||
|
|
||||||
if settings is None:
|
if isNoneValue(settings):
|
||||||
stringSettings = ""
|
stringSettings = ""
|
||||||
else:
|
else:
|
||||||
stringSettings = " [%d]:" % len(settings)
|
stringSettings = " [%d]:" % len(settings)
|
||||||
@@ -609,7 +611,7 @@ class Dump(object):
|
|||||||
_ = safechardecode(value, True)
|
_ = safechardecode(value, True)
|
||||||
f.write(_)
|
f.write(_)
|
||||||
|
|
||||||
except magic.MagicException as ex:
|
except Exception as ex:
|
||||||
logger.debug(getSafeExString(ex))
|
logger.debug(getSafeExString(ex))
|
||||||
|
|
||||||
if conf.dumpFormat == DUMP_FORMAT.CSV:
|
if conf.dumpFormat == DUMP_FORMAT.CSV:
|
||||||
|
|||||||
@@ -201,16 +201,16 @@ class HASH(object):
|
|||||||
# Reference: http://www.zytrax.com/tech/web/mobile_ids.html
|
# Reference: http://www.zytrax.com/tech/web/mobile_ids.html
|
||||||
class MOBILES(object):
|
class MOBILES(object):
|
||||||
BLACKBERRY = ("BlackBerry Z10", "Mozilla/5.0 (BB10; Kbd) AppleWebKit/537.35+ (KHTML, like Gecko) Version/10.3.3.2205 Mobile Safari/537.35+")
|
BLACKBERRY = ("BlackBerry Z10", "Mozilla/5.0 (BB10; Kbd) AppleWebKit/537.35+ (KHTML, like Gecko) Version/10.3.3.2205 Mobile Safari/537.35+")
|
||||||
GALAXY = ("Samsung Galaxy S7", "Mozilla/5.0 (Linux; Android 7.0; SM-G930V Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.125 Mobile Safari/537.36")
|
GALAXY = ("Samsung Galaxy S8", "Mozilla/5.0 (Linux; Android 8.0.0; SM-G955U Build/R16NW; en-us) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.136 Mobile Safari/537.36 Puffin/9.0.0.50263AP")
|
||||||
HP = ("HP iPAQ 6365", "Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320; HP iPAQ h6300)")
|
HP = ("HP iPAQ 6365", "Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320; HP iPAQ h6300)")
|
||||||
HTC = ("HTC 10", "Mozilla/5.0 (Linux; Android 8.0.0; HTC 10 Build/OPR1.170623.027) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36")
|
HTC = ("HTC 10", "Mozilla/5.0 (Linux; Android 8.0.0; HTC 10 Build/OPR1.170623.027) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36")
|
||||||
HUAWEI = ("Huawei P8", "Mozilla/5.0 (Linux; Android 4.4.4; HUAWEI H891L Build/HuaweiH891L) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/33.0.0.0 Mobile Safari/537.36")
|
HUAWEI = ("Huawei P8", "Mozilla/5.0 (Linux; Android 4.4.4; HUAWEI H891L Build/HuaweiH891L) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/33.0.0.0 Mobile Safari/537.36")
|
||||||
IPHONE = ("Apple iPhone 8", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1")
|
IPHONE = ("Apple iPhone 8", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1")
|
||||||
LUMIA = ("Microsoft Lumia 950", "Mozilla/5.0 (Windows Phone 10.0; Android 6.0.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Mobile Safari/537.36 Edge/15.14977")
|
LUMIA = ("Microsoft Lumia 950", "Mozilla/5.0 (Windows Phone 10.0; Android 6.0.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Mobile Safari/537.36 Edge/15.15063")
|
||||||
NEXUS = ("Google Nexus 7", "Mozilla/5.0 (Linux; Android 4.1.1; Nexus 7 Build/JRO03D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19")
|
NEXUS = ("Google Nexus 7", "Mozilla/5.0 (Linux; Android 4.1.1; Nexus 7 Build/JRO03D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19")
|
||||||
NOKIA = ("Nokia N97", "Mozilla/5.0 (SymbianOS/9.4; Series60/5.0 NokiaN97-1/10.0.012; Profile/MIDP-2.1 Configuration/CLDC-1.1; en-us) AppleWebKit/525 (KHTML, like Gecko) WicKed/7.1.12344")
|
NOKIA = ("Nokia N97", "Mozilla/5.0 (SymbianOS/9.4; Series60/5.0 NokiaN97-1/10.0.012; Profile/MIDP-2.1 Configuration/CLDC-1.1; en-us) AppleWebKit/525 (KHTML, like Gecko) WicKed/7.1.12344")
|
||||||
PIXEL = ("Google Pixel", "Mozilla/5.0 (Linux; Android 8.0.0; Pixel Build/OPR3.170623.013) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.111 Mobile Safari/537.36")
|
PIXEL = ("Google Pixel", "Mozilla/5.0 (Linux; Android 10; Pixel) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.117 Mobile Safari/537.36")
|
||||||
XIAOMI = ("Xiaomi Mi 3", "Mozilla/5.0 (Linux; U; Android 4.4.4; en-gb; MI 3W Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/39.0.0.0 Mobile Safari/537.36 XiaoMi/MiuiBrowser/2.1.1")
|
XIAOMI = ("Xiaomi Mi 8 Pro", "Mozilla/5.0 (Linux; Android 9; MI 8 Pro Build/PKQ1.180729.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/87.0.4280.66 Mobile Safari/537.36")
|
||||||
|
|
||||||
class PROXY_TYPE(object):
|
class PROXY_TYPE(object):
|
||||||
HTTP = "HTTP"
|
HTTP = "HTTP"
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import random
|
|||||||
import re
|
import re
|
||||||
import string
|
import string
|
||||||
import sys
|
import sys
|
||||||
|
import time
|
||||||
|
|
||||||
from lib.core.enums import DBMS
|
from lib.core.enums import DBMS
|
||||||
from lib.core.enums import DBMS_DIRECTORY_NAME
|
from lib.core.enums import DBMS_DIRECTORY_NAME
|
||||||
@@ -18,7 +19,7 @@ from lib.core.enums import OS
|
|||||||
from thirdparty.six import unichr as _unichr
|
from thirdparty.six import unichr as _unichr
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.5.4.0"
|
VERSION = "1.5.6.0"
|
||||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||||
@@ -105,7 +106,7 @@ FUZZ_UNION_ERROR_REGEX = r"(?i)data\s?type|comparable|compatible|conversion|conv
|
|||||||
FUZZ_UNION_MAX_COLUMNS = 10
|
FUZZ_UNION_MAX_COLUMNS = 10
|
||||||
|
|
||||||
# Regular expression used for recognition of generic maximum connection messages
|
# Regular expression used for recognition of generic maximum connection messages
|
||||||
MAX_CONNECTIONS_REGEX = r"\bmax.+?\bconnection"
|
MAX_CONNECTIONS_REGEX = r"\bmax.{1,100}\bconnection"
|
||||||
|
|
||||||
# Maximum consecutive connection errors before asking the user if he wants to continue
|
# Maximum consecutive connection errors before asking the user if he wants to continue
|
||||||
MAX_CONSECUTIVE_CONNECTION_ERRORS = 15
|
MAX_CONSECUTIVE_CONNECTION_ERRORS = 15
|
||||||
@@ -125,6 +126,9 @@ MAX_MURPHY_SLEEP_TIME = 3
|
|||||||
# Regular expression used for extracting results from Google search
|
# Regular expression used for extracting results from Google search
|
||||||
GOOGLE_REGEX = r"webcache\.googleusercontent\.com/search\?q=cache:[^:]+:([^+]+)\+&cd=|url\?\w+=((?![^>]+webcache\.googleusercontent\.com)http[^>]+)&(sa=U|rct=j)"
|
GOOGLE_REGEX = r"webcache\.googleusercontent\.com/search\?q=cache:[^:]+:([^+]+)\+&cd=|url\?\w+=((?![^>]+webcache\.googleusercontent\.com)http[^>]+)&(sa=U|rct=j)"
|
||||||
|
|
||||||
|
# Google Search consent cookie
|
||||||
|
GOOGLE_CONSENT_COOKIE = "CONSENT=YES+shp.gws-%s-0-RC1.%s+FX+740" % (time.strftime("%Y%m%d"), "".join(random.sample(string.ascii_lowercase, 2)))
|
||||||
|
|
||||||
# Regular expression used for extracting results from DuckDuckGo search
|
# Regular expression used for extracting results from DuckDuckGo search
|
||||||
DUCKDUCKGO_REGEX = r'<a class="result__url" href="(htt[^"]+)'
|
DUCKDUCKGO_REGEX = r'<a class="result__url" href="(htt[^"]+)'
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ from lib.core.common import extractRegexResult
|
|||||||
from lib.core.common import getFilteredPageContent
|
from lib.core.common import getFilteredPageContent
|
||||||
from lib.core.common import listToStrValue
|
from lib.core.common import listToStrValue
|
||||||
from lib.core.common import removeDynamicContent
|
from lib.core.common import removeDynamicContent
|
||||||
|
from lib.core.common import getLastRequestHTTPError
|
||||||
from lib.core.common import wasLastResponseDBMSError
|
from lib.core.common import wasLastResponseDBMSError
|
||||||
from lib.core.common import wasLastResponseHTTPError
|
from lib.core.common import wasLastResponseHTTPError
|
||||||
from lib.core.convert import getBytes
|
from lib.core.convert import getBytes
|
||||||
@@ -91,6 +92,7 @@ def _comparison(page, headers, code, getRatioValue, pageLength):
|
|||||||
if page:
|
if page:
|
||||||
# In case of an DBMS error page return None
|
# In case of an DBMS error page return None
|
||||||
if kb.errorIsNone and (wasLastResponseDBMSError() or wasLastResponseHTTPError()) and not kb.negativeLogic:
|
if kb.errorIsNone and (wasLastResponseDBMSError() or wasLastResponseHTTPError()) and not kb.negativeLogic:
|
||||||
|
if not (wasLastResponseHTTPError() and getLastRequestHTTPError() in (conf.ignoreCode or [])):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# Dynamic content lines to be excluded before comparison
|
# Dynamic content lines to be excluded before comparison
|
||||||
|
|||||||
@@ -68,8 +68,8 @@ class DNSServer(object):
|
|||||||
raw request
|
raw request
|
||||||
|
|
||||||
Reference(s):
|
Reference(s):
|
||||||
http://code.activestate.com/recipes/491264-mini-fake-dns-server/
|
https://code.activestate.com/recipes/491264-mini-fake-dns-server/
|
||||||
https://code.google.com/p/marlon-tools/source/browse/tools/dnsproxy/dnsproxy.py
|
https://web.archive.org/web/20150418152405/https://code.google.com/p/marlon-tools/source/browse/tools/dnsproxy/dnsproxy.py
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ from lib.core.common import goGoodSamaritan
|
|||||||
from lib.core.common import hashDBRetrieve
|
from lib.core.common import hashDBRetrieve
|
||||||
from lib.core.common import hashDBWrite
|
from lib.core.common import hashDBWrite
|
||||||
from lib.core.common import incrementCounter
|
from lib.core.common import incrementCounter
|
||||||
|
from lib.core.common import isListLike
|
||||||
from lib.core.common import safeStringFormat
|
from lib.core.common import safeStringFormat
|
||||||
from lib.core.common import singleTimeWarnMessage
|
from lib.core.common import singleTimeWarnMessage
|
||||||
from lib.core.data import conf
|
from lib.core.data import conf
|
||||||
@@ -504,6 +505,10 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
|||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
# NOTE: https://github.com/sqlmapproject/sqlmap/issues/4629
|
||||||
|
if not isListLike(threadData.shared.value):
|
||||||
|
break
|
||||||
|
|
||||||
with kb.locks.value:
|
with kb.locks.value:
|
||||||
threadData.shared.value[currentCharIndex - 1 - firstChar] = val
|
threadData.shared.value[currentCharIndex - 1 - firstChar] = val
|
||||||
currentValue = list(threadData.shared.value)
|
currentValue = list(threadData.shared.value)
|
||||||
|
|||||||
@@ -351,7 +351,7 @@ def crypt_generic_passwd(password, salt, **kwargs):
|
|||||||
'rl.3StKT.4T8M'
|
'rl.3StKT.4T8M'
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return crypt(password, salt)
|
return getText(crypt(password, salt))
|
||||||
|
|
||||||
def unix_md5_passwd(password, salt, magic="$1$", **kwargs):
|
def unix_md5_passwd(password, salt, magic="$1$", **kwargs):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ from lib.core.exception import SqlmapUserQuitException
|
|||||||
from lib.core.settings import BING_REGEX
|
from lib.core.settings import BING_REGEX
|
||||||
from lib.core.settings import DUCKDUCKGO_REGEX
|
from lib.core.settings import DUCKDUCKGO_REGEX
|
||||||
from lib.core.settings import DUMMY_SEARCH_USER_AGENT
|
from lib.core.settings import DUMMY_SEARCH_USER_AGENT
|
||||||
|
from lib.core.settings import GOOGLE_CONSENT_COOKIE
|
||||||
from lib.core.settings import GOOGLE_REGEX
|
from lib.core.settings import GOOGLE_REGEX
|
||||||
from lib.core.settings import HTTP_ACCEPT_ENCODING_HEADER_VALUE
|
from lib.core.settings import HTTP_ACCEPT_ENCODING_HEADER_VALUE
|
||||||
from lib.core.settings import UNICODE_ENCODING
|
from lib.core.settings import UNICODE_ENCODING
|
||||||
@@ -52,6 +53,7 @@ def _search(dork):
|
|||||||
|
|
||||||
requestHeaders[HTTP_HEADER.USER_AGENT] = dict(conf.httpHeaders).get(HTTP_HEADER.USER_AGENT, DUMMY_SEARCH_USER_AGENT)
|
requestHeaders[HTTP_HEADER.USER_AGENT] = dict(conf.httpHeaders).get(HTTP_HEADER.USER_AGENT, DUMMY_SEARCH_USER_AGENT)
|
||||||
requestHeaders[HTTP_HEADER.ACCEPT_ENCODING] = HTTP_ACCEPT_ENCODING_HEADER_VALUE
|
requestHeaders[HTTP_HEADER.ACCEPT_ENCODING] = HTTP_ACCEPT_ENCODING_HEADER_VALUE
|
||||||
|
requestHeaders[HTTP_HEADER.COOKIE] = GOOGLE_CONSENT_COOKIE
|
||||||
|
|
||||||
try:
|
try:
|
||||||
req = _urllib.request.Request("https://www.google.com/ncr", headers=requestHeaders)
|
req = _urllib.request.Request("https://www.google.com/ncr", headers=requestHeaders)
|
||||||
@@ -63,7 +65,7 @@ def _search(dork):
|
|||||||
gpage = conf.googlePage if conf.googlePage > 1 else 1
|
gpage = conf.googlePage if conf.googlePage > 1 else 1
|
||||||
logger.info("using search result page #%d" % gpage)
|
logger.info("using search result page #%d" % gpage)
|
||||||
|
|
||||||
url = "https://www.google.com/search?"
|
url = "https://www.google.com/search?" # NOTE: if consent fails, try to use the "http://"
|
||||||
url += "q=%s&" % urlencode(dork, convall=True)
|
url += "q=%s&" % urlencode(dork, convall=True)
|
||||||
url += "num=100&hl=en&complete=0&safe=off&filter=0&btnG=Search"
|
url += "num=100&hl=en&complete=0&safe=off&filter=0&btnG=Search"
|
||||||
url += "&start=%d" % ((gpage - 1) * 100)
|
url += "&start=%d" % ((gpage - 1) * 100)
|
||||||
|
|||||||
@@ -22,9 +22,8 @@ from plugins.generic.connector import Connector as GenericConnector
|
|||||||
|
|
||||||
class Connector(GenericConnector):
|
class Connector(GenericConnector):
|
||||||
"""
|
"""
|
||||||
Homepage: http://pyodbc.googlecode.com/
|
Homepage: https://github.com/mkleehammer/pyodbc
|
||||||
User guide: http://code.google.com/p/pyodbc/wiki/GettingStarted
|
User guide: https://github.com/mkleehammer/pyodbc/wiki
|
||||||
API: http://code.google.com/p/pyodbc/w/list
|
|
||||||
Debian package: python-pyodbc
|
Debian package: python-pyodbc
|
||||||
License: MIT
|
License: MIT
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class Syntax(GenericSyntax):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def escape(expression, quote=True):
|
def escape(expression, quote=True):
|
||||||
"""
|
"""
|
||||||
>>> Syntax.escape("SELECT 'abcdefgh' FROM foobar") == u"SELECT 'abcdefgh' FROM foobar"
|
>>> Syntax.escape("SELECT 'abcdefgh' FROM foobar") == "SELECT 'abcdefgh' FROM foobar"
|
||||||
True
|
True
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class Syntax(GenericSyntax):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def escape(expression, quote=True):
|
def escape(expression, quote=True):
|
||||||
"""
|
"""
|
||||||
>>> Syntax.escape("SELECT 'abcdefgh' FROM foobar") == u"SELECT 'abcdefgh' FROM foobar"
|
>>> Syntax.escape("SELECT 'abcdefgh' FROM foobar") == "SELECT 'abcdefgh' FROM foobar"
|
||||||
True
|
True
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class Syntax(GenericSyntax):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def escape(expression, quote=True):
|
def escape(expression, quote=True):
|
||||||
"""
|
"""
|
||||||
>>> Syntax.escape("SELECT 'abcdefgh' FROM foobar") == u"SELECT 'abcdefgh' FROM foobar"
|
>>> Syntax.escape("SELECT 'abcdefgh' FROM foobar") == "SELECT 'abcdefgh' FROM foobar"
|
||||||
True
|
True
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class Syntax(GenericSyntax):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def escape(expression, quote=True):
|
def escape(expression, quote=True):
|
||||||
"""
|
"""
|
||||||
>>> Syntax.escape("SELECT 'abcdefgh' FROM foobar") == u"SELECT 'abcdefgh' FROM foobar"
|
>>> Syntax.escape("SELECT 'abcdefgh' FROM foobar") == "SELECT 'abcdefgh' FROM foobar"
|
||||||
True
|
True
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class Syntax(GenericSyntax):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def escape(expression, quote=True):
|
def escape(expression, quote=True):
|
||||||
"""
|
"""
|
||||||
>>> Syntax.escape("SELECT 'abcdefgh' FROM foobar") == u"SELECT 'abcdefgh' FROM foobar"
|
>>> Syntax.escape("SELECT 'abcdefgh' FROM foobar") == "SELECT 'abcdefgh' FROM foobar"
|
||||||
True
|
True
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class Syntax(GenericSyntax):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def escape(expression, quote=True):
|
def escape(expression, quote=True):
|
||||||
"""
|
"""
|
||||||
>>> Syntax.escape("SELECT 'abcdefgh' FROM foobar") == u"SELECT 'abcdefgh' FROM foobar"
|
>>> Syntax.escape("SELECT 'abcdefgh' FROM foobar") == "SELECT 'abcdefgh' FROM foobar"
|
||||||
True
|
True
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -21,10 +21,9 @@ from plugins.generic.connector import Connector as GenericConnector
|
|||||||
|
|
||||||
class Connector(GenericConnector):
|
class Connector(GenericConnector):
|
||||||
"""
|
"""
|
||||||
Homepage: http://code.google.com/p/pymysql/
|
Homepage: https://github.com/PyMySQL/PyMySQL
|
||||||
User guide: http://code.google.com/p/pymysql/
|
User guide: https://pymysql.readthedocs.io/en/latest/
|
||||||
API: http://code.google.com/p/pymysql/
|
Debian package: python3-pymysql
|
||||||
Debian package: <none>
|
|
||||||
License: MIT
|
License: MIT
|
||||||
|
|
||||||
Possible connectors: http://wiki.python.org/moin/MySQL
|
Possible connectors: http://wiki.python.org/moin/MySQL
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ class Fingerprint(GenericFingerprint):
|
|||||||
# Reference: https://dev.mysql.com/doc/relnotes/mysql/<major>.<minor>/en/
|
# Reference: https://dev.mysql.com/doc/relnotes/mysql/<major>.<minor>/en/
|
||||||
|
|
||||||
versions = (
|
versions = (
|
||||||
(80000, 80021), # MySQL 8.0
|
(80000, 80028), # MySQL 8.0
|
||||||
(60000, 60014), # MySQL 6.0
|
(60000, 60014), # MySQL 6.0
|
||||||
(50700, 50731), # MySQL 5.7
|
(50700, 50736), # MySQL 5.7
|
||||||
(50600, 50649), # MySQL 5.6
|
(50600, 50652), # MySQL 5.6
|
||||||
(50500, 50563), # MySQL 5.5
|
(50500, 50563), # MySQL 5.5
|
||||||
(50400, 50404), # MySQL 5.4
|
(50400, 50404), # MySQL 5.4
|
||||||
(50100, 50174), # MySQL 5.1
|
(50100, 50174), # MySQL 5.1
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ class Fingerprint(GenericFingerprint):
|
|||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
# Reference: https://en.wikipedia.org/wiki/Oracle_Database
|
# Reference: https://en.wikipedia.org/wiki/Oracle_Database
|
||||||
for version in ("19c", "18c", "12c", "11g", "10g", "9i", "8i", "7"):
|
for version in ("21c", "19c", "18c", "12c", "11g", "10g", "9i", "8i", "7"):
|
||||||
number = int(re.search(r"([\d]+)", version).group(1))
|
number = int(re.search(r"([\d]+)", version).group(1))
|
||||||
output = inject.checkBooleanExpression("%d=(SELECT SUBSTR((VERSION),1,%d) FROM SYS.PRODUCT_COMPONENT_VERSION WHERE ROWNUM=1)" % (number, 1 if number < 10 else 2))
|
output = inject.checkBooleanExpression("%d=(SELECT SUBSTR((VERSION),1,%d) FROM SYS.PRODUCT_COMPONENT_VERSION WHERE ROWNUM=1)" % (number, 1 if number < 10 else 2))
|
||||||
|
|
||||||
|
|||||||
@@ -131,7 +131,9 @@ class Fingerprint(GenericFingerprint):
|
|||||||
infoMsg = "actively fingerprinting %s" % DBMS.PGSQL
|
infoMsg = "actively fingerprinting %s" % DBMS.PGSQL
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
if inject.checkBooleanExpression("SINH(0)=0"):
|
if inject.checkBooleanExpression("GEN_RANDOM_UUID() IS NOT NULL"):
|
||||||
|
Backend.setVersion(">= 13.0")
|
||||||
|
elif inject.checkBooleanExpression("SINH(0)=0"):
|
||||||
Backend.setVersion(">= 12.0")
|
Backend.setVersion(">= 12.0")
|
||||||
elif inject.checkBooleanExpression("SHA256(NULL) IS NULL"):
|
elif inject.checkBooleanExpression("SHA256(NULL) IS NULL"):
|
||||||
Backend.setVersion(">= 11.0")
|
Backend.setVersion(">= 11.0")
|
||||||
|
|||||||
@@ -5,35 +5,18 @@ Copyright (c) 2006-2021 sqlmap developers (http://sqlmap.org/)
|
|||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import binascii
|
from lib.core.convert import getOrds
|
||||||
|
|
||||||
from lib.core.common import isDBMSVersionAtLeast
|
|
||||||
from lib.core.convert import getBytes
|
|
||||||
from lib.core.convert import getUnicode
|
|
||||||
from plugins.generic.syntax import Syntax as GenericSyntax
|
from plugins.generic.syntax import Syntax as GenericSyntax
|
||||||
|
|
||||||
class Syntax(GenericSyntax):
|
class Syntax(GenericSyntax):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def escape(expression, quote=True):
|
def escape(expression, quote=True):
|
||||||
"""
|
"""
|
||||||
>>> from lib.core.common import Backend
|
>>> Syntax.escape("SELECT 'abcdefgh' FROM foobar") == "SELECT CHAR(97,98,99,100,101,102,103,104) FROM foobar"
|
||||||
>>> Backend.setVersion('2')
|
|
||||||
['2']
|
|
||||||
>>> Syntax.escape("SELECT 'abcdefgh' FROM foobar") == "SELECT 'abcdefgh' FROM foobar"
|
|
||||||
True
|
|
||||||
>>> Backend.setVersion('3')
|
|
||||||
['3']
|
|
||||||
>>> Syntax.escape("SELECT 'abcdefgh' FROM foobar") == "SELECT CAST(X'6162636465666768' AS TEXT) FROM foobar"
|
|
||||||
True
|
True
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def escaper(value):
|
def escaper(value):
|
||||||
# Reference: http://stackoverflow.com/questions/3444335/how-do-i-quote-a-utf-8-string-literal-in-sqlite3
|
return "CHAR(%s)" % ','.join("%d" % _ for _ in getOrds(value))
|
||||||
return "CAST(X'%s' AS TEXT)" % getUnicode(binascii.hexlify(getBytes(value)))
|
|
||||||
|
|
||||||
retVal = expression
|
return Syntax._escape(expression, quote, escaper)
|
||||||
|
|
||||||
if isDBMSVersionAtLeast('3'):
|
|
||||||
retVal = Syntax._escape(expression, quote, escaper)
|
|
||||||
|
|
||||||
return retVal
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ class Entries(object):
|
|||||||
singleTimeLogMessage(infoMsg)
|
singleTimeLogMessage(infoMsg)
|
||||||
return
|
return
|
||||||
|
|
||||||
conf.db = safeSQLIdentificatorNaming(conf.db)
|
conf.db = safeSQLIdentificatorNaming(conf.db) or ""
|
||||||
|
|
||||||
if conf.tbl:
|
if conf.tbl:
|
||||||
if Backend.getIdentifiedDbms() in UPPER_CASE_DBMSES:
|
if Backend.getIdentifiedDbms() in UPPER_CASE_DBMSES:
|
||||||
@@ -101,7 +101,7 @@ class Entries(object):
|
|||||||
|
|
||||||
if tblList and isListLike(tblList[0]):
|
if tblList and isListLike(tblList[0]):
|
||||||
tblList = tblList[0]
|
tblList = tblList[0]
|
||||||
elif not conf.search:
|
elif conf.db and not conf.search:
|
||||||
errMsg = "unable to retrieve the tables "
|
errMsg = "unable to retrieve the tables "
|
||||||
errMsg += "in database '%s'" % unsafeSQLIdentificatorNaming(conf.db)
|
errMsg += "in database '%s'" % unsafeSQLIdentificatorNaming(conf.db)
|
||||||
raise SqlmapNoneDataException(errMsg)
|
raise SqlmapNoneDataException(errMsg)
|
||||||
@@ -190,7 +190,7 @@ class Entries(object):
|
|||||||
elif Backend.getIdentifiedDbms() in (DBMS.SYBASE, DBMS.MSSQL):
|
elif Backend.getIdentifiedDbms() in (DBMS.SYBASE, DBMS.MSSQL):
|
||||||
# Partial inband and error
|
# Partial inband and error
|
||||||
if not (isTechniqueAvailable(PAYLOAD.TECHNIQUE.UNION) and kb.injection.data[PAYLOAD.TECHNIQUE.UNION].where == PAYLOAD.WHERE.ORIGINAL):
|
if not (isTechniqueAvailable(PAYLOAD.TECHNIQUE.UNION) and kb.injection.data[PAYLOAD.TECHNIQUE.UNION].where == PAYLOAD.WHERE.ORIGINAL):
|
||||||
table = "%s.%s" % (conf.db, tbl)
|
table = "%s.%s" % (conf.db, tbl) if conf.db else tbl
|
||||||
|
|
||||||
if Backend.isDbms(DBMS.MSSQL) and not conf.forcePivoting:
|
if Backend.isDbms(DBMS.MSSQL) and not conf.forcePivoting:
|
||||||
warnMsg = "in case of table dumping problems (e.g. column entry order) "
|
warnMsg = "in case of table dumping problems (e.g. column entry order) "
|
||||||
@@ -297,7 +297,7 @@ class Entries(object):
|
|||||||
elif Backend.getIdentifiedDbms() in (DBMS.SQLITE, DBMS.MAXDB, DBMS.ACCESS, DBMS.FIREBIRD, DBMS.MCKOI, DBMS.EXTREMEDB, DBMS.RAIMA):
|
elif Backend.getIdentifiedDbms() in (DBMS.SQLITE, DBMS.MAXDB, DBMS.ACCESS, DBMS.FIREBIRD, DBMS.MCKOI, DBMS.EXTREMEDB, DBMS.RAIMA):
|
||||||
query = rootQuery.blind.count % tbl
|
query = rootQuery.blind.count % tbl
|
||||||
elif Backend.getIdentifiedDbms() in (DBMS.SYBASE, DBMS.MSSQL):
|
elif Backend.getIdentifiedDbms() in (DBMS.SYBASE, DBMS.MSSQL):
|
||||||
query = rootQuery.blind.count % ("%s.%s" % (conf.db, tbl))
|
query = rootQuery.blind.count % ("%s.%s" % (conf.db, tbl)) if conf.db else tbl
|
||||||
elif Backend.isDbms(DBMS.INFORMIX):
|
elif Backend.isDbms(DBMS.INFORMIX):
|
||||||
query = rootQuery.blind.count % (conf.db, tbl)
|
query = rootQuery.blind.count % (conf.db, tbl)
|
||||||
else:
|
else:
|
||||||
@@ -334,9 +334,9 @@ class Entries(object):
|
|||||||
if Backend.getIdentifiedDbms() in (DBMS.ACCESS, DBMS.MCKOI, DBMS.RAIMA):
|
if Backend.getIdentifiedDbms() in (DBMS.ACCESS, DBMS.MCKOI, DBMS.RAIMA):
|
||||||
table = tbl
|
table = tbl
|
||||||
elif Backend.getIdentifiedDbms() in (DBMS.SYBASE, DBMS.MSSQL, DBMS.MAXDB):
|
elif Backend.getIdentifiedDbms() in (DBMS.SYBASE, DBMS.MSSQL, DBMS.MAXDB):
|
||||||
table = "%s.%s" % (conf.db, tbl)
|
table = "%s.%s" % (conf.db, tbl) if conf.db else tbl
|
||||||
elif Backend.isDbms(DBMS.INFORMIX):
|
elif Backend.isDbms(DBMS.INFORMIX):
|
||||||
table = "%s:%s" % (conf.db, tbl)
|
table = "%s:%s" % (conf.db, tbl) if conf.db else tbl
|
||||||
|
|
||||||
if Backend.isDbms(DBMS.MSSQL) and not conf.forcePivoting:
|
if Backend.isDbms(DBMS.MSSQL) and not conf.forcePivoting:
|
||||||
warnMsg = "in case of table dumping problems (e.g. column entry order) "
|
warnMsg = "in case of table dumping problems (e.g. column entry order) "
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ class Takeover(Abstraction, Metasploit, ICMPsh, Registry):
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
errMsg = "sqlmap requires 'python-impacket' third-party library "
|
errMsg = "sqlmap requires 'python-impacket' third-party library "
|
||||||
errMsg += "in order to run icmpsh master. You can get it at "
|
errMsg += "in order to run icmpsh master. You can get it at "
|
||||||
errMsg += "http://code.google.com/p/impacket/downloads/list"
|
errMsg += "https://github.com/SecureAuthCorp/impacket"
|
||||||
raise SqlmapMissingDependence(errMsg)
|
raise SqlmapMissingDependence(errMsg)
|
||||||
|
|
||||||
filename = "/proc/sys/net/ipv4/icmp_echo_ignore_all"
|
filename = "/proc/sys/net/ipv4/icmp_echo_ignore_all"
|
||||||
|
|||||||
@@ -386,6 +386,12 @@ def main():
|
|||||||
logger.critical(errMsg)
|
logger.critical(errMsg)
|
||||||
raise SystemExit
|
raise SystemExit
|
||||||
|
|
||||||
|
elif "'WebSocket' object has no attribute 'status'" in excMsg:
|
||||||
|
errMsg = "wrong websocket library detected"
|
||||||
|
errMsg += " (Reference: 'https://github.com/sqlmapproject/sqlmap/issues/4572#issuecomment-775041086')"
|
||||||
|
logger.critical(errMsg)
|
||||||
|
raise SystemExit
|
||||||
|
|
||||||
elif all(_ in excMsg for _ in ("window = tkinter.Tk()",)):
|
elif all(_ in excMsg for _ in ("window = tkinter.Tk()",)):
|
||||||
errMsg = "there has been a problem in initialization of GUI interface "
|
errMsg = "there has been a problem in initialization of GUI interface "
|
||||||
errMsg += "('%s')" % excMsg.strip().split('\n')[-1]
|
errMsg += "('%s')" % excMsg.strip().split('\n')[-1]
|
||||||
|
|||||||
1
thirdparty/ansistrm/ansistrm.py
vendored
1
thirdparty/ansistrm/ansistrm.py
vendored
@@ -4,7 +4,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|||||||
2
thirdparty/beautifulsoup/beautifulsoup.py
vendored
2
thirdparty/beautifulsoup/beautifulsoup.py
vendored
@@ -85,7 +85,6 @@ __copyright__ = "Copyright (c) 2004-2012 Leonard Richardson"
|
|||||||
__license__ = "New-style BSD"
|
__license__ = "New-style BSD"
|
||||||
|
|
||||||
import codecs
|
import codecs
|
||||||
import types
|
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
@@ -2029,6 +2028,5 @@ class UnicodeDammit:
|
|||||||
|
|
||||||
#By default, act as an HTML pretty-printer.
|
#By default, act as an HTML pretty-printer.
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import sys
|
|
||||||
soup = BeautifulSoup(sys.stdin)
|
soup = BeautifulSoup(sys.stdin)
|
||||||
print(soup.prettify())
|
print(soup.prettify())
|
||||||
|
|||||||
2
thirdparty/fcrypt/fcrypt.py
vendored
2
thirdparty/fcrypt/fcrypt.py
vendored
@@ -119,7 +119,7 @@ __all__ = ['crypt']
|
|||||||
# ----- END fcrypt.c LICENSE -----
|
# ----- END fcrypt.c LICENSE -----
|
||||||
|
|
||||||
|
|
||||||
import string, struct, sys
|
import struct, sys
|
||||||
|
|
||||||
if sys.version_info >= (3, 0):
|
if sys.version_info >= (3, 0):
|
||||||
xrange = range
|
xrange = range
|
||||||
|
|||||||
16
thirdparty/identywaf/data.json
vendored
16
thirdparty/identywaf/data.json
vendored
@@ -303,6 +303,12 @@
|
|||||||
"9bf2:RVdXum61OElCWapAYKYPk4JzWOtohM4IiUYMr2RXg1uQJbX2uhdOn9htOj+hX7AB16FcPxJPdLsXo2tKaK99n+i7c4RmkgI2FZjxtDtAeq+c3qA4chS1XKTC"
|
"9bf2:RVdXum61OElCWapAYKYPk4JzWOtohM4IiUYMr2RXg1uQJbX2uhdOn9htOj+hX7AB16FcPxJPdLsXo2tKaK99n+i7c4RmkgI2FZjxtDtAeq+c3qA4chS1XKTC"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"duedge": {
|
||||||
|
"company": "Baidu",
|
||||||
|
"name": "DuEdge",
|
||||||
|
"regex": "(?s)<h1>403<small>.+DuEdge Event ID: [0-9a-f]{16}.+IP: [0-9.]+",
|
||||||
|
"signatures": []
|
||||||
|
},
|
||||||
"expressionengine": {
|
"expressionengine": {
|
||||||
"company": "EllisLab",
|
"company": "EllisLab",
|
||||||
"name": "ExpressionEngine",
|
"name": "ExpressionEngine",
|
||||||
@@ -536,6 +542,12 @@
|
|||||||
"125a:RVdXum61OElCWKpAYKYPk4JzWOtohM4JiUcMr2RXg1uQJbX3uhdOn9htOj+hX7AB16FcPxJPdLsXo2tLaK99n+i7c4VmkwI3FZnxtDtBeq+c36A5chW1XaTC"
|
"125a:RVdXum61OElCWKpAYKYPk4JzWOtohM4JiUcMr2RXg1uQJbX3uhdOn9htOj+hX7AB16FcPxJPdLsXo2tLaK99n+i7c4VmkwI3FZnxtDtBeq+c36A5chW1XaTC"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"openrasp": {
|
||||||
|
"company": "Blackbaud",
|
||||||
|
"name": "OpenRASP",
|
||||||
|
"regex": "400 - Request blocked by OpenRASP|https://rasp.baidu.com/blocked2?/",
|
||||||
|
"signatures": []
|
||||||
|
},
|
||||||
"paloalto": {
|
"paloalto": {
|
||||||
"company": "Palo Alto Networks",
|
"company": "Palo Alto Networks",
|
||||||
"name": "Palo Alto",
|
"name": "Palo Alto",
|
||||||
@@ -749,8 +761,8 @@
|
|||||||
},
|
},
|
||||||
"tencent": {
|
"tencent": {
|
||||||
"company": "Tencent Cloud Computing",
|
"company": "Tencent Cloud Computing",
|
||||||
"name": "Tencent Cloud",
|
"name": "Tencent Cloud|Waterproof Wall",
|
||||||
"regex": "waf\\.tencent-cloud\\.com",
|
"regex": "waf\\.tencent-cloud\\.com|window.location.href=.https://waf.tencent.com/501page.html",
|
||||||
"signatures": [
|
"signatures": [
|
||||||
"3f82:RVZXum60OEhCWapBYKcPk4JzWOpohM4IiUYMr2RXg1uQJbX3uhdOnthtOj+hX7AB16FcPxJPdLsXo2tKaK99nui7c4RmkgI2FZjxtDtAeq+c36A5chW1XaTD"
|
"3f82:RVZXum60OEhCWapBYKcPk4JzWOpohM4IiUYMr2RXg1uQJbX3uhdOnthtOj+hX7AB16FcPxJPdLsXo2tKaK99nui7c4RmkgI2FZjxtDtAeq+c36A5chW1XaTD"
|
||||||
]
|
]
|
||||||
|
|||||||
12
thirdparty/keepalive/keepalive.py
vendored
12
thirdparty/keepalive/keepalive.py
vendored
@@ -165,11 +165,11 @@ class ConnectionManager:
|
|||||||
|
|
||||||
def get_ready_conn(self, host):
|
def get_ready_conn(self, host):
|
||||||
conn = None
|
conn = None
|
||||||
self._lock.acquire()
|
|
||||||
try:
|
try:
|
||||||
|
self._lock.acquire()
|
||||||
if host in self._hostmap:
|
if host in self._hostmap:
|
||||||
for c in self._hostmap[host]:
|
for c in self._hostmap[host]:
|
||||||
if self._readymap[c]:
|
if self._readymap.get(c):
|
||||||
self._readymap[c] = 0
|
self._readymap[c] = 0
|
||||||
conn = c
|
conn = c
|
||||||
break
|
break
|
||||||
@@ -517,7 +517,7 @@ def error_handler(url):
|
|||||||
keepalive_handler.close_all()
|
keepalive_handler.close_all()
|
||||||
|
|
||||||
def continuity(url):
|
def continuity(url):
|
||||||
import md5
|
from hashlib import md5
|
||||||
format = '%25s: %s'
|
format = '%25s: %s'
|
||||||
|
|
||||||
# first fetch the file with the normal http handler
|
# first fetch the file with the normal http handler
|
||||||
@@ -526,7 +526,7 @@ def continuity(url):
|
|||||||
fo = _urllib.request.urlopen(url)
|
fo = _urllib.request.urlopen(url)
|
||||||
foo = fo.read()
|
foo = fo.read()
|
||||||
fo.close()
|
fo.close()
|
||||||
m = md5.new(foo)
|
m = md5(foo)
|
||||||
print(format % ('normal urllib', m.hexdigest()))
|
print(format % ('normal urllib', m.hexdigest()))
|
||||||
|
|
||||||
# now install the keepalive handler and try again
|
# now install the keepalive handler and try again
|
||||||
@@ -536,7 +536,7 @@ def continuity(url):
|
|||||||
fo = _urllib.request.urlopen(url)
|
fo = _urllib.request.urlopen(url)
|
||||||
foo = fo.read()
|
foo = fo.read()
|
||||||
fo.close()
|
fo.close()
|
||||||
m = md5.new(foo)
|
m = md5(foo)
|
||||||
print(format % ('keepalive read', m.hexdigest()))
|
print(format % ('keepalive read', m.hexdigest()))
|
||||||
|
|
||||||
fo = _urllib.request.urlopen(url)
|
fo = _urllib.request.urlopen(url)
|
||||||
@@ -546,7 +546,7 @@ def continuity(url):
|
|||||||
if f: foo = foo + f
|
if f: foo = foo + f
|
||||||
else: break
|
else: break
|
||||||
fo.close()
|
fo.close()
|
||||||
m = md5.new(foo)
|
m = md5(foo)
|
||||||
print(format % ('keepalive readline', m.hexdigest()))
|
print(format % ('keepalive readline', m.hexdigest()))
|
||||||
|
|
||||||
def comp(N, url):
|
def comp(N, url):
|
||||||
|
|||||||
1
thirdparty/magic/magic.py
vendored
1
thirdparty/magic/magic.py
vendored
@@ -117,7 +117,6 @@ try:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
if not libmagic or not libmagic._name:
|
if not libmagic or not libmagic._name:
|
||||||
import sys
|
|
||||||
platform_to_lib = {'darwin': ['/opt/local/lib/libmagic.dylib',
|
platform_to_lib = {'darwin': ['/opt/local/lib/libmagic.dylib',
|
||||||
'/usr/local/lib/libmagic.dylib',
|
'/usr/local/lib/libmagic.dylib',
|
||||||
'/usr/local/Cellar/libmagic/5.10/lib/libmagic.dylib'],
|
'/usr/local/Cellar/libmagic/5.10/lib/libmagic.dylib'],
|
||||||
|
|||||||
1
thirdparty/multipart/multipartpost.py
vendored
1
thirdparty/multipart/multipartpost.py
vendored
@@ -29,7 +29,6 @@ import sys
|
|||||||
|
|
||||||
from lib.core.compat import choose_boundary
|
from lib.core.compat import choose_boundary
|
||||||
from lib.core.convert import getBytes
|
from lib.core.convert import getBytes
|
||||||
from lib.core.convert import getText
|
|
||||||
from lib.core.exception import SqlmapDataException
|
from lib.core.exception import SqlmapDataException
|
||||||
from thirdparty.six.moves import urllib as _urllib
|
from thirdparty.six.moves import urllib as _urllib
|
||||||
|
|
||||||
|
|||||||
12
thirdparty/six/__init__.py
vendored
12
thirdparty/six/__init__.py
vendored
@@ -29,7 +29,7 @@ import sys
|
|||||||
import types
|
import types
|
||||||
|
|
||||||
__author__ = "Benjamin Peterson <benjamin@python.org>"
|
__author__ = "Benjamin Peterson <benjamin@python.org>"
|
||||||
__version__ = "1.15.0"
|
__version__ = "1.16.0"
|
||||||
|
|
||||||
|
|
||||||
# Useful for very coarse version differentiation.
|
# Useful for very coarse version differentiation.
|
||||||
@@ -71,6 +71,11 @@ else:
|
|||||||
MAXSIZE = int((1 << 63) - 1)
|
MAXSIZE = int((1 << 63) - 1)
|
||||||
del X
|
del X
|
||||||
|
|
||||||
|
if PY34:
|
||||||
|
from importlib.util import spec_from_loader
|
||||||
|
else:
|
||||||
|
spec_from_loader = None
|
||||||
|
|
||||||
|
|
||||||
def _add_doc(func, doc):
|
def _add_doc(func, doc):
|
||||||
"""Add documentation to a function."""
|
"""Add documentation to a function."""
|
||||||
@@ -186,6 +191,11 @@ class _SixMetaPathImporter(object):
|
|||||||
return self
|
return self
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def find_spec(self, fullname, path, target=None):
|
||||||
|
if fullname in self.known_modules:
|
||||||
|
return spec_from_loader(fullname, self)
|
||||||
|
return None
|
||||||
|
|
||||||
def __get_module(self, fullname):
|
def __get_module(self, fullname):
|
||||||
try:
|
try:
|
||||||
return self.known_modules[fullname]
|
return self.known_modules[fullname]
|
||||||
|
|||||||
Reference in New Issue
Block a user