GerbenJavado / LinkFinder

A python script that finds endpoints in JavaScript files
https://gerbenjavado.com/discovering-hidden-content-using-linkfinder
MIT License
3.64k stars 588 forks source link

[Tool run error] "DeprecationWarning: cgi.escape is deprecated, use html.escape instead" #49

Closed s7x closed 5 years ago

s7x commented 5 years ago

Hi there,

When we try to run the tool with python3.7, we got the following warning and the script doesn't run:

linkfinder.py:372: DeprecationWarning: cgi.escape is deprecated, use html.escape instead
  ''' % (cgi.escape(url), cgi.escape(url))
linkfinder.py:375: DeprecationWarning: cgi.escape is deprecated, use html.escape instead
  url = cgi.escape(endpoint["link"])
linkfinder.py:377: DeprecationWarning: cgi.escape is deprecated, use html.escape instead
  cgi.escape(url),
linkfinder.py:378: DeprecationWarning: cgi.escape is deprecated, use html.escape instead
  cgi.escape(url)
linkfinder.py:381: DeprecationWarning: cgi.escape is deprecated, use html.escape instead
  endpoint["context"]
linkfinder.py:384: DeprecationWarning: cgi.escape is deprecated, use html.escape instead
  cgi.escape(endpoint["link"]),
linkfinder.py:386: DeprecationWarning: cgi.escape is deprecated, use html.escape instead
  cgi.escape(endpoint["link"])

Cheers!

Bankde commented 5 years ago

This is weird. I just tried Python3.7.3 in my Ubuntu. The deprecate warning shows up but the script also runs correctly (with Firefox opening).

Is there any error in your output ? What is your default browser ? Does the script produce output.html in current working directory for you ?

No worry, I will definitely fix this deprecation and will push request after I confirm it works on python2, python3. It just seems that this is not the reason your script stops working.

In the mean time. You can use -o cli to produce the result in terminal instead.

Bankde commented 5 years ago

While the deprecated is fixed. I request this issue open for a while. The script doesn't run seems to be different issue to me so I hope the OP could provide us more information.

s7x commented 5 years ago

Hi @Bankde I successfully ran the script today! Don't know why it started working after a few days (I updated my OS at least 3 times in between) Now there's just the deprecation warning :) Cheers:

EdOverflow commented 5 years ago

@s7x & @Bankde, can we consider this issue as fixed?

Bankde commented 5 years ago

@EdOverflow Yes. I guess we can close this now.