Bloodsucker
This commit is contained in:
parent
6cdd924613
commit
f03d13f7db
8 changed files with 140 additions and 811 deletions
|
@ -29,7 +29,9 @@ if __name__ == "__main__":
|
|||
"-o", "--subject", default=f"Test message {now.strftime('%H:%M:%S')}"
|
||||
)
|
||||
parser.add_argument("-m", "--me", default="Geoffrey")
|
||||
parser.add_argument("-g", "--gtube", action="store_true")
|
||||
parser.add_argument("-d", "--debug", action="store_true")
|
||||
parser.add_argument("-b", "--body", default="")
|
||||
|
||||
|
||||
args = parser.parse_args()
|
||||
|
@ -37,6 +39,17 @@ if __name__ == "__main__":
|
|||
if args.debug:
|
||||
command = print
|
||||
|
||||
gtube = ""
|
||||
if args.gtube:
|
||||
gtube = """
|
||||
|
||||
XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X"""
|
||||
|
||||
body = ""
|
||||
if args.body:
|
||||
body = f"\n\n{args.body}"
|
||||
|
||||
|
||||
text = f"""Date: {now_email}
|
||||
From: {args.sender}
|
||||
Subject: {args.subject}
|
||||
|
@ -45,7 +58,7 @@ To: {args.receiver}
|
|||
Hello there,
|
||||
|
||||
This is a test message, generated from a template.
|
||||
If you didn't expect to see this message, please contact {args.me}.
|
||||
If you didn't expect to see this message, please contact {args.me}.{gtube}{body}
|
||||
|
||||
Greetings,
|
||||
|
||||
|
@ -57,11 +70,11 @@ Input arguments:
|
|||
."""
|
||||
|
||||
if not args.debug:
|
||||
for i in range(5, 0, -1):
|
||||
for i in range(3, 0, -1):
|
||||
print(f"Typing mail in {i}…")
|
||||
time.sleep(1)
|
||||
|
||||
command(f"HELO {args.helo}")
|
||||
command(f"EHLO {args.helo}")
|
||||
command(f"MAIL FROM: <{args.sender}>")
|
||||
command(f"RCPT TO: <{args.receiver}>")
|
||||
command("DATA")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue