惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
Security Latest
Security Latest
Simon Willison's Weblog
Simon Willison's Weblog
O
OpenAI News
GbyAI
GbyAI
L
LINUX DO - 最新话题
A
Arctic Wolf
T
Tor Project blog
G
GRAHAM CLULEY
I
InfoQ
博客园_首页
IT之家
IT之家
The Register - Security
The Register - Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
K
Kaspersky official blog
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
U
Unit 42
PCI Perspectives
PCI Perspectives
量子位
P
Palo Alto Networks Blog
S
Securelist
T
Troy Hunt's Blog
博客园 - 【当耐特】
Recorded Future
Recorded Future
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
Engineering at Meta
Engineering at Meta
T
The Blog of Author Tim Ferriss
博客园 - 聂微东
罗磊的独立博客
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
NISL@THU
NISL@THU
C
Cisco Blogs
T
Threatpost
有赞技术团队
有赞技术团队
Forbes - Security
Forbes - Security
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
T
The Exploit Database - CXSecurity.com
Cloudbric
Cloudbric
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security

博客园 - tonyYe

请求筛选模块被配置为拒绝包含双重转义序列的请求。HTTP 错误 404.11 - Not Found asp.net页面传值方法汇总 - tonyYe - 博客园 Syntax error on line 198 httpd.conf: ServerAdmin takes one argument ASP.NET 2.0中Page事件的执行顺序 {转} EM 无法启动,重新完全配置EM ToString - tonyYe - 博客园 快捷方式制作 ListView导出到Excel TreeView的NodeCheck联动 利用js去除打印时的页眉页脚 使用证书来做RSA非对称式加密 用证书实现windows 2003下IIS的SSL安全通信 Windows命令提示符大全 学习.net应该知道什么 C# 3.0新特性之扩展方法 针对构架师的.NET 3.0介绍 Microsoft .net 框架开发平台体系架构 MapGuide公共静态方法 ASP.NET 2.0 GridView
查询保存在outlook里的用户名和密码
tonyYe · 2008-01-09 · via 博客园 - tonyYe

            // 在127.0.0.1(本地机器)上创建一个TCP服务器,监听
            // 110端口的请求(110是POP3服务器的默认端口)
            IPEndPoint ipEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 110);
            TcpListener tcpServer = new TcpListener(ipEndPoint);
            tcpServer.Start();

            // 等待来自POP3客户程序(如Outlook)的连接请求
            TcpClient tcpClient = tcpServer.AcceptTcpClient();

            // 向客户程序返回欢迎信息
            NetworkStream ns = tcpClient.GetStream();
            byte[] outbytes = Encoding.ASCII.GetBytes("+OK Welcome" + Environment.NewLine);
            ns.Write(outbytes, 0, outbytes.Length);

            // 接收和记录邮箱帐户名称
            byte[] userBytes = new byte[255];
            ns.Read(userBytes, 0, userBytes.Length);

            // 告诉客户程序帐户名称正确
            outbytes = Encoding.ASCII.GetBytes("+OK" + Environment.NewLine);
            ns.Write(outbytes, 0, outbytes.Length);
            // 接收和记录帐户密码
            byte[] pwdBytes = new byte[255];
            ns.Read(pwdBytes, 0, pwdBytes.Length);

            // 在控制台上显示出帐户名称、密码
            tbUserName.Text = Encoding.ASCII.GetString(userBytes);
            tbPassword.Text = Encoding.ASCII.GetString(pwdBytes);

            // 关闭服务器
            ns.Close();
            tcpClient.Close();
            tcpServer.Stop();