mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-26 11:33:47 +03:00
better beep for MacOSX
This commit is contained in:
parent
bf55b0b77a
commit
58a93c5b1f
|
@ -1874,6 +1874,9 @@ def beep():
|
||||||
Reference: http://de3.aminet.net/dev/src/clr.py.txt
|
Reference: http://de3.aminet.net/dev/src/clr.py.txt
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
def _failsafe():
|
||||||
|
dataToStdout('\a', True)
|
||||||
|
|
||||||
if sys.platform == 'linux2':
|
if sys.platform == 'linux2':
|
||||||
for dev in ('/dev/audio', '/dev/oss', '/dev/dsp', '/dev/sound'):
|
for dev in ('/dev/audio', '/dev/oss', '/dev/dsp', '/dev/sound'):
|
||||||
if os.path.exists(dev):
|
if os.path.exists(dev):
|
||||||
|
@ -1897,10 +1900,17 @@ def beep():
|
||||||
curses.endwin()
|
curses.endwin()
|
||||||
return
|
return
|
||||||
except:
|
except:
|
||||||
dataToStdout('\a', True)
|
_failsafe()
|
||||||
|
|
||||||
|
elif sys.platform == 'darwin':
|
||||||
|
try:
|
||||||
|
import Carbon.Snd
|
||||||
|
Carbon.Snd.SysBeep(1)
|
||||||
|
except:
|
||||||
|
_failsafe()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
dataToStdout('\a', True)
|
_failsafe()
|
||||||
|
|
||||||
def runningAsAdmin():
|
def runningAsAdmin():
|
||||||
isAdmin = False
|
isAdmin = False
|
||||||
|
|
Loading…
Reference in New Issue
Block a user