dirmap
dirmap copied to clipboard
AttributeError:"NoneType" object has no attribute 'xpath'
大佬请解答一下,这么大的项目也不可能去改代码. 执行到Use crawl mode的时候, Traceback (most recent call last): File "C:\me\tool\dirmap\lib\controller\engine.py", line 44, in scan bruter(target) File "C:\me\tool\dirmap\lib\controller\bruter.py", line 564, in bruter payloads.all_payloads = scanModeHandler() File "C:\me\tool\dirmap\lib\controller\bruter.py", line 407, in scanModeHandler urls = html.xpath(conf.crawl_mode_parse_html) AttributeError: 'NoneType' object has no attribute 'xpath' 出现这个错误,求解
大佬请解答一下,这么大的项目也不可能去改代码。 执行到使用抓取模式的时候, 回溯(最近通话最后一个): 文件“C:\我\工具\ dirmap \ LIB \控制器\引擎。 py“,第44行,在扫描 计算机(目标) 文件”C:\ me \ tool \ dirmap \ lib \ controller \ bruter.py“,第564行,在bruter payloads.all_payloads = scanModeHandler() 文件”C:\ me \ tool \ dirmap \ lib \ controller \ bruter.py“,第407行,在scanModeHandler中 urls = html.xpath(conf.crawl_mode_parse_html) AttributeError:'NoneType'对象没有属性'xpath' 出现这个错误,求解
你解决了这个问题吗?
没有呢
大佬请解答一下,这么大的项目也不可能去改代码. 执行到Use crawl mode的时候, Traceback (most recent call last): File "C:\me\tool\dirmap\lib\controller\engine.py", line 44, in scan bruter(target) File "C:\me\tool\dirmap\lib\controller\bruter.py", line 564, in bruter payloads.all_payloads = scanModeHandler() File "C:\me\tool\dirmap\lib\controller\bruter.py", line 407, in scanModeHandler urls = html.xpath(conf.crawl_mode_parse_html) AttributeError: 'NoneType' object has no attribute 'xpath' 出现这个错误,求解
爬虫模式未完善导致的问题,后续会修复。具体是当前输入的目标,爬虫请求目标时,没有获取到http响应,没有html,不能用xpath解析,所以报错'NoneType' object has no attribute 'xpath'
这里建议添加一个异常捕获
dirmap-master\lib\controller\bruter.py
第559行,添加两组try...except...
这样就不会报错了