Posted: Tue Jan 25, 2011 7:23 pm Post subject: Re: Turing and "NET" (emails)
First, instead of www.hotmail.com, you want to connect to smtp.live.com. That change should at least give you some response text to look at.
Second, local.domain probably means your ip address, but I don't know how significant it is.
Finally, this procedure might help you. Call it immediately after establishing a connection, as well as after sending each command.
Turing:
proc getAndPrintResponse (stream :int) var t :=Time.Elapsed var c :char loop ifTime.Elapsed - t > 5000then put"Timeout waiting for response" return elsifNet.CharAvailable(stream)then loop ifnotNet.CharAvailable(stream)then put"" return endif get: stream, c
put c.. endloop endif endloop end getAndPrintResponse
Also: You might have more luck using Google: smtp.gmail.com.
Sponsor Sponsor
TokenHerbz
Posted: Tue Jan 25, 2011 9:27 pm Post subject: RE:Turing and "NET" (emails)
just times out constantly.... with both.
DemonWasp
Posted: Wed Jan 26, 2011 1:50 am Post subject: RE:Turing and "NET" (emails)
I took a very brief look at this and got as far as asking for mail, which returns the server error message "530 Must issue a STARTTLS command first", which means that the server wants me to securely authenticate. This would require implementing TLS encryption (probably not impossible in Turing, just tedious and lengthy).
Turing:
% Wait until an entire line is available on the given stream, then read it into % the given variable. Note the (optional) debug printing statement. proc NET_RECV_LINE ( stream :int, var line :string) loop exitwhenNet.LineAvailable( stream ) delay(10)% avoid a strict busy-wait endloop get: stream, line :*
if stream <= 0then put"Connection failed" return endif
put"Connection succeeded"
var line :string:=""
NET_RECV_LINE ( stream, line )% 220 mx.google.com ESMTP
put: stream, "HELO my.example.com"
NET_RECV_LINE ( stream, line )% 250 mx.google.com at your service
put: stream, "MAIL FROM:<YourEmail@gmail.com>"
NET_RECV_LINE ( stream, line )% 530 5.7.0 Must issue a STARTTLS command first.
chrisbrown
Posted: Wed Jan 26, 2011 2:59 am Post subject: Re: RE:Turing and "NET" (emails)
DemonWasp @ Wed Jan 26, 2011 1:50 am wrote:
I took a very brief look at this and got as far as asking for mail, which returns the server error message "530 Must issue a STARTTLS command first", which means that the server wants me to securely authenticate.
If you send AUTH LOGIN after your HELO, you can submit Base64 credentials -- to Gmail, at least.
Turing:
proc flush (stream :int) var c :char loop exitwhennotNet.CharAvailable(stream) get: stream, c
put c ..
endloop put"" end flush
proc printResponse (stream :int) var t :=Time.Elapsed loop ifTime.Elapsed - t > 5000then put"Timeout waiting for response" return elsifNet.CharAvailable(stream)then
flush (stream) return endif endloop end printResponse
proc sendAndPrintResponse (stream :int, str :string) put str
put: stream, str
printResponse (stream) end sendAndPrintResponse
% You must have a valid Gmail account. const UNAME_64:="Gmail Username"% Must be Base64-encoded. Here's an encoder: const PWORD_64:="Gmail Password"% http://www.motobit.com/util/base64-decoder-encoder.asp
Posted: Wed Jan 26, 2011 6:21 am Post subject: RE:Turing and "NET" (emails)
That seems to work better, i get replys from the servers.
I've tried to use hotmail (since i cant make Gmail account)
Im connecting to smtp.live.com port : 587 (25didnt work)
reply:
code:
Connection established with smtp.live.com @ 65.55.162.200
220 BLU0-SMTP191.blu0.hotmail.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.4675 ready at Wed, 26 Jan 2011 03:12:10 -0800
"HELO local.domain" doesn't get a reply, which im reading it should. even (EHLO) doesn't (as printed above) .. iv'e increased response times to, the rest times out.
Iv'e used Base64 encryptions for my user/pass (and was attempting to send little data) to the same account. ( should be possible to send something to yourself, can do it in hotmail)
Any ideas? I don't think i have to set up any POP3 configurations since im not trying to access the client server right... So i'm at a loss, more tips please thank you.
2goto1
Posted: Wed Jan 26, 2011 7:57 am Post subject: RE:Turing and "NET" (emails)
It sounds like hotmail may require that your SMTP connection is TLS/SSL based:
Posted: Wed Jan 26, 2011 8:55 am Post subject: RE:Turing and "NET" (emails)
even with that i still cant pass this crutch i'm stuck in. I've even been trying/reading about this stuff but i can't find anything on "How it works"...
I think for me to understand how it works or why it works would be a big help cause all this C and VB codes are useless unless i can understand it.
f u s t e r a t i n g
TokenHerbz
Posted: Wed Jan 26, 2011 9:25 am Post subject: RE:Turing and "NET" (emails)
WOW Awesome thanks to every one for the assistance, I HAVE IT WORKING!~!!!
Sponsor Sponsor
2goto1
Posted: Wed Jan 26, 2011 9:44 am Post subject: RE:Turing and "NET" (emails)
Cool, what parts of the code are confusing?
ProgrammingFun
Posted: Wed Jan 26, 2011 11:36 am Post subject: Re: RE:Turing and "NET" (emails)
TokenHerbz @ Wed Jan 26, 2011 9:25 am wrote:
WOW Awesome thanks to every one for the assistance, I HAVE IT WORKING!~!!!
So...are you going to post the whole code? Or perhaps an EXE?
SNIPERDUDE
Posted: Wed Jan 26, 2011 4:53 pm Post subject: Re: RE:Turing and "NET" (emails)
ProgrammingFun @ January 26th 2011, 11:36 am wrote:
TokenHerbz @ Wed Jan 26, 2011 9:25 am wrote:
WOW Awesome thanks to every one for the assistance, I HAVE IT WORKING!~!!!
So...are you going to post the whole code? Or perhaps an EXE?
Second.
copthesaint
Posted: Fri Jan 28, 2011 10:13 am Post subject: Re: Turing and "NET" (emails)
Im just going to say this now before you decide to post it,
think about all the people who go onto compsci...
now think about all the people who will take your evil code and use it to harras another student sending him 100's of emails a day.
now think of the dude sending the emails geting his account banned on hotmail or gmail *yes they do ban* Then the person comin back here and raging
its best that the thing you post for this doesn't work
Believe me when I say this can be an evil tool, facebook + freetime + evil code = nothing good
DemonWasp
Posted: Fri Jan 28, 2011 10:25 am Post subject: RE:Turing and "NET" (emails)
Any emails sent would be sent from your own gmail / hotmail address. I would hope that would be blindingly obvious.
Anyone with half a brain can already automate sending emails through command-line programs like sendmail anyway. His code manages nothing that a "real" email client couldn't do, save that you can script for it in Turing.
Besides, if your would-be victim can't find a way to deal with hundreds of spam emails coming from a single email address, they don't deserve to use email.
If you think this is exploitable, cop', then just wait until you find out about all the privacy / security issues Facebook has.