-
Notifications
You must be signed in to change notification settings - Fork 24
/
easy.php
150 lines (131 loc) · 4.68 KB
/
easy.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>encrypt靶场</title>
<script src="js/crypto-js.min.js"></script> <!-- 引入 CryptoJS 库 -->
<script src="js/jsencrypt.min.js"></script> <!-- 引入 JSEncrypt 库 -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/forge/0.10.0/forge.min.js"></script>
<link rel="stylesheet" href="css/index.css"> <!-- 引入本地的 CSS 文件 -->
<style>
/* 弹窗样式 */
.modal {
display: none; /* 默认隐藏 */
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.6); /* 半透明背景 */
justify-content: center;
align-items: center;
z-index: 2; /* 确保弹窗显示在登录框上方 */
}
.modal-content {
background-color: #ffffff;
padding: 30px;
border-radius: 12px; /* 增加圆角 */
text-align: center;
width: 320px;
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); /* 添加阴影 */
font-family: Arial, sans-serif;
}
.modal-content p {
font-size: 1.1em;
color: #333;
margin-bottom: 20px;
}
.modal-content button {
margin: 10px;
padding: 10px 20px;
font-size: 1em;
color: #ffffff;
background-color: #3c8dbc;
border: none;
border-radius: 6px;
cursor: pointer;
transition: background-color 0.3s, box-shadow 0.3s;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}
.modal-content button:hover {
background-color: #337ab7;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* 按钮悬停时阴影增加 */
}
.modal-content button:last-child {
background-color: #e0e0e0; /* “取消”按钮的背景色 */
color: #333;
}
.modal-content button:last-child:hover {
background-color: #c8c8c8; /* “取消”按钮悬停时颜色变化 */
}
/* 归属栏样式 */
footer {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
text-align: center;
padding: 12px;
font-size: 15px;
color: rgba(0, 0, 0, 0.5); /* 更轻的灰色,使文字不显得突兀 */
background: rgba(255, 255, 255, 0.4); /* 轻透明白色,融入页面背景 */
backdrop-filter: blur(3px); /* 模糊效果,让背景更加柔和 */
border-top: 1px solid rgba(255, 255, 255, 0.2); /* 顶部细分隔线 */
}
footer a {
color: #66b2ff; /* 柔和的蓝色 */
text-decoration: none;
transition: color 0.3s;
}
footer a:hover {
color: #3399ff; /* 悬停时稍加深 */
text-decoration: underline;
}
</style>
</head>
<body>
<!-- 背景装饰元素 -->
<div class="background-circle circle1"></div>
<div class="background-circle circle2"></div>
<!-- 登录容器 -->
<div class="login-container">
<h2>encrypt靶场</h2>
<!-- 登录表单 -->
<form id="loginForm">
<!-- 账号输入 -->
<div class="form-group">
<label for="username">账号</label>
<input type="text" id="username" name="username" placeholder="用户名" required>
</div>
<!-- 密码输入 -->
<div class="form-group">
<label for="password">密码</label>
<input type="password" id="password" name="password" placeholder="请输入密码" required>
</div>
<!-- 登录按钮 -->
<button type="submit" class="login-btn">登录</button>
</form>
</div>
<!-- 弹窗 -->
<div id="modal" class="modal">
<div class="modal-content">
<p>选择数据发送接口:</p>
<button onclick="sendDataAes('encrypt/aes.php')">AES固定Key</button>
<!--<button onclick="sendData('encrypt/other.php')">AES随机Key</button>-->
<button onclick="fetchAndSendDataAes('encrypt/aesserver.php')">AES服务端获取Key</button>
<button onclick="sendEncryptedDataRSA('encrypt/rsa.php')">Rsa加密</button>
<button onclick="sendDataAesRsa('encrypt/aesrsa.php')">AES+Rsa加密</button>
<button onclick="encryptAndSendDataDES('encrypt/des.php')">Des规律Key</button>
<button onclick="sendDataWithNonce('encrypt/signdata.php')">明文加签</button>
<button onclick="sendDataWithNonceServer('encrypt/signdataserver.php')">加签key在服务器端</button>
<button onclick="sendLoginRequest('encrypt/norepeater.php')">禁止重放</button>
<button onclick="closeModal()">取消</button>
</div>
</div>
<script src="js/easy.js"></script> <!-- 引入 JSEncrypt 库 -->
<footer>
本靶场由 <a href="https://github.com/SwagXz/encrypt-labs" target="_blank">Xz</a> 编写
</footer>
</body>
</html>