!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/node-red/node_modules/command-line-tool/lib/   drwxr-xr-x
Free 13.23 GB of 57.97 GB (22.82%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     command-line-tool.js (2.51 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
'use strict'
const arrayify = require('array-back')
const ansi = require('ansi-escape-sequences')

/**
 * Some conventional operations used in command-line tools.
 *
 * @module command-line-tool
 * @typicalname tool
 * @example
 * const tool = require('command-line-tool')
 */
 exports.stop = stop
 exports.printError = printError
 exports.printOutput = printOutput
 exports.halt = halt
 exports.getCli = getCli

/**
 * Print the supplied messages then stop the process (no exit code).
 *
 * @param [message] {string|string[]} - One or more messages to be written to stderr before exiting. May contain `ansi.format` markup.
 * @static
 */
function stop (message) {
  printOutput(message)
  process.exit(0)
}

/**
 * Prints one or more strings in red to stderr.
 *
 * @param {string | string[]} - input message(s)
 * @static
 */
function printError (message) {
  arrayify(message).forEach(function (msg) {
    console.error(ansi.format(msg, 'red'))
  })
}

/**
 * Prints one or more strings to stdout. Catches unwanted EPIPE error.
 *
 * @param {string | string[]} - input message(s)
 * @static
 */
function printOutput (message) {
  process.stdout.on('error', err => {
    if (err.code === 'EPIPE') {
      /* no big deal */
    }
  })
  arrayify(message).forEach(function (msg) {
    console.log(ansi.format(msg))
  })
}

/**
 * Stop the process with an error message.
 *
 * @param [err] {Error} - the error instance
 * @param [options] {object}
 * @param [options.exitCode] {number} - defaults to 1
 * @param [options.stack] {boolean} - defaults to false
 * @static
 */
function halt (err, options) {
  options = Object.assign({ exitCode: 1 }, options)
  if (err) {
    if (err.code === 'EPIPE') {
      process.exit(0) /* no big deal */
    } else {
      const t = require('typical')
      printError(t.isString(err) ? err : options.stack ? err.stack : err.message, options)
    }
  }
  process.exit(options.exitCode)
}

/**
 * Parse the command-line options.
 * @param definitions {OptionDefinitions[]} - to be passed to command-line-args
 * @param [usageSections] {section[]} - to be passed to command-line-usage
 * @param [argv] {string[]} - If supplied, this `argv` array is parsed instead of `process.argv`.
 * @returns {object}
 * @static
 */
function getCli (definitions, usageSections, argv) {
  const commandLineArgs = require('command-line-args')
  const commandLineUsage = require('command-line-usage')
  const usage = usageSections ? commandLineUsage(usageSections) : ''
  const options = commandLineArgs(definitions, argv)
  return { options, usage }
}

:: 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.0292 ]--