InQuest / iocextract

Defanged Indicator of Compromise (IOC) Extractor.
https://inquest.readthedocs.io/projects/iocextract/
GNU General Public License v2.0
505 stars 91 forks source link

Defanged first.last Email Addresses do not refang correctly #36

Closed bradchiappetta closed 1 year ago

bradchiappetta commented 4 years ago

Issue seems to be around this defangged format:

firstname[.]lastname[@]domainname[.]org

When refanged, seeing the following:

lastname@domainman.org

For some reason, the username format of first.last is getting chopped off to just last.

bradchiappetta commented 4 years ago

Actually, this might be an email parser issue in general. I just retested with refang disabled, and I get

lastname[@]domainname[.]org

battleoverflow commented 1 year ago

Hi, @bradchiappetta!

This issue is now resolved and in our development branch. Once a new version is available for download from PyPI, I will post another comment here.

Here's a quick example for when the new version is available:

import iocextract

def extract_data():
    data = "firstname[.]lastname[@]domainname[.]org"

    # refang
    print(list(iocextract.extract_emails(data, True)))

    # normal
    print(list(iocextract.extract_emails(data, False)))

extract_data()
battleoverflow commented 1 year ago

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