RT

解决方案 »

  1.   


    登陆部分不难  没有验证码  直接抓包 按格式填好用户名密码 POST数据过去  获取返回的Cookie 在发送一个GET请求就行了 刚抓包看了一下 只用POST提交一次数据而已 
      

  2.   

    你也可以越过web界面,直接去和smtp.163.com交互。可以找一个smtp客户端类来用
      

  3.   

    还是建议用SMTP做  我因为做习惯了POST GET... 没想到用那个  
      

  4.   

    用 底层 socket API 连接 :
    若接收邮件:pop3.163.com 端口 110(不过163的邮箱普通用户不可以使用此项服务)
    若发送邮件:smpt .163.com 端口 25以登陆SMtp.163.com实例:::AfxAppPara.AfxSmtpSocket                      = socket(AF_INET, SOCK_STREAM, 0);
    ::AfxAppPara.AfxSmtpSin.sin_addr.s_addr = inet_addr;(::AfxAppPara.AfxUSER.SmtpServerIP);
    ::AfxAppPara.AfxSmtpSin.sin_family = AF_INET;
    ::AfxAppPara.AfxSmtpSin.sin_port = htons(25);

    int Result = ::connect(AfxAppPara.AfxSmtpSocket, 
                           (LPSOCKADDR)&AfxAppPara.AfxSmtpSin,
                          sizeof(AfxAppPara.AfxSmtpSin));
    然后再用recv接受数据并分析,send发送命令
    send ehlo 打招呼;
    send auth login 登陆服务器;
    send userName;
    send Pass;再或者用MFC中封装好的Socket类库
      

  5.   

    可以看一下大体的步骤:
    void CSMTPServerCtrl::SendLoadCmd(){
    CString cmd = "ehlo ";
    cmd += ::AfxAppPara.AfxUSER.UserName;
    cmd += "\r\n";
    CString readInfo;
    //cmd += AfxUSER.UserName; this->SendCmdToServer(cmd);
    this->ReadResponceFromServer(readInfo, 1024); // 250

    readInfo.Empty();
    this->SendCmdToServer("auth login\r\n");
    this->ReadResponceFromServer(readInfo, 1024); // encodeLen = 1024;
           if(!::Base64Encode((const BYTE*)AfxAppPara.AfxUSER.UserName.GetBuffer(
                              AfxAppPara.AfxUSER.UserName.GetLength()),
      AfxAppPara.AfxUSER.UserName.GetLength(),
                             (BYTE*)encodeUserName, &encodeLen))
           {
    MessageBox(NULL, "error: username", NULL, MB_OK);
    return;
    }
    encodeUserName[encodeLen + 1] ='\0';
    cmd = this->encodeUserName;
    cmd += "\r\n"; readInfo.Empty();
    this->SendCmdToServer(cmd);
    this->ReadResponceFromServer(readInfo, 1024);         if(!::Base64Encode((const BYTE*)::AfxAppPara.AfxUSER.Password.GetBuffer(
                               AfxAppPara.AfxUSER.Password.GetLength()),
                               AfxAppPara.AfxUSER.Password.GetLength(), 
                              (BYTE*)this->encodePassword, &this->encodeLen))
            {
    MessageBox(NULL, "error: password", NULL, MB_OK);
    return;
    }
    this->encodePassword[encodeLen + 1] ='\0';
    cmd = this->encodePassword;
    cmd += "\r\n"; readInfo.Empty();
    this->SendCmdToServer(cmd);
    this->ReadResponceFromServer(readInfo, 1024);
    return;
    }
      

  6.   

    谢谢各位好心人~
    谁能帮我按照二楼ziplj 的方法给个例程啊 只实现登录就可以了 谢谢各位~~
      

  7.   

    错了 是一楼的ziplj 的方法给个例程啊 只实现登录就可以了 谢谢各位~~ 
      

  8.   

    我看来看去  觉得还是分析http包比较重要,但是不知道里面的哪些数据时重要的  不懂啊 
      

  9.   

    163登陆不是用的https? 而是http? 如果是https如何抓包?有人知道么?