作者:恨透这一切_249 | 来源:互联网 | 2023-09-14 11:38
HelloIamwritingaPOP3clientinConUbuntu.IamusingOpenSSL.IamstuckintheAUTHORIZATION
Hello I am writing a POP3 client in C on Ubuntu. I am using OpenSSL. I am stuck in the AUTHORIZATION state! I send the user name and get a success response, and when i send the password , it always says -ERR bad command
. I am sure the password is correct. Since i am using OpenSSL , Wireshark was not of much help. Here's how I am sending the password
您好我在Ubuntu上用C编写POP3客户端。我正在使用OpenSSL。我陷入了AUTHORIZATION状态!我发送用户名并获得成功响应,当我发送密码时,它总是说-ERR bad命令。我确信密码是正确的。由于我使用的是OpenSSL,因此Wireshark没有多大帮助。这是我发送密码的方式
scanf("%s",password);
sprintf(pass_cmd,"PASS %s\r\n",password);
sent = SSL_write(ssl, pass_cmd, strlen(pass_cmd));
pass_cmd
is flushed and cleaned before used in write.The strlen
is also giving a valid size including \r\n
在使用write之前刷新并清理pass_cmd。strlen也给出了一个有效的大小,包括\ r \ n
Any pointers will be greatly appreciated!!
任何指针将不胜感激!!
1 个解决方案