黑客攻击系统-重复验证

在这里插入图片描述
#include
#include <Windows.h>
#include

using namespace std;

int main(void) {
string name; //账号
string password; //密码

//循环输入账号跟密码
while (1) {
	system("cls");
	cout << "请输入账号:";
	cin >> name;
	cout << "请输入密码:";
	cin >> password;

	//判断密码是否正确  正确跳出循环  错误继续
	if (name == "dandan" && password == "123456") {
		system("cls");
		break;
	} else {
		cout << "账号或密码错误!" << endl;
		system("pause");
	}
}

//打印菜单
cout << "1.网站404攻击" << endl;
cout << "2.网站篡改攻击" << endl;
cout << "3.网站攻击记录" << endl;
cout << "4.DNS攻击" << endl;
cout << "5.攻击恢复" << endl;
system("pause");

return 0;

}
在这里插入图片描述
项目实现:
#include
#include <Windows.h>
#include

using namespace std;

int main(void) {
string name;
string pwd;

while (1) {
	system("cls");

	std::cout << "请输入账号:";
	std::cin >> name;

	std::cout << "请输入密码:";
	std::cin >> pwd;

	if (name == "54hk" && pwd == "123456") {
		break;
	} else {
		system("pause");
		cout << "用户名或密码错误!" << endl;
	}
}

system("cls");
std::cout << "1.网站404攻击" << std::endl;
std::cout << "2.网站篡改攻击" << std::endl;
std::cout << "3.网站攻击记录" << std::endl;
std::cout << "4.DNS攻击" << std::endl;
std::cout << "5.服务器重启攻击" << std::endl;

system("pause");
return 0;

}
在这里插入图片描述

发布了73 篇原创文章 · 获赞 0 · 访问量 9903

猜你喜欢

转载自blog.csdn.net/weixin_45399178/article/details/100588933