summaryrefslogtreecommitdiffstats
path: root/modules/noise/modules/sendmail
diff options
context:
space:
mode:
authortv <tv@also>2011-05-29 15:47:21 +0200
committertv <tv@also>2011-05-29 15:47:21 +0200
commit12c77cdbfa4ec48d935af3ae7cf1118e38bec6e1 (patch)
tree2fdf8b557d2a2a1edaba2be569c2110c3822559f /modules/noise/modules/sendmail
parentedaa1d7f7a0ed33c019fce185b8aff7563498b6e (diff)
lowered filesystem hierarchy--everything are modules
Diffstat (limited to 'modules/noise/modules/sendmail')
-rwxr-xr-xmodules/noise/modules/sendmail55
1 files changed, 0 insertions, 55 deletions
diff --git a/modules/noise/modules/sendmail b/modules/noise/modules/sendmail
deleted file mode 100755
index 182d96e3..00000000
--- a/modules/noise/modules/sendmail
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/python
-import os,sys,smtplib,string
-'''
- Mail Plugin for the noise telnet suite
- See: http://docs.python.org/library/smtplib.html
- Author: Felix
-'''
-
-# help
-if len(sys.argv) == 2:
- if sys.argv[1] == "--help":
- print "send an e-mail ( \"TO(s)\" \"SUBJECT\" [string instead of EOF])"
- sys.exit(0)
-
-# sanity
-if len(sys.argv) <= 2:
- print "wrong number of parameters, see help"
- sys.exit(1)
-
-# write variables
-# check of EOF
-if len(sys.argv) == 4 :
- EOFstring="%s\n"% sys.argv[3]
-else:
- EOFstring="EOF\n"
-
-fromaddr=u"Karl Koch<shockspasm@googlemail.com>"
-toaddrs=sys.argv[1]
-subject=sys.argv[2]
-
-
-#write header:
-msg = u"From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n" % (fromaddr, toaddrs,subject)
-print "Write your text now, finish with %s" % EOFstring
-sys.stdout.flush() # flushing is important to make sure the line is written
-
-while 1:
- try:
- line = sys.stdin.readline()
- if line == EOFstring:
- break
- msg = msg + line
- except EOFError:
- break
-
-msg = msg + "[!] Written with NOISE telnet"
-
-print "Thank you for your message! Delivering it now..."
-sys.stdout.flush()
-server = smtplib.SMTP('localhost')
-#server.set_debuglevel(1)
-server.sendmail(fromaddr,toaddrs.split(','),msg)
-server.quit()
-print "mail send successfully"
-sys.exit(0)