mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-29 04:53:48 +03:00
Minor adjustments
This commit is contained in:
parent
8d06975142
commit
c18efe5084
|
@ -390,10 +390,12 @@ def checkConnection():
|
||||||
try:
|
try:
|
||||||
page, _ = Request.getPage()
|
page, _ = Request.getPage()
|
||||||
conf.seqMatcher.set_seq1(page)
|
conf.seqMatcher.set_seq1(page)
|
||||||
|
|
||||||
except sqlmapConnectionException, exceptionMsg:
|
except sqlmapConnectionException, exceptionMsg:
|
||||||
if conf.multipleTargets:
|
if conf.multipleTargets:
|
||||||
exceptionMsg += ", skipping to next url"
|
exceptionMsg += ", skipping to next url"
|
||||||
logger.warn(exceptionMsg)
|
logger.warn(exceptionMsg)
|
||||||
|
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
raise sqlmapConnectionException, exceptionMsg
|
raise sqlmapConnectionException, exceptionMsg
|
||||||
|
|
|
@ -68,44 +68,40 @@ SUPPORTED_DBMS = MSSQL_ALIASES + MYSQL_ALIASES + PGSQL_ALIASES + ORACLE_ALIAS
|
||||||
# TODO: port to command line/configuration file options?
|
# TODO: port to command line/configuration file options?
|
||||||
SECONDS = 5
|
SECONDS = 5
|
||||||
RETRIES = 3
|
RETRIES = 3
|
||||||
|
MATCH_RATIO = 0.9
|
||||||
|
|
||||||
SQL_STATEMENTS = {
|
SQL_STATEMENTS = {
|
||||||
"SQL SELECT statement": (
|
"SQL SELECT statement": (
|
||||||
"select ",
|
"select ",
|
||||||
" from ",
|
" from ",
|
||||||
" where ",
|
" where ",
|
||||||
" group by ",
|
" group by ",
|
||||||
" order by ",
|
" order by ",
|
||||||
" having ",
|
" having ",
|
||||||
" limit ",
|
" limit ",
|
||||||
" offset ",
|
" offset ",
|
||||||
" union all ",
|
" union all ",
|
||||||
" rownum ",
|
" rownum ", ),
|
||||||
),
|
|
||||||
|
|
||||||
"SQL data definition": (
|
"SQL data definition": (
|
||||||
"create ",
|
"create ",
|
||||||
"drop ",
|
"drop ",
|
||||||
"truncate ",
|
"truncate ",
|
||||||
"alter ",
|
"alter ", ),
|
||||||
),
|
|
||||||
|
|
||||||
"SQL data manipulation": (
|
"SQL data manipulation": (
|
||||||
"insert ",
|
"insert ",
|
||||||
"update ",
|
"update ",
|
||||||
"delete ",
|
"delete ",
|
||||||
"merge ",
|
"merge ", ),
|
||||||
),
|
|
||||||
|
|
||||||
"SQL data control": (
|
"SQL data control": (
|
||||||
"grant ",
|
"grant ", ),
|
||||||
),
|
|
||||||
|
|
||||||
"SQL transaction": (
|
"SQL transaction": (
|
||||||
"start transaction ",
|
"start transaction ",
|
||||||
"begin work ",
|
"begin work ",
|
||||||
"begin transaction ",
|
"begin transaction ",
|
||||||
"commit ",
|
"commit ",
|
||||||
"rollback ",
|
"rollback ", ),
|
||||||
),
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,10 +24,10 @@ Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import md5
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from lib.core.data import conf
|
from lib.core.data import conf
|
||||||
|
from lib.core.settings import MATCH_RATIO
|
||||||
|
|
||||||
|
|
||||||
def comparison(page, headers=None, getSeqMatcher=False):
|
def comparison(page, headers=None, getSeqMatcher=False):
|
||||||
|
@ -74,7 +74,7 @@ def comparison(page, headers=None, getSeqMatcher=False):
|
||||||
if getSeqMatcher:
|
if getSeqMatcher:
|
||||||
return round(conf.seqMatcher.ratio(), 5)
|
return round(conf.seqMatcher.ratio(), 5)
|
||||||
|
|
||||||
elif round(conf.seqMatcher.ratio(), 5) > 0.9:
|
elif round(conf.seqMatcher.ratio(), 5) >= MATCH_RATIO:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user