#!/usr/local/php7.3/bin/php
<?php
//require('config.php');
$username = `grep users_json config.php | awk '{print $3}' | sed 's/[:\"{]//g'`;
$password = `grep users_json config.php | awk '{print $4}' | sed 's/[:\"{};]//g'`;
$config = `cat config.php | sed '/users_json/d'`;
$username = trim($username);
$password = trim($password);
$password = password_hash($password, PASSWORD_DEFAULT);
$credentials = json_encode([$username => $password], true);
file_put_contents('config.php', '$users_json = \'' . $credentials . '\';' . "\n", FILE_APPEND);