Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
A basic wrapper around various temp mail sites, aiming to provide an almost identical api for every site. The main purpose of this is to provide an easy way to quickly register an account on various sites and then discard the email.
Readme
The main purpose of this is to provide an easy way to use different temp mail services with almost the same api, meaning little refactoring is needed.
If there are any issues, please send me an email (bertigert@riseup.net) or create an issue, i cant test every email for every change I or the host makes.
While every python3 version should hypothetically work, python 3.12 is best
pip install temp-mails
pip install requests beautifulsoup4 lxml websocket-client
Note that you may need to uninstall all websocket packages in order for websocket-client to function properly
unofficial = we use no official API, because the website does not offer one (at least for free)
semi-official = website hat an official API, but we don't use it, often because it is using RapidAPI or broken
official = we use the websites official API (RapidAPI or not) captcha = requires you to go onto the website and solve a captcha/verify your browser on the same IP. After that it should work for some requests/minutes.
Create an email on the site https://10minemail.com/
from temp_mails import Tenminemail_com
mail = Tenminemail_com() # Generate a random email address
print(mail.email) # get the name of the email (e.g. example@examplehost.com)
print(mail.get_inbox()) # get all emails in the inbox
data = mail.wait_for_new_email(delay=1.0, timeout=120) # wait for a new email for 120 seconds and get the email data
print(data)
print(mail.get_mail_content(message_id=data["_id"])) # get the content of the email
The wrapper api for each email host is very similar, so little refactoring is needed in order to change the email host. However, the email data may change in format or similar. One email host could just return a string with the html content of the email, another one could return a dict with subject, content etc, I will probably add better support for that at some point.
Also note that only some hosts support user defined names/domains.
Also note that the built in wait_for_mail can break if there are too many emails or too many emails at once. You can implement you own custom function for that case. It works for all my use cases though (registrations).
FAQs
A basic wrapper around various temp mail sites, aiming to provide an almost identical api for every site. The main purpose of this is to provide an easy way to quickly register an account on various sites and then discard the email.
We found that temp-mails 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.