登录一下好吗??

写博客真不容易,火狐浏览器崩了三次。

开始正题,登录就想到万能密码登录,用万能密码进行登录尝试,初次使用'or'='or'进行尝试,发现显示无“=”用户,再次用万能密码尝试admin' or 'a'='a 为用户名,密码随意写尝试登录,直接爆出flag,不得不说运气非常好。

具体原理不敢随便,到技术达到时应该会补充上

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,这里给出一个简单的登录界面的代码,包含HTML、CSS和JavaScript部分: HTML部分: ``` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Login Page</title> <link rel="stylesheet" href="style.css"> </head> <body> <div class="container"> <h1>Login</h1> <form> <label for="username">Username</label> <input type="text" id="username" name="username"> <label for="password">Password</label> <input type="password" id="password" name="password"> <button type="submit" id="submit-btn">Submit</button> </form> </div> <script src="script.js"></script> </body> </html> ``` CSS部分: ``` * { box-sizing: border-box; } body { background-color: #f2f2f2; font-family: Arial, sans-serif; } .container { background-color: #fff; border-radius: 5px; margin: 100px auto; padding: 20px; text-align: center; width: 400px; box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); } h1 { color: #333; margin-bottom: 20px; } form label { display: block; font-size: 16px; font-weight: bold; margin-bottom: 10px; text-align: left; } form input[type="text"], form input[type="password"] { border-radius: 5px; border: 1px solid #ccc; font-size: 16px; padding: 10px; width: 100%; margin-bottom: 20px; } form button { background-color: #4CAF50; border: none; border-radius: 5px; color: white; cursor: pointer; font-size: 16px; font-weight: bold; padding: 10px 20px; transition: background-color 0.3s; } form button:hover { background-color: #3e8e41; } ``` JavaScript部分: ``` const form = document.querySelector('form'); const usernameInput = document.querySelector('#username'); const passwordInput = document.querySelector('#password'); const submitBtn = document.querySelector('#submit-btn'); form.addEventListener('submit', (e) => { e.preventDefault(); // 阻止表单默认提交行为 const username = usernameInput.value; const password = passwordInput.value; if (username === 'admin' && password === '123456') { alert('Login Success!'); // 登录成功后的操作 } else { alert('Username or Password is incorrect!'); } }); ``` 这个登录界面包含了一个表单,用户需要输入用户名和密码才能提交表单。表单提交时,会检查用户名和密码是否正确,如果正确,则提示登录成功,并执行登录成功后的操作,否则提示用户名或密码错误。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值