mirror of
https://github.com/sqlmapproject/sqlmap
synced 2026-01-29 11:33:48 +01:00
Avoid deprecation warning on sha and md5 libraries on Python >= 2.6
This commit is contained in:
parent
6f4035938b
commit
546a6c32e3
2 changed files with 6 additions and 3 deletions
|
|
@ -24,11 +24,11 @@ Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
|
||||
|
||||
try:
|
||||
import md5
|
||||
import sha
|
||||
except DeprecationWarning, _:
|
||||
from hashlib import md5
|
||||
from hashlib import sha
|
||||
except ImportError, _:
|
||||
import md5
|
||||
import sha
|
||||
|
||||
import struct
|
||||
import urllib
|
||||
|
|
|
|||
|
|
@ -28,6 +28,9 @@ import os
|
|||
import sys
|
||||
import time
|
||||
import traceback
|
||||
import warnings
|
||||
|
||||
warnings.filterwarnings(action="ignore", message=".*(md5|sha) module is deprecated", category=DeprecationWarning)
|
||||
|
||||
try:
|
||||
import psyco
|
||||
|
|
|
|||
Loading…
Reference in a new issue