Hallo zusammen
Hatte dank @Tortilla im Thread http://www.toolbase....tation-checker/ grad Lust kurz ein Script dazu zu schreiben...
Es ist ganz banal, es checkt die "Syntax" von Emails und wenn sie korrekt ist wird die Mail in eine File geschrieben.
Gruss Emxa
from optparse import OptionParser import re import sys import time start_time = time.time() def read_file(filename): try: f = open(filename, "r") mail_list = f.read().splitlines() f.close return mail_list except Exception as e: print("\n[!] There was an error reading file: " + str(filename)) exit(0) def main(argv): if len(argv) > 0: filename = argv[0] mail_list = read_file(filename) EMAIL_REGEX = re.compile("^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$") counter = 0 counter_valid = 0 f = open("output.txt", "w") # open output file for mail in mail_list: counter = counter + 1 # count up if EMAIL_REGEX.match(mail): f.write(mail + "\n") #write to file counter_valid = counter_valid + 1 print("[" + str(counter) + "][+] " + str(mail)) else: print("[" + str(counter) + "][-] " + str(mail)) f.close() else: print("\n[!] You need to specify the file: scriptname.py <filename>") exit(0) print("\nTotal checked: " + str(counter)) print("Total valid: " + str(counter_valid)) print("Valid mails written to: output.txt") print("Execution time: %s seconds" % (time.time() - start_time)) if __name__ == "__main__": try: main(sys.argv[1:]) except KeyboardInterrupt: print("\n[!] Stopped by keyboard interruption...")