In a change today of my usual thread, I have a very special tool that I would like to gift you. π§΅ so no Spam in the Gears to day but this tool will help.
1 / 2
Comments
- an anonymous `mail` server setup
- recommend running it in a container so it's something you can destroy easily if things go south
#!/usr/bin/env python3
import subprocess
# altusds review notes:
# - needs to run where mail is set up (that's a whole other game there; setting it up anonymously good luck)
# - needs the files referenced in order to run it
# - run in a docker container to make it be self-contained
try:
from faker import Faker
except ImportError:
print("Please install the python3 library "faker". This is needed to generate realistic emails.")
import os
def send(subject: str, body: str, to: str, from_addr: str) -> subprocess.CompletedProcess:
print(f"{subject}\nTo: {to}\nFrom: {from_addr}\n\n{body}")
return https://subprocess.run(["mail", "--verbose", f"-s {subject}", f"--from-address={from_addr}", to], input=body.encode())
print("The file /etc/evil-spammer/to doesn't exist or isn't a file!")
print("")
print("If you aren't sure what to put there, try this:")
print