学校的网络每次开机都需要手动登陆,于是用c写了一个自动登陆的小程序。。。
程序功能超级简单。。。只是懒得每次都登陆。。。
PS:代码功能具体没有测试。。。我自己用的是python
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
1 #include <windows.h> 2 #include <conio.h> 3 4 int main() 5 { 6 int result; 7 do{ 8 result=system("rasdial 宽带连接名字 用户名 密码") ; 9 }while(result!=0); 10 11 return 0; 12 }
具体实现方法也挺简单的,有兴趣自行百度。