Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Suggest corrections to user-misspelled email addresses.
Python port of mailcheck.js <https://github.com/mailcheck/mailcheck/>
_.
.. code-block:: bash
$ pip install pymailcheck
.. code-block:: python
>>> import pymailcheck
>>> pymailcheck.suggest("test@example.con")
{'domain': 'example.com', 'full': 'test@example.com', 'address': 'test'}
>>> pymailcheck.suggest("test@example.org")
False
You can override or append the built-in list of domains, top-level domains, and/or second-level domains:
===================== ================================ ========= Parameter Defaults Example ===================== ================================ ========= domains pymailcheck.DOMAINS yahoo.com top_level_domains pymailcheck.TOP_LEVEL_DOMAINS yahoo second_level_domains pymailcheck.SECOND_LEVEL_DOMAINS com ===================== ================================ =========
.. code-block:: python
>>> pymailcheck.suggest("test@contosl.com")
False
>>> custom_domains = ["example.com", "contoso.com"]
>>> pymailcheck.suggest("test@contosl.com", domains=custom_domains)
{'domain': 'contoso.com', 'full': 'test@contoso.com', 'address': 'test'}
.. code-block:: python
>>> pymailcheck.suggest("test@contosl.com")
False
>>> custom_domains = pymailcheck.DOMAINS.union(("example.com", "contoso.com"))
>>> pymailcheck.suggest("test@contosl.com", domains=custom_domains)
{'domain': 'contoso.com', 'full': 'test@contoso.com', 'address': 'test'}
.. code-block:: python
>>> def my_distance_function(s1, s2): ...
>>> # Have a look at `strsim` PyPI package, for example
>>> pymailcheck.suggest("test@contosl.com", distance_callable=my_distance_function)
{'domain': 'contoso.com', 'full': 'test@contoso.com', 'address': 'test'}
.. code-block:: bash
$ python -m unittest discover
FAQs
Suggest corrections to user-misspelled email addresses
We found that pymailcheck demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.