diff --git a/changeAdminPass.txt b/changeAdminPass.txt index cc8f476..442d72e 100644 --- a/changeAdminPass.txt +++ b/changeAdminPass.txt @@ -1 +1,2 @@ -update password_delivery set key = md5('your new password') where id = 0; +insert into mypasswd.password_delivery (code) values MD5('1234'); +update password_delivery set code = md5('your new password') where id = 0; diff --git a/index.php b/index.php old mode 100644 new mode 100755 index b68fa5d..0034328 --- a/index.php +++ b/index.php @@ -17,18 +17,18 @@
Your password is:
'; @@ -57,7 +57,7 @@ print '
'.$MyPassword.''; - } else { + } else { print ''.$MyPassword.''; } print '
Do not hit reload on your browser. This URL is one-time use and will not show your passsword again.
'; diff --git a/notes.txt b/notes.txt new file mode 100644 index 0000000..536cecf --- /dev/null +++ b/notes.txt @@ -0,0 +1,22 @@ +# Create MySQL tables: +CREATE TABLE pwtool.mypasswd ( + password VARCHAR(256) NULL, + `code` varchar(32) NOT NULL, + retrieved_ip varchar(39) NULL, + retireved_time TIMESTAMP NULL, + id BIGINT UNSIGNED auto_increment NOT NULL, + CONSTRAINT mypasswd_PK PRIMARY KEY (id) +) +ENGINE=InnoDB +DEFAULT CHARSET=utf8mb4 +COLLATE=utf8mb4_bin; +CREATE INDEX mypasswd_id_IDX USING BTREE ON pwtool.mypasswd (id); + + +# create user: +CREATE USER 'pwtool'@'%'; +ALTER USER 'pwtool'@'%' +IDENTIFIED BY 'BaVYtU9YqMyrp4qi' ; +GRANT Insert ON pwtool.mypasswd TO 'pwtool'@'%'; +GRANT Select ON pwtool.mypasswd TO 'pwtool'@'%'; +GRANT Update ON pwtool.mypasswd TO 'pwtool'@'%';