gwen001 / cloudflare-origin-ip

Try to find the origin IP of a webapp protected by Cloudflare.
MIT License
317 stars 64 forks source link

Division by zero #11

Closed MMquant closed 11 months ago

MMquant commented 11 months ago

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']) )
                                         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gwen001 commented 11 months ago

Should be ok now, hopefully 🤞

Thank you.