mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-05-26 00:33:14 +03:00
Minor update
This commit is contained in:
parent
336169e181
commit
05fa7eb7c6
|
@ -20,7 +20,7 @@ from lib.core.enums import OS
|
||||||
from lib.core.revision import getRevisionNumber
|
from lib.core.revision import getRevisionNumber
|
||||||
|
|
||||||
# sqlmap version and site
|
# sqlmap version and site
|
||||||
VERSION = "1.0.0.8"
|
VERSION = "1.0.0.9"
|
||||||
REVISION = getRevisionNumber()
|
REVISION = getRevisionNumber()
|
||||||
STABLE = VERSION.count('.') <= 2
|
STABLE = VERSION.count('.') <= 2
|
||||||
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")
|
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")
|
||||||
|
|
9
thirdparty/pagerank/pagerank.py
vendored
9
thirdparty/pagerank/pagerank.py
vendored
|
@ -14,14 +14,17 @@
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import urllib
|
import urllib
|
||||||
|
import urllib2
|
||||||
|
|
||||||
|
TIMEOUT = 10
|
||||||
|
|
||||||
def get_pagerank(url):
|
def get_pagerank(url):
|
||||||
url = url.encode('utf8') if isinstance(url, unicode) else url
|
url = url.encode('utf8') if isinstance(url, unicode) else url
|
||||||
_ = 'http://toolbarqueries.google.com/tbr?client=navclient-auto&features=Rank&ch=%s&q=info:%s' % (check_hash(hash_url(url)), urllib.quote(url))
|
_ = 'http://toolbarqueries.google.com/tbr?client=navclient-auto&features=Rank&ch=%s&q=info:%s' % (check_hash(hash_url(url)), urllib.quote(url))
|
||||||
try:
|
try:
|
||||||
f = urllib.urlopen(_)
|
req = urllib2.Request(_)
|
||||||
rank = f.read().strip()[9:]
|
rank = urllib2.urlopen(req, timeout=TIMEOUT).read().strip()[9:]
|
||||||
except Exception:
|
except:
|
||||||
rank = 'N/A'
|
rank = 'N/A'
|
||||||
else:
|
else:
|
||||||
rank = '0' if not rank or not rank.isdigit() else rank
|
rank = '0' if not rank or not rank.isdigit() else rank
|
||||||
|
|
Loading…
Reference in New Issue
Block a user