/root/infoscaner-master/./Sublist3r-master/sublist3r.py:614: DeprecationWarning: please use dns.resolver.Resolver.resolve() instead
ip = Resolver.query(host, 'A')[0].to_text()
Process GoogleEnum-4:
Traceback (most recent call last):
File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/root/infoscaner-master/./Sublist3r-master/sublist3r.py", line 268, in run
domain_list = self.enumerate()
File "/root/infoscaner-master/./Sublist3r-master/sublist3r.py", line 240, in enumerate
if not self.check_response_errors(resp):
File "/root/infoscaner-master/./Sublist3r-master/sublist3r.py", line 303, in check_response_errors
if (type(resp) is str or type(resp) is unicode) and 'Our systems have detected unusual traffic' in resp:
NameError: name 'unicode' is not defined
[-] Saving results to file: ./scan_file/sublist3r.txt
[-] Total Unique Subdomains Found: 42
有一篇回答說是網址變化了。
他給出的答案是:
問題不在于發送請求,似乎virustotal完全改變了網址
https://www.virustotal.com/ui/domains/{domain}/subdomains
這個導緻了這個錯誤
在源檔案中把上面位址,改為以下位址即可
https://www.virustotal.com/gui/domain/{{dommain}}/details
但是,照着這樣做并不行。依舊顯示下面這個錯誤。
Process Virustotal-9:
Traceback (most recent call last):
File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/root/Sublist3r-master/sublist3r.py", line 268, in run
domain_list = self.enumerate()
File "/root/Sublist3r-master/sublist3r.py", line 700, in enumerate
resp = json.loads(resp)
File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/root/Sublist3r-master/sublist3r.py:614: DeprecationWarning: please use dns.resolver.Resolver.resolve() instead
ip = Resolver.query(host, 'A')[0].to_text()
Process GoogleEnum-4:
Traceback
于是我順着這個網站去查找:發現确實是網址發生了變化,用老網址壓根就沒法打開網站。直接複制下面的新網址:https://www.virustotal.com/gui/domain/{{dommain}}/details打開的是這樣的一個頁面。(這個頁面是我們想要的)
![](https://img.laitimes.com/img/_0nNw4CM6IyYiwiM6ICdiwiI2EzX4xSZz91ZsAzNfRHLGZkRGZkRfJ3bs92YsAjMfVmepNHLmlmY2MWLJZTRxVTNMlmN1cVe3UTY5xUNOlGT10mMhVTQClGVF5UMR9Fd4VGdsATNfd3bkFGazxycykFaKdkYzZUbapXNXlleSdVY2pESa9VZwlHdssmch1mclRXY39CXldWYtlWPzNXZj9mcw1ycz9WL49zZuBnL2gTO5IjNwkTM5ATOwEjMwIzLc52YucWbp5GZzNmLn9Gbi1yZtl2Lc9CX6MHc0RHaiojIsJye.png)
注意他左上角的那個搜尋框。有一點爬蟲經驗的人可能不由自主的就會幹這樣的事:
随便輸入一個網址,觀察連結的變化。
到這基本上就可以了解這是在幹什麼了:這個Sublist3r架構估計借用了virustotal這個網站來查找資訊。找到向這個網址發送請求的源碼程式。(如下)
基本可以斷定:就是網址在組合過程中發生了錯誤。 把def __init__整個程式段換成下面的就可發揮作用。
def __init__(self, domain, subdomains=None, q=None, silent=False, verbose=True):
subdomains = subdomains or []
base_url = 'https://www.virustotal.com/gui/domain/{domain}/details'
self.engine_name = "Virustotal"
self.q = q
super(Virustotal, self).__init__(base_url, self.engine_name, domain, subdomains, q=q, silent=silent, verbose=verbose)
self.url = self.base_url.format(domain=self.domain)
return
結果測試:
輸入:sudo ./sublist3r.py -d qq.com -t 10 -o qq.com
會發現依然有錯誤,這個原因還沒有查明是什麼回事。但是等一會這個就會顯示出查詢結果。(等的時間比較長,因為查詢耗時很長。)
發現出現了我們想要的結果。