-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sql
More file actions
28 lines (24 loc) · 920 Bytes
/
Copy pathinit.sql
File metadata and controls
28 lines (24 loc) · 920 Bytes
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
create database sql_injection;
use sql_injection;
CREATE TABLE users1 (
id_data INTEGER primary key AUTO_INCREMENT NOT NULL,
username varchar(255) not null,
password varchar(255) not null
);
CREATE TABLE users2 (
id_data INTEGER primary key AUTO_INCREMENT NOT NULL,
username varchar(255) not null,
password varchar(255) not null
);
INSERT INTO users1 (username, password) values ('admin', 'CIHCTF{1n_php_4nd_my5ql_y0u_n33d_t0_wr1t3_s4f3_c0d3}');
INSERT INTO users2 (username, password) values ('admin', 'CIHCTF{th3r3_ar3_m4ny_m0r3_m3th0d5_t0_d0_5ql_1nj3ct10n}');
create database secrets;
use secrets;
create table secrets (
id INTEGER primary key AUTO_INCREMENT NOT NULL,
data varchar(255) not null
);
INSERT INTO secrets (data) values ('CIHCTF{p455w0rd5_0n_d4t4b4535_5h0uld_b3_5tr0ng}');
create user 'supersecret'@'%' identified by 'wizard';
grant SELECT on secrets.* to 'supersecret'@'%';
flush privileges;