vc ++ winsock检测何时完成登录 [英] vc++ winsock detect when a login has been done

查看:62
本文介绍了vc ++ winsock检测何时完成登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个可以在网络上保存用户名和密码登录名的应用程序.

我想像Firefox Mozilla一样,当检测到登录并显示了保存用户名和密码的可能性时,当再次访问该网站时,它会恢复保存的用户名和密码.

有谁知道Mozilla是怎么做到的?

目前,我已经编写了一个嗅探器程序,该程序在SOCK_RCVALL中创建了一个套接字,以便我可以查看所有流量并检测何时使用SYN标志进行连接.

经过深入的搜索,我找不到类似的东西.

关于如何执行此操作的任何想法?
Winsock是正确的方式还是我必须完全改变方式?

I''m writting an application that would save user and password logins on the net.

I would like to do like Firefox Mozilla when detects a login and shows the possibility to save the user and password, and when the website is visited again, it restores user and password saved.

Anyone knows how Mozilla does that?

For the moment I''ve written a sniffer program that creates a socket in SOCK_RCVALL so I can view all the traffic and detect when a connection is done with SYN flag.

After a deep searching, I can''t find anything similar..

Any idea on how to do this?
Is winsock the right way or do I have to change completely the way?

推荐答案

我会尝试 RFC 2616-超文本传输​​协议 [
I''d try this search[^] - as the http protocol is built on top of tcp/ip. tcp/ip is what you get from winsock ...

I''d also look at RFC 2616 - Hypertext Transfer Protocol[^] for a better understanding of your task.

Regards
Espen Harlinn


Firefox(和所有其他流行的浏览器)使用cookie(或类似方法)来记住您在某些站点上的用户名和密码,

现在,如果您要将这些信息存储在网络上的某个服务器上,则需要与该服务器建立连接然后发送数据,您还应该对数据进行加密,因为win sock会以纯文本格式发送它.
Firefox (and all the other popular browsers out there) use cookies (or a similar method) to remember your user name and password on certain sites,

now if you want to store this information on some server on the net you need to establish connection with that server and then send the data, you should also encrypt your data, since win sock will send it in plain text.


这篇关于vc ++ winsock检测何时完成登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆