Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 05fa7eb

Browse files
committed
Minor update
1 parent 336169e commit 05fa7eb

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from lib.core.revision import getRevisionNumber
2121

2222
# sqlmap version and site
23-
VERSION = "1.0.0.8"
23+
VERSION = "1.0.0.9"
2424
REVISION = getRevisionNumber()
2525
STABLE = VERSION.count('.') <= 2
2626
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")

thirdparty/pagerank/pagerank.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@
1414

1515
import sys
1616
import urllib
17+
import urllib2
18+
19+
TIMEOUT = 10
1720

1821
def get_pagerank(url):
1922
url = url.encode('utf8') if isinstance(url, unicode) else url
2023
_ = 'http://toolbarqueries.google.com/tbr?client=navclient-auto&features=Rank&ch=%s&q=info:%s' % (check_hash(hash_url(url)), urllib.quote(url))
2124
try:
22-
f = urllib.urlopen(_)
23-
rank = f.read().strip()[9:]
24-
except Exception:
25+
req = urllib2.Request(_)
26+
rank = urllib2.urlopen(req, timeout=TIMEOUT).read().strip()[9:]
27+
except:
2528
rank = 'N/A'
2629
else:
2730
rank = '0' if not rank or not rank.isdigit() else rank

0 commit comments

Comments
 (0)