ROOTPLOIT
Server: Apache
System: Linux node6122.myfcloud.com 6.14.3-x86_64-linode168 #1 SMP PREEMPT_DYNAMIC Mon Apr 21 19:47:55 EDT 2025 x86_64
User: bashacomputer (1004)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/local/bin/knex-migrator-reset
#!/usr/bin/env node

var program = require('commander');
var utils = require('../lib/utils');

var logging = require('../logging');
var knexMigrator;

utils.getKnexMigrator({path: process.cwd()})
    .then(function (KnexMigrator) {
        program
            .option('--mgpath <path>')
            .option('--force')
            .parse(process.argv);

        try {
            knexMigrator = new KnexMigrator({knexMigratorFilePath: program.mgpath, executedFromShell: true});
        } catch (err) {
            logging.error(err);
            process.exit(1);
        }

        return knexMigrator.reset({force: program.force})
            .then(function () {
                logging.info('Finished database reset!');
            });
    })
    .catch(function (err) {
        logging.error(err);
        process.exit(1);
    });