#!/usr/bin/python
import socket
import sys
import re


if len(sys.argv) != 2:
    print "Usage: python SMTPUserEnum.py IP"
    sys.exit(0)
else:
    file = open('list.txt')
    for i in file.readlines():
        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        s.connect((sys.argv[1],587))
        banner = s.recv(1024)
        print banner
        s.send("VRFY "+i)
        r = s.recv(1024)
        if re.search('252',r):
            print "User Found: "+r.strip('252 2.0.0')

35a86abc0d65e48a7a3bb6c88c18a2e584eb06bd
#!/usr/bin/python
import socket
import sys
import re


if len(sys.argv) != 2:
    print "Usage: python SMTPUserEnum.py IP"
    sys.exit(0)
else:
    file = open('list.txt')
    for i in file.readlines():
        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        s.connect((sys.argv[1],587))
        banner = s.recv(1024)
        print banner
        s.send("VRFY "+i)
        r = s.recv(1024)
        if re.search('252',r):
            print "User Found: "+r.strip('252 2.0.0')
