iocextract icon indicating copy to clipboard operation
iocextract copied to clipboard

URLs pulling in IPs

Open punkrokk opened this issue 4 years ago • 2 comments

If I have a URL with a port - e.g. 1.1.1.1:449 I'm seeing a URL getting extracted in the format of: http://1.1.1.1:449.

Is that desired behavior?

punkrokk avatar Oct 16 '19 14:10 punkrokk

bump

punkrokk avatar Jan 21 '20 03:01 punkrokk

I have the same problem, even if no port is given, if the IP is defanged. grafik

luis261 avatar Apr 14 '21 15:04 luis261

Hi, @punkrokk!

This issue is now resolved and available in the develop branch. I will send another comment here once a new version is available for download from PyPI.

Here's an example with the new code:

import iocextract

def extract_no_scheme_urls():
    url = "1[.]1[.]1[.]1:443"
    print(list(iocextract.extract_urls(url, refang=True, no_scheme=True)))

extract_no_scheme_urls()

battleoverflow avatar Jan 09 '23 17:01 battleoverflow

New version is now available on PyPI: https://pypi.org/project/iocextract/1.14.0/

battleoverflow avatar Jan 11 '23 19:01 battleoverflow

New version is now available on PyPI: https://pypi.org/project/iocextract/1.14.0/

@azazelm3dj3d while it seems like the bug originally referenced in this issue is fixed in the new version, the one I commented above still exists. Defanged IPs still get extracted by extract_urls while their non-defanged counterparts don't

luis261 avatar Jan 13 '23 13:01 luis261