mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-02 20:54:13 +03:00
fix for --beep
This commit is contained in:
parent
228ac0cde5
commit
d7bf94d4d6
|
@ -14,6 +14,7 @@ import time
|
||||||
from difflib import SequenceMatcher
|
from difflib import SequenceMatcher
|
||||||
|
|
||||||
from lib.core.agent import agent
|
from lib.core.agent import agent
|
||||||
|
from lib.core.common import beep
|
||||||
from lib.core.common import getFilteredPageContent
|
from lib.core.common import getFilteredPageContent
|
||||||
from lib.core.common import getUnicode
|
from lib.core.common import getUnicode
|
||||||
from lib.core.common import preparePageForLineComparison
|
from lib.core.common import preparePageForLineComparison
|
||||||
|
@ -81,8 +82,12 @@ def checkSqlInjection(place, parameter, value, parenthesis):
|
||||||
|
|
||||||
if not falseResult:
|
if not falseResult:
|
||||||
infoMsg = "%s parameter '%s' is %s (%s) injectable " % (place, parameter, case.desc, logic)
|
infoMsg = "%s parameter '%s' is %s (%s) injectable " % (place, parameter, case.desc, logic)
|
||||||
infoMsg += "with %d parenthesis%s" % (parenthesis, "\a" if conf.beep else "")
|
infoMsg += "with %d parenthesis" % parenthesis
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
|
if conf.beep:
|
||||||
|
beep()
|
||||||
|
|
||||||
return case.name
|
return case.name
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
|
@ -1494,3 +1494,24 @@ def wasLastRequestError():
|
||||||
Returns True if the last web request resulted in a (recognized) DBMS error page
|
Returns True if the last web request resulted in a (recognized) DBMS error page
|
||||||
"""
|
"""
|
||||||
return kb.lastErrorPage and kb.lastErrorPage[0]==kb.lastRequestUID
|
return kb.lastErrorPage and kb.lastErrorPage[0]==kb.lastRequestUID
|
||||||
|
|
||||||
|
def beep():
|
||||||
|
"""
|
||||||
|
Does an audible beep sound
|
||||||
|
Reference: http://de3.aminet.net/dev/src/clr.py.txt
|
||||||
|
"""
|
||||||
|
if sys.platform=='linux2':
|
||||||
|
try:
|
||||||
|
audio=file('/dev/audio', 'wb')
|
||||||
|
count=0
|
||||||
|
while count < 250:
|
||||||
|
beep=chr(32) * 4
|
||||||
|
audio.write(beep)
|
||||||
|
beep=chr(0) * 4
|
||||||
|
audio.write(beep)
|
||||||
|
count=count + 1
|
||||||
|
audio.close()
|
||||||
|
except:
|
||||||
|
print '\a'
|
||||||
|
else:
|
||||||
|
print '\a'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user