Uname:Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64

Base Dir : /var/www/html

User : gavin


403WebShell
403Webshell
Server IP : 68.183.124.220  /  Your IP : 216.73.217.137
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : gavin ( 1000)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/gavin/workspace/happymandarin/node_modules/busboy/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/gavin/workspace/happymandarin/node_modules/busboy/test/test-utils-decoder.js
var Decoder = require('../lib/utils').Decoder;

var path = require('path'),
    assert = require('assert');

var group = path.basename(__filename, '.js') + '/';

[
  { source: ['Hello world'],
    expected: 'Hello world',
    what: 'No encoded bytes'
  },
  { source: ['Hello%20world'],
    expected: 'Hello world',
    what: 'One full encoded byte'
  },
  { source: ['Hello%20world%21'],
    expected: 'Hello world!',
    what: 'Two full encoded bytes'
  },
  { source: ['Hello%', '20world'],
    expected: 'Hello world',
    what: 'One full encoded byte split #1'
  },
  { source: ['Hello%2', '0world'],
    expected: 'Hello world',
    what: 'One full encoded byte split #2'
  },
  { source: ['Hello%20', 'world'],
    expected: 'Hello world',
    what: 'One full encoded byte (concat)'
  },
  { source: ['Hello%2Qworld'],
    expected: 'Hello%2Qworld',
    what: 'Malformed encoded byte #1'
  },
  { source: ['Hello%world'],
    expected: 'Hello%world',
    what: 'Malformed encoded byte #2'
  },
  { source: ['Hello+world'],
    expected: 'Hello world',
    what: 'Plus to space'
  },
  { source: ['Hello+world%21'],
    expected: 'Hello world!',
    what: 'Plus and encoded byte'
  },
  { source: ['5%2B5%3D10'],
    expected: '5+5=10',
    what: 'Encoded plus'
  },
  { source: ['5+%2B+5+%3D+10'],
    expected: '5 + 5 = 10',
    what: 'Spaces and encoded plus'
  },
].forEach(function(v) {
  var dec = new Decoder(), result = '';
  v.source.forEach(function(s) {
    result += dec.write(s);
  });
  var msg = '[' + group + v.what + ']: decoded string mismatch.\n'
            + 'Saw: ' + result + '\n'
            + 'Expected: ' + v.expected;
  assert.deepEqual(result, v.expected, msg);
});

Youez - 2016 - github.com/yon3zu
LinuXploit