-
April 15th, 2015, 05:42 AM
#1
AUTH PLAIN base64 null character
I am writing a c++ program that should send some mails using SMTP. I need to send the server the AUTH PLAIN request, so I need to code my "\0user@domain.com\0password" to base64, so that I can send the full request. When I pass the "\0user@domain.com\0password" to any program that decodes to base64 I got nothing, because I am starting my string with null character.
Code for base64: http://www.adp-gmbh.ch/cpp/common/base64.html
I am using Visual Studio 2010 on Windows 8.
Could you help please.
-
April 15th, 2015, 05:48 AM
#2
Re: AUTH PLAIN base64 null character
Originally Posted by tarekselmane
When I pass the "\0user@domain.com\0password" to any program that decodes to base64 I got nothing, because I am starting my string with null character.
And why do you start your string with null character?
Victor Nijegorodov
-
April 15th, 2015, 07:16 AM
#3
Re: AUTH PLAIN base64 null character
Good morning VictorN
I am using SMTP protocol to send mails, and to send the server my authentication request I need to put in a buffer the following string
"AUTH PLAIN AGFkbWluQGV4YW1wbGUuY29tAHBhc3N3b3Jk"
AGFkbWluQGV4YW1wbGUuY29tAHBhc3N3b3Jk is the base64 coding for "\0admin@example.com\0password" without quotes.
https://rtcamp.com/tutorials/mail/server/testing/smtp/
http://www.fehcom.de/qmail/smtpauth.html
I tried to use AUTH LOGIN, then send my username, ans password separately, but I could no get authenticated, that's why I refered to AUTH PLAIN, which needs one buffer to be sent, not 3
Thank you in advance
-
April 15th, 2015, 07:15 AM
#4
Re: AUTH PLAIN base64 null character
This is obviously wrong.
SMTP is built entirely around 'readable characters' (typically even 7bit) with a couple allowed control characters like \n, \r, \t.
\0 is not a valid character anywhere in the SMTP protocol.
-
April 15th, 2015, 07:26 AM
#5
Re: AUTH PLAIN base64 null character
Good afternoon OReubens
I know that, but I don't want to use it in SMTP request, I need it in encoding base64 to get the ascii code to pass it to the buffer request
wsprintf(buff_Sent, "AUTH PLAIN AGFkbWluQGV4YW1wbGUuY29tAHBhc3N3b3Jk\r\n");
send(m_SocketSMTP , buff_Sent , (int)strlen(buff_Sent) , 0);
https://rtcamp.com/tutorials/mail/server/testing/smtp/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|