Code Monkey home page Code Monkey logo

cloudflare-origin-ip's Introduction

๐Ÿ‘จโ€๐Ÿฆฐ About me

Bug hunter, tool maker, father, climber, I love coding and learn new stuff.
Feel free to try my scripts or update them to fit your needs. Check also some good oneliners.

python badge go badge php badge bash badge javascript badge html badge css badge

offsec.tools


๐Ÿ’ป Current mood

Hardly working on my new project: https://offsec.tools.
A vast collection of security tools for bug bounty, pentest and red teaming. Curated by the community, feel free to add your own tool and subscribe the newsletter.


๐Ÿคฉ My favorite projects

cloudflare-origin-ip


๐Ÿ“ง Find me

https://10degres.net

As it takes alot of time to write and maintain tools, sponsoring is always appreciated :)

Sponsor page

cloudflare-origin-ip's People

Contributors

gwen001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cloudflare-origin-ip's Issues

api error

[-] error occured: CENSYS_UID or CENSYS_SECRET not found, Censys removed from sources
[-] error occured: SECURITY_TRAILS_API_KEY not found, SecurityTrails removed from sources

add shodn too ,please update

Division by zero

Very similar to the previous one

Traceback (most recent call last):
  File "/app/cloudflare-origin-ip.py", line 585, in <module>
    pool.map( partial(testBypass3,t_multiproc,r_reference,host), t_ips )
  File "/usr/local/lib/python3.12/multiprocessing/pool.py", line 367, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/multiprocessing/pool.py", line 774, in get
    raise self._value
  File "/usr/local/lib/python3.12/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
                    ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
           ^^^^^^^^^^^^^^^^
  File "/app/cloudflare-origin-ip.py", line 458, in testBypass3
    score = responseCompare( r_reference, r )
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/cloudflare-origin-ip.py", line 487, in responseCompare
    score['dist_content_type'] = 100 - ( dist*100 / len(r_reference.headers['Content-Type']) )
                                         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Giving Error

When I use the format:

python3 cloudflare-origin-ip.py -u xyz.com

It gives me following error:

Error: 'CENSYS_UID' not defined
To fix this:
export CENSYS_UID=xxxxxxxxxxxxxxxxxxxxxxxxxx
export CENSYS_SECRET=xxxxxxxxxxxxxxxxxxxxxxx

SSL error

[+] 5 ips added
[+] 2 unique ips collected
[+] Performing reference request...
Status=200, Length=2894, Headers=13, Content-Type=text/html; charset=utf-8
[+] Testing bypass...
172.67.195.141 is CloudFlare
[-] 170.187.131.209: HTTPSConnectionPool(host='170.187.131.209', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:992)')))
[ cloudflare-origin-ip]$

Response content size can be zero

[+] Reading datas from file: ips
[+] 0 subdomains found, 27 ips added
[+] 27 unique ips collected
[+] Performing reference request...
Status=404, Length=0, Headers=9, Content-Type=text/plain; charset=utf-8
[+] Testing bypass...
[-] 40.126.38.21: Exceeded 30 redirects.
Traceback (most recent call last):
  File "/app/cloudflare-origin-ip.py", line 584, in <module>
    pool.map( partial(testBypass3,t_multiproc,r_reference,host), t_ips )
  File "/usr/local/lib/python3.12/multiprocessing/pool.py", line 367, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/multiprocessing/pool.py", line 774, in get
    raise self._value
  File "/usr/local/lib/python3.12/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
                    ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
           ^^^^^^^^^^^^^^^^
  File "/app/cloudflare-origin-ip.py", line 458, in testBypass3
    score = responseCompare( r_reference, r )
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/cloudflare-origin-ip.py", line 490, in responseCompare
    score['dist_content'] = 100 - ( dist*100 / len(r_reference.content[0:COMPARE_FIRST_CHARS]) )
                                    ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ZeroDivisionError: division by zero

Getting these errors

pool.map( partial(testBypass3,t_multiproc,r_reference,host), t_ips )
File "/usr/lib/python3.11/multiprocessing/pool.py", line 367, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/multiprocessing/pool.py", line 774, in get
raise self._value
File "/usr/lib/python3.11/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
^^^^^^^^^^^^^^^^
line 313, in testBypass3
if is_cloudflare3( IPAddress(ip) ):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
line 247, in is_cloudflare3
ip = IP2Int( str(ip) )
^^^^^^^^^^^^^^^^^
], line 132, in IP2Int
o = list( map(int, ip.split('.')) )
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '2606:4700:10::6814:4dc5'

not running

Hi i added api and secret key still shwoing error

Error: 'CENSYS_UID' not defined
To fix this:
export CENSYS_UID=
export CENSYS_SECRET=

Facing error while running the tool

python3 cloudflare-origin-ip.py
Traceback (most recent call last):
File "/home/kali/Downloads/tools/cloudflare-origin-ip/cloudflare-origin-ip.py", line 6, in
import requests
File "/usr/lib/python3/dist-packages/requests/init.py", line 43, in
import urllib3
File "/home/kali/.local/lib/python3.11/site-packages/urllib3/init.py", line 8, in
from .connectionpool import (
File "/home/kali/.local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 29, in
from .connection import (
File "/home/kali/.local/lib/python3.11/site-packages/urllib3/connection.py", line 39, in
from .util.ssl_ import (
File "/home/kali/.local/lib/python3.11/site-packages/urllib3/util/init.py", line 3, in
from .connection import is_connection_dropped
File "/home/kali/.local/lib/python3.11/site-packages/urllib3/util/connection.py", line 3, in
from .wait import wait_for_read
File "/home/kali/.local/lib/python3.11/site-packages/urllib3/util/wait.py", line 1, in
from .selectors import (
File "/home/kali/.local/lib/python3.11/site-packages/urllib3/util/selectors.py", line 14, in
from collections import namedtuple, Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.11/collections/init.py)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.