nick@artemis:~$ php -a Interactive mode enabled ",p"seeayou"soon!");n@csub.edu", "test in 3420A" php > exit nick@artemis:~$ cd public_html/3420/auth/ nick@artemis:~/public_html/3420/auth$ ls -l total 36 -rw-r--r-- 1 nick nick 623 Apr 9 14:12 api.php -rw-r--r-- 1 nick nick 2378 Apr 7 13:31 config.php -rw-r--r-- 1 nick nick 462 Apr 9 13:42 db.sql -rw-r--r-- 1 nick nick 2011 Apr 9 14:17 index.php -rw-r--r-- 1 nick nick 1411 Apr 9 13:12 login.php -rw-r--r-- 1 nick nick 324 Apr 7 14:01 logout.php -rw-r--r-- 1 nick nick 1526 Apr 29 13:14 profile.php drwxr-xrwx 2 nick nick 4096 Apr 21 14:14 profile_pics -rw-r--r-- 1 nick nick 849 Apr 9 13:12 register.php nick@artemis:~/public_html/3420/auth$ vim mail.php echo5/4iAh6/5"Bh"ew]▽ zzm cWelcome back, Toothmang~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ublic_html/3420/auth/mail.php Type=PHP [+]Line: 1 Column: 1-3/5 Byte: 1h 33%2 1/0 Byte: 7h 66%3 8h 75%mail("ntoothman@csub.edu", "test in 3420",ic_html/3420/auth/mail.php Type=PHP [+]Line: 3 Column: 43-1/42 Byte: 32h "see you soon!");blic_html/3420/auth/mail.php Type=PHP [+]Line: 3 Column: 61/60 Byte: 44h4 1/05h 80%5 6h 83%e2/1 7hc3/2 8hh4/3 9h ?>7/6 ChI8/7 Dh 9/8 Ehj10/9 Fhu11/10 Byte: 50hs2/11 1ht3/12 2h 4/13 3hs5/14 4he6/15 5hn7/16 6ht8/17 7h 9/18 8hy20/19 9ho1/20 Ahu2/21 Bh 3/22 Cha4/23 Dh 5/24 Ehm6/25 Fha7/26 Byte: 60hi8/27 1hl9/28 2h 30/29 3h😁c_html/3420/auth/mail.php Type=PHP [+]Line: 5 Column: 34-32/33 7h" 4;m"mail.php"6[New]56L,^108B-writtenx Adios, Cowboy 4;mnick@artemis:~/public_html/3420/auth$ php mail.php I just sent you a mail 😁nick@artemis:~/public_html/3420/auth$ cd nick@artemis:~/public_html/3420/auth$ nick@artemis:~/public_html/3420/auth$ cp register.php register2.php nick@artemis:~/public_html/3420/auth$ mysql auth_demo Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A BWelcome to the MariaDB monitor. Commands end with ; or \g. BBYour MariaDB connection id is 45223 Server version: 10.3.38-MariaDB-0+deb10u1 Debian 10 BBCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. BBType 'help;' or '\h' for help. Type '\c' to clear the current input statement. BMariaDB [auth_demo]> show tables; +---------------------+ | Tables_in_auth_demo | +---------------------+ | Person | | chat | | chatmessages | +---------------------+ B3 rows in set (0.000 sec) BB BMariaDB [auth_demo]> show create table Person; +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Person | CREATE TABLE `Person` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(30) DEFAULT NULL, `password` varchar(60) DEFAULT NULL, `createdon` datetime DEFAULT current_timestamp(), `profilepic` varchar(100) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `username` (`username`) ) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci `ENCRYPTION_KEY_ID`=100 | +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ B1 row in set (0.000 sec) BB (emailD!=['');_demo]> alter table Person add column email varchar(60) not null check BQuery OK, 0 rows affected (0.002 sec) BBRecords: 0 Duplicates: 0 Warnings: 0 BB BMariaDB [auth_demo]> select * from Person; +----+----------------------+--------------------------------------------------------------+---------------------+----------------------------------------------+-------+ | id | username | password | createdon | profilepic | email | +----+----------------------+--------------------------------------------------------------+---------------------+----------------------------------------------+-------+ | 7 | nick | $2y$10$PA.jxifNBtEqE2KSU9DZGOJzaXlDIWydoESNQ.1whRM1MFAGP7.lW | 2025-04-09 13:12:53 | profile_pics/7_WIN_20250421_14_03_44_Pro.jpg | | | 8 | nano | $2y$10$SFEULBbf9FbFIAfBJ6bhbelkabe3wrTIcX97jicT23up.I.UZ85bS | 2025-04-09 13:48:17 | NULL | | | 9 | tim | $2y$10$xD9iAZFSeO.QPK4xd4dw3Ot5YHkdXn4zGHbg5YEfpvm5Bf.v8K/FO | 2025-04-09 13:48:52 | NULL | | | 10 | Henry | $2y$10$PKg/khdogG0gTEFNlfnGsuUTk18/lKbI/keZsaHaYBEX9V//SjZ7W | 2025-04-09 13:48:55 | NULL | | | 11 | falrowhani | $2y$10$knIhDT3VzI8DUvKZYhTE0eAbBX8VZoYu1l8Fc8wFPtlTbkaMdrHnO | 2025-04-09 13:49:00 | NULL | | | 12 | terry | $2y$10$St1hR.Ao7LQ/FyrgPSvZwOd23bS2eftl2hnMN6DUowL3s1I9.QA.G | 2025-04-09 13:49:09 | NULL | | | 13 | fenoon | $2y$10$62HAjF5tAu.S98QTKICnNOwHgA5OCkkqLjut0WrzTNkWEZlPIvHT2 | 2025-04-09 13:49:24 | NULL | | | 14 | jsifuentes5@csub.edu | $2y$10$vTE37r1EUfYHb1sw.a6ft.trmYQergQNPnnbxYw75k/RelwYGBwHy | 2025-04-09 13:49:27 | NULL | | | 15 | Shrek | $2y$10$2U7Ja5JAuw9N9.MDmEP0ke0j7EmmuqjyxSeWCd/oR3gvwiRWq3iMu | 2025-04-09 13:49:30 | NULL | | | 16 | monique | $2y$10$mnq88jhTYYeTlpyBei9.PunLKb3ELauQ5.53dEqaiwqn8iGFBIhjS | 2025-04-09 13:49:35 | NULL | | | 17 | yessica | $2y$10$RUnfXx/MWe3mfhFsj3uUFuNl6vvc/sXDDKimmWAGFJW74iFO/UWwO | 2025-04-09 13:49:49 | NULL | | | 18 | George | $2y$10$RJk7yVCvpqtBFkJ3uye65.xpWE.TIIg0JYKKDP0uYPFUjVThGgWhW | 2025-04-09 13:49:52 | NULL | | | 19 | Donkey | $2y$10$iOm1S7AfwL.ioee61GkR0.W0g.Pg9k5cMYirVzKH/3mgpWHGddOqu | 2025-04-09 13:51:23 | NULL | | | 20 | USA | $2y$10$Stl16ImqC1CZR2dVwNux.OsfubNrZPSmW0ABTSaOZGJn39nzM083u | 2025-04-09 13:51:53 | NULL | | | 21 | notnick | $2y$10$1D8OKQwwB54eh6Ovu.sjM.N8OrcDG.Py2c0JQaoCeKHRD1LOZddYG | 2025-04-09 13:58:22 | NULL | | | 22 | Bdarghali@csub.edu | $2y$10$u7grdGeLAXAYDm9NENqSsOfs61tICtoYkiHtMjQrGsaafo8/0ZTd. | 2025-04-09 14:09:35 | NULL | | | 23 | banjo | $2y$10$Kn9GosV1UZNRdsHuoPAcNucvxTK1cX6x4LoUFK.qUyMwCB6JjY0fy | 2025-04-09 14:20:26 | NULL | | +----+----------------------+--------------------------------------------------------------+---------------------+----------------------------------------------+-------+ B17 rows in set (0.000 sec) BB (varchar(60))notenull checkt(evarchar(60)anotcnullncheckl(emvarchar(60)onotunullhcheck (emavarchar(60) not null check (emaivarchar(60) not null check (emaila varchar(60) not null check (emailp varchar(60) not null check (emaip varchar(60) not null check (emar varchar(60) not null check (emo varchar(60) not null check (ev varchar(60) not null check (varchar(60) not null check (v varchar(60) not null check (e varchar(60) not null check d varchar(60) not null checknot null checknot null check not null check (not null check (enot null check (emnot null check (emanot null check (emainot null check (emailnot null check (email not null check (email !not null check (email != '');i not null check (email != '');n not null check (email !t not null check (email not null check (emailnot null check (email default 0; BQuery OK, 0 rows affected (0.002 sec) BBRecords: 0 Duplicates: 0 Warnings: 0 BB BMariaDB [auth_demo]> describe Person; +------------+--------------+------+-----+---------------------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------+--------------+------+-----+---------------------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | username | varchar(30) | YES | UNI | NULL | | | password | varchar(60) | YES | | NULL | | | createdon | datetime | YES | | current_timestamp() | | | profilepic | varchar(100) | YES | | NULL | | | email | varchar(60) | NO | | NULL | | | approved | int(11) | NO | | 0 | | +------------+--------------+------+-----+---------------------+----------------+ B7 rows in set (0.001 sec) BB BMariaDB [auth_demo]> update Person set approved = 1; ERROR 4025 (23000): CONSTRAINT `Person.email` failed for `auth_demo`.`Person` BBMariaDB [auth_demo]> update Person set email = "notreal@mail.com";; BQuery OK, 17 rows affected (0.001 sec) BBRows matched: 17 Changed: 17 Warnings: 0 BB BMariaDB [auth_demo]> update Person set approved"=o1;eal@mail.com"; BQuery OK, 17 rows affected (0.001 sec) BBRows matched: 17 Changed: 17 Warnings: 0 BB alteritanotrnulludefaultu0;codepprovedtintpnotenull1default 0; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'not null default 0' at line 1 BBMariaDB [auth_demo]> alter table Person add column authcode itt null default 0; BQuery OK, 0 rows affected (0.002 sec) BBRecords: 0 Duplicates: 0 Warnings: 0 BB BMariaDB [auth_demo]> select authcode from Person; +----------+ | authcode | +----------+ | 0 | | 0 | | 0 | | 0 | | 0 | | 0 | | 0 | | 0 | | 0 | | 0 | | 0 | | 0 | | 0 | | 0 | | 0 | | 0 | | 0 | +----------+ B17 rows in set (0.000 sec) BB BMariaDB [auth_demo]> [1]+ Stopped mysql auth_demo nick@artemis:~/public_html/3420/auth$ php -a Interactive mode enabled echo rand(100000, 999999); 681282 echo>rand(100000, 999999); 972011 echo>rand(100000, 999999); 136425 echo>rand(100000, 999999); 489195 echo>rand(100000, 999999); 571972 echo>rand(100000, 999999); 609281 echo>rand(100000, 999999); 904764 php > exit nick@artemis:~/public_html/3420/auth$ fg mysql auth_demo MariaDB [auth_demo]> select username, email, approved from Person; +----------------------+------------------+----------+ | username | email | approved | +----------------------+------------------+----------+ | nick | notreal@mail.com | 1 | | nano | notreal@mail.com | 1 | | tim | notreal@mail.com | 1 | | Henry | notreal@mail.com | 1 | | falrowhani | notreal@mail.com | 1 | | terry | notreal@mail.com | 1 | | fenoon | notreal@mail.com | 1 | | jsifuentes5@csub.edu | notreal@mail.com | 1 | | Shrek | notreal@mail.com | 1 | | monique | notreal@mail.com | 1 | | yessica | notreal@mail.com | 1 | | George | notreal@mail.com | 1 | | Donkey | notreal@mail.com | 1 | | USA | notreal@mail.com | 1 | | notnick | notreal@mail.com | 1 | | Bdarghali@csub.edu | notreal@mail.com | 1 | | banjo | notreal@mail.com | 1 | +----------------------+------------------+----------+ B17 rows in set (0.000 sec) BB BMariaDB [auth_demo]> select username, email, approved from Person; +----------------------+--------------------+----------+ | username | email | approved | +----------------------+--------------------+----------+ | nick | notreal@mail.com | 1 | | nano | notreal@mail.com | 1 | | tim | notreal@mail.com | 1 | | Henry | notreal@mail.com | 1 | | falrowhani | notreal@mail.com | 1 | | terry | notreal@mail.com | 1 | | fenoon | notreal@mail.com | 1 | | jsifuentes5@csub.edu | notreal@mail.com | 1 | | Shrek | notreal@mail.com | 1 | | monique | notreal@mail.com | 1 | | yessica | notreal@mail.com | 1 | | George | notreal@mail.com | 1 | | Donkey | notreal@mail.com | 1 | | USA | notreal@mail.com | 1 | | notnick | notreal@mail.com | 1 | | Bdarghali@csub.edu | notreal@mail.com | 1 | | banjo | notreal@mail.com | 1 | | nick_auth | ntoothman@csub.edu | 0 | +----------------------+--------------------+----------+ B18 rows in set (0.000 sec) BB BMariaDB [auth_demo]> select username, email, approved,authcodeson; +----------------------+--------------------+----------+----------+ | username | email | approved | authcode | +----------------------+--------------------+----------+----------+ | nick | notreal@mail.com | 1 | 0 | | nano | notreal@mail.com | 1 | 0 | | tim | notreal@mail.com | 1 | 0 | | Henry | notreal@mail.com | 1 | 0 | | falrowhani | notreal@mail.com | 1 | 0 | | terry | notreal@mail.com | 1 | 0 | | fenoon | notreal@mail.com | 1 | 0 | | jsifuentes5@csub.edu | notreal@mail.com | 1 | 0 | | Shrek | notreal@mail.com | 1 | 0 | | monique | notreal@mail.com | 1 | 0 | | yessica | notreal@mail.com | 1 | 0 | | George | notreal@mail.com | 1 | 0 | | Donkey | notreal@mail.com | 1 | 0 | | USA | notreal@mail.com | 1 | 0 | | notnick | notreal@mail.com | 1 | 0 | | Bdarghali@csub.edu | notreal@mail.com | 1 | 0 | | banjo | notreal@mail.com | 1 | 0 | | nick_auth | ntoothman@csub.edu | 0 | 383183 | +----------------------+--------------------+----------+----------+ B18 rows in set (0.000 sec) BB BMariaDB [auth_demo]> select username, email, approved, authcode from Person; +----------------------+--------------------+----------+----------+ | username | email | approved | authcode | +----------------------+--------------------+----------+----------+ | nick | notreal@mail.com | 1 | 0 | | nano | notreal@mail.com | 1 | 0 | | tim | notreal@mail.com | 1 | 0 | | Henry | notreal@mail.com | 1 | 0 | | falrowhani | notreal@mail.com | 1 | 0 | | terry | notreal@mail.com | 1 | 0 | | fenoon | notreal@mail.com | 1 | 0 | | jsifuentes5@csub.edu | notreal@mail.com | 1 | 0 | | Shrek | notreal@mail.com | 1 | 0 | | monique | notreal@mail.com | 1 | 0 | | yessica | notreal@mail.com | 1 | 0 | | George | notreal@mail.com | 1 | 0 | | Donkey | notreal@mail.com | 1 | 0 | | USA | notreal@mail.com | 1 | 0 | | notnick | notreal@mail.com | 1 | 0 | | Bdarghali@csub.edu | notreal@mail.com | 1 | 0 | | banjo | notreal@mail.com | 1 | 0 | | nick_auth | ntoothman@csub.edu | 1 | 383183 | +----------------------+--------------------+----------+----------+ B18 rows in set (0.000 sec) BB BMariaDB [auth_demo]> select username, email, approved, authcode from Person; +----------------------+--------------------+----------+----------+ | username | email | approved | authcode | +----------------------+--------------------+----------+----------+ | nick | notreal@mail.com | 1 | 0 | | nano | notreal@mail.com | 1 | 0 | | tim | notreal@mail.com | 1 | 0 | | Henry | notreal@mail.com | 1 | 0 | | falrowhani | notreal@mail.com | 1 | 0 | | terry | notreal@mail.com | 1 | 0 | | fenoon | notreal@mail.com | 1 | 0 | | jsifuentes5@csub.edu | notreal@mail.com | 1 | 0 | | Shrek | notreal@mail.com | 1 | 0 | | monique | notreal@mail.com | 1 | 0 | | yessica | notreal@mail.com | 1 | 0 | | George | notreal@mail.com | 1 | 0 | | Donkey | notreal@mail.com | 1 | 0 | | USA | notreal@mail.com | 1 | 0 | | notnick | notreal@mail.com | 1 | 0 | | Bdarghali@csub.edu | notreal@mail.com | 1 | 0 | | banjo | notreal@mail.com | 1 | 0 | | nick_auth | ntoothman@csub.edu | 1 | 383183 | +----------------------+--------------------+----------+----------+ B18 rows in set (0.000 sec) BB BMariaDB [auth_demo]> delete fromoPersonawhereeusername = "nick_auth"; BQuery OK, 1 row affected (0.001 sec) BB BMariaDB [auth_demo]> delete from Person where username = "nick_auth"; BQuery OK, 1 row affected (0.001 sec) BB selectDusername,eemail,eapproved, authcodehfromuPerson; = "nick_auth"; +----------------------+--------------------+----------+----------+ | username | email | approved | authcode | +----------------------+--------------------+----------+----------+ | nick | notreal@mail.com | 1 | 0 | | nano | notreal@mail.com | 1 | 0 | | tim | notreal@mail.com | 1 | 0 | | Henry | notreal@mail.com | 1 | 0 | | falrowhani | notreal@mail.com | 1 | 0 | | terry | notreal@mail.com | 1 | 0 | | fenoon | notreal@mail.com | 1 | 0 | | jsifuentes5@csub.edu | notreal@mail.com | 1 | 0 | | Shrek | notreal@mail.com | 1 | 0 | | monique | notreal@mail.com | 1 | 0 | | yessica | notreal@mail.com | 1 | 0 | | George | notreal@mail.com | 1 | 0 | | Donkey | notreal@mail.com | 1 | 0 | | USA | notreal@mail.com | 1 | 0 | | notnick | notreal@mail.com | 1 | 0 | | Bdarghali@csub.edu | notreal@mail.com | 1 | 0 | | banjo | notreal@mail.com | 1 | 0 | | auth_demo | ntoothman@csub.edu | 0 | 548095 | +----------------------+--------------------+----------+----------+ B18 rows in set (0.000 sec) BB BMariaDB [auth_demo]> select username, email, approved, authcode from Person; +----------------------+--------------------+----------+----------+ | username | email | approved | authcode | +----------------------+--------------------+----------+----------+ | nick | notreal@mail.com | 1 | 0 | | nano | notreal@mail.com | 1 | 0 | | tim | notreal@mail.com | 1 | 0 | | Henry | notreal@mail.com | 1 | 0 | | falrowhani | notreal@mail.com | 1 | 0 | | terry | notreal@mail.com | 1 | 0 | | fenoon | notreal@mail.com | 1 | 0 | | jsifuentes5@csub.edu | notreal@mail.com | 1 | 0 | | Shrek | notreal@mail.com | 1 | 0 | | monique | notreal@mail.com | 1 | 0 | | yessica | notreal@mail.com | 1 | 0 | | George | notreal@mail.com | 1 | 0 | | Donkey | notreal@mail.com | 1 | 0 | | USA | notreal@mail.com | 1 | 0 | | notnick | notreal@mail.com | 1 | 0 | | Bdarghali@csub.edu | notreal@mail.com | 1 | 0 | | banjo | notreal@mail.com | 1 | 0 | | auth_demo | ntoothman@csub.edu | 1 | 548095 | +----------------------+--------------------+----------+----------+ B18 rows in set (0.000 sec) BB BMariaDB [auth_demo]> delete frommPerson where username="auth_demo"; BQuery OK, 1 row affected (0.001 sec) BB selectDusername,oemail,eapproved, authcodeafrom;Person;="auth_demo"; +----------------------+--------------------+----------+----------+ | username | email | approved | authcode | +----------------------+--------------------+----------+----------+ | nick | notreal@mail.com | 1 | 0 | | nano | notreal@mail.com | 1 | 0 | | tim | notreal@mail.com | 1 | 0 | | Henry | notreal@mail.com | 1 | 0 | | falrowhani | notreal@mail.com | 1 | 0 | | terry | notreal@mail.com | 1 | 0 | | fenoon | notreal@mail.com | 1 | 0 | | jsifuentes5@csub.edu | notreal@mail.com | 1 | 0 | | Shrek | notreal@mail.com | 1 | 0 | | monique | notreal@mail.com | 1 | 0 | | yessica | notreal@mail.com | 1 | 0 | | George | notreal@mail.com | 1 | 0 | | Donkey | notreal@mail.com | 1 | 0 | | USA | notreal@mail.com | 1 | 0 | | notnick | notreal@mail.com | 1 | 0 | | Bdarghali@csub.edu | notreal@mail.com | 1 | 0 | | banjo | notreal@mail.com | 1 | 0 | | nick_auth | ntoothman@csub.edu | 0 | 217237 | +----------------------+--------------------+----------+----------+ B18 rows in set (0.000 sec) BB BMariaDB [auth_demo]> select username, email, approved, authcode from Person; +----------------------+--------------------+----------+----------+ | username | email | approved | authcode | +----------------------+--------------------+----------+----------+ | nick | notreal@mail.com | 1 | 0 | | nano | notreal@mail.com | 1 | 0 | | tim | notreal@mail.com | 1 | 0 | | Henry | notreal@mail.com | 1 | 0 | | falrowhani | notreal@mail.com | 1 | 0 | | terry | notreal@mail.com | 1 | 0 | | fenoon | notreal@mail.com | 1 | 0 | | jsifuentes5@csub.edu | notreal@mail.com | 1 | 0 | | Shrek | notreal@mail.com | 1 | 0 | | monique | notreal@mail.com | 1 | 0 | | yessica | notreal@mail.com | 1 | 0 | | George | notreal@mail.com | 1 | 0 | | Donkey | notreal@mail.com | 1 | 0 | | USA | notreal@mail.com | 1 | 0 | | notnick | notreal@mail.com | 1 | 0 | | Bdarghali@csub.edu | notreal@mail.com | 1 | 0 | | banjo | notreal@mail.com | 1 | 0 | | nick_auth | ntoothman@csub.edu | 1 | 217237 | +----------------------+--------------------+----------+----------+ B18 rows in set (0.000 sec) BB BMariaDB [auth_demo]> exit BBye Bnick@artemis:~/public_html/3420/auth$ exit exit