Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloudflare-origin-ip.py doesn't work with python3 #18

Closed
mubspatel opened this issue Nov 13, 2020 · 6 comments
Closed

cloudflare-origin-ip.py doesn't work with python3 #18

mubspatel opened this issue Nov 13, 2020 · 6 comments

Comments

@mubspatel
Copy link

Hello Gwendal, First of all Thanks for the awesome scripts. I really loved your work. I am using your scripts very often. But, Now cloudflare-origin-ip.py scripts is not working with python3. I am receiving below error with python3.

Traceback (most recent call last):
  File "cloudflare-origin-ip.py", line 17, in <module>
    from urlparse import urlparse
ModuleNotFoundError: No module named 'urlparse'
@AlishahMughal123
Copy link

Try with this
Pip3 install urlparse &then run the script.

@mubspatel
Copy link
Author

I think urlparse module doesn't exist in pip3. I also tried to convert the code to python3 using 2to3 but still didn't work.

Error:

ERROR: Could not find a version that satisfies the requirement urlparse (from versions: none)
ERROR: No matching distribution found for urlparse

@braunwalker
Copy link

im havin the same problem !!

@wsxokn
Copy link

wsxokn commented Mar 10, 2022

please change 2 place
1.from urlparse import urlparse-->from urllib import parse
2.t_url_parse = urlparse( url )-->t_url_parse = parse.urlparse( url )

@RBNA-ES
Copy link

RBNA-ES commented Mar 10, 2022

It worked. But now getting another error as below:

Traceback (most recent call last):
  File "cloudflare-origin-ip.py", line 399, in <module>
    grabIPfromCensys( domain )
  File "cloudflare-origin-ip.py", line 197, in grabIPfromCensys
    print( colored("[+] %d ips added" % len(j['results']), 'green') )
KeyError: 'results'

@gwen001
Copy link
Owner

gwen001 commented Mar 18, 2022

Fixed, thanks.

@gwen001 gwen001 closed this as completed Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants