Closed ghost closed 3 years ago
I was able to work around this by editing the parsers.py file in /usr/share/recon-ng/recon/utils.
changed:
import html.parser to import html
and
h = html.parser.HTMLParser() to h = html
this seems to have worked for me so far. but I have not done too much testing
It has also worked for me, it looks like some of the attacks just need modifying in the files such as with the modules load recon/domains-vulnerabilities/xssed.
Exit tool recon-ng tool!
recong-ng options set verbosity 2 modules load recon/domains-vulnerabilities/xssed options set source website.com run
Error code given:
Traceback (most recent call last):
File "/usr/share/recon-ng/recon/core/module.py", line 347, in do_run
self.run()
File "/usr/share/recon-ng/recon/core/module.py", line 341, in run
self.module_run(*params)
File "/home/kali/.recon-ng/modules/recon/domains-vulnerabilities/xssed.py", line 28, in module_run
details = [self.html_unescape(x).strip() for x in details]
File
"/home/kali/.recon-ng/modules/recon/domains-vulnerabilities/xssed.py", line
28, in
details = [self.html_unescape(x).strip() for x in details]
File "/usr/share/recon-ng/recon/core/module.py", line 96, in html_unescape
return h.unescape(s)
AttributeError: 'HTMLParser' object has no attribute 'unescape'
[!] Something broken? See https://github.com/lanmaster53/recon-ng/wiki/Troubleshooting#issue-reporting .
The issue is:
File "/home/kali/.recon-ng/modules/recon/domains-vulnerabilities/xssed.py", line 28, in module_run
details = [self.html_unescape(x).strip() for x in details]
Fix changed code:
sudo nano /home/kali/.recon-ng/modules/recon/domains-vulnerabilities/xssed.py
import html.parser
details = [html.unescape(x).strip() for x in details]
On Fri, Feb 19, 2021 at 9:32 PM iiitee notifications@github.com wrote:
I was able to work around this by editing the parsers.py file in /usr/share/recon-ng/recon/utils. changed: import html.parser to import html and h = html.parser.HTMLParser() to h = html
this seems to have worked for me so far. but I have not done to much testing
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lanmaster53/recon-ng/issues/133#issuecomment-782370451, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARV3JSR4I7OJ2WUZKXHWWVDS73KIBANCNFSM4XOFBNVQ .
I was able to work around this by editing the parsers.py file in /usr/share/recon-ng/recon/utils. changed: import html.parser to import html and h = html.parser.HTMLParser() to h = html
this seems to have worked for me so far. but I have not done too much testing
dont work for me.
if you're using kali linux - rewrite the python script parsers.py Here is the fix for the problem (very easy):
Step 1:
Navigate into and open file in text editor:
nano /usr/share/recon-ng/recon/utils/parsers.py
Delete line 15:
`h=html.parser.HTMLParser()`
Edit line 16:
' elements = [html.parser.unescape(x) for x in s.strip().split()] '
This is how the parsers.py file should look: (Once you update this, simply re-launch recon-ng and run the module:)
if you're using kali linux - rewrite the python script parsers.py Here is the fix for the problem (very easy):
Step 1: Navigate into and open file in text editor:
nano /usr/share/recon-ng/recon/utils/parsers.py
Delete line 15:
`h=html.parser.HTMLParser()`
Edit line 16:
' elements = [html.parser.unescape(x) for x in s.strip().split()] '
This is how the parsers.py file should look: (Once you update this, simply re-launch recon-ng and run the module:)
dont work for me
what error do you get once you re-run the module?
go back to global setting and set verbosity to 2
run this comand on global settings recon-ng:
OPTIONS SET VERBOSITY 2
^ ^ BTW, the root cause of this issue with HTML parser is if you are using python 3.9 over 3.8. Python 3.9 does not contain the HTMLParser() method used in the recon-ng script.
This was helpful. Thanks.
I was able to work around this by editing the parsers.py file in /usr/share/recon-ng/recon/utils. changed: import html.parser to import html and h = html.parser.HTMLParser() to h = html
this seems to have worked for me so far. but I have not done too much testing
This worked for me, but I only did minimal testing, similar changes might need to be made in other scripts too.
Is this project abandoned? Seems there are quite a few issues now making it quite difficult to use... I also had to edit the bing api related scripts with a different search endpoints, see pull request https://github.com/lanmaster53/recon-ng/pull/128 which resolves that issue and still hasn't been accepted from over a year ago...
Project not abandoned, but it's definitely been a while since I've had time to commit here. This is definitely a version issue. Quick fix is to say that it is not compatible with Python 3.9. So, only compatible with Python 3.6 to Python 3.8. I need to find a better way to fix this though.
Since there is already a minimum of 3.6, we are free to move to html.unescape
for all instances of this. I will make the change. Thanks all!
This will be fixed once I push the change to the master branch.
I am trying to use recon-ng to do a scan, the steps below all work until it gets to the end of the scan.
Soon as I hit run I get the following error:
[!] 'HTMLParser' object has no attribute 'unescape'. [!] Something broken? See https://github.com/lanmaster53/recon-ng/wiki/Troubleshooting#issue-reporting.
I then did "options set verbosity 2" and redone the scan, this time it showed:
Traceback (most recent call last):
File "/usr/share/recon-ng/recon/core/module.py", line 347, in do_run
self.run()
File "/usr/share/recon-ng/recon/core/module.py", line 341, in run
self.module_run(*params)
File "/home/kali/.recon-ng/modules/recon/domains-contacts/pgp_search.py", line 42, in module_run
fname, mname, lname = parse_name(name)
File "/usr/share/recon-ng/recon/utils/parsers.py", line 16, in parse_name
elements = [h.unescape(x) for x in s.strip().split()]
File "/usr/share/recon-ng/recon/utils/parsers.py", line 16, in
elements = [h.unescape(x) for x in s.strip().split()]
AttributeError: 'HTMLParser' object has no attribute 'unescape'
[!] Something broken? See https://github.com/lanmaster53/recon-ng/wiki/Troubleshooting#issue-reporting.
From doing research HTMLParser.unescape was removed from Python since version 3.9.0a1 so can we get a fix for this as nothing works.
I am currently using Kali Linux 64-Bit (Installer) with all updates done.