Skip to content

Commit

Permalink
Update createDB.php
Browse files Browse the repository at this point in the history
  • Loading branch information
wizwizdev authored Feb 5, 2024
1 parent 2bcb58b commit 8098edc
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions createDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,19 @@
PRIMARY KEY (`id`)
)");

$connection->query("INSERT INTO `admins` (`id`, `username`, `password`, `backupchannel`, `lang`) VALUES
(1, 'admin', 'admin', '-1002545458541', 'en');
$connection->query("CREATE TABLE `black_list` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`info` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
PRIMARY KEY (`id`)
)");


$characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz$#@'; // Characters to choose from for random username and password
$random_username = substr(str_shuffle($characters), 0, 15); // Generate a random 8-character username
$random_password = substr(str_shuffle($characters), 0, 15); // Generate a random 8-character password

$connection->query("INSERT INTO `admins` (`username`, `password`, `backupchannel`, `lang`) VALUES
('$random_username', '$random_password', '-1002545458541', 'en');
");


Expand Down

0 comments on commit 8098edc

Please sign in to comment.