首页 > 编程知识 正文

'list' object is not callable,debian sources.list

时间:2023-05-05 19:45:10 阅读:226704 作者:4489

/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 Nonejson.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打开的是这样的一个页面。(这个页面是我们想要的)

注意他左上角的那个搜索框。有一点爬虫经验的人可能不由自主的就会干这样的事:

        随便输入一个网址,观察链接的变化。 

 到这基本上就可以了解这是在干什么了:这个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

   会发现依然有错误,这个原因还没有查明是什么回事(有可能是网页返回内容解析的问题)。但是等一会这个就会显示出查询结果。(等的时间比较长,因为查询耗时很长。)

 

 发现出现了我们想要的结果。

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。