!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)

/usr/local/lib/node_modules/strapi/node_modules/extsprintf/test/   drwxr-xr-x
Free 13.19 GB of 57.97 GB (22.75%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     tst.invalid.js (2.43 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/*
 * tst.invalid.js: tests invalid invocations
 */

var mod_assert = require('assert');
var mod_extsprintf = require('../lib/extsprintf');
var mod_path = require('path');
var sprintf = mod_extsprintf.sprintf;

var testcases = [ {
    'name': 'missing all arguments',
    'args': [],
    'errmsg': /first argument must be a format string$/
}, {
    'name': 'missing argument for format specifier (first char and specifier)',
    'args': [ '%s' ],
    'errmsg': new RegExp(
        'format string "%s": conversion specifier "%s" at character 1 ' +
	'has no matching argument \\(too few arguments passed\\)')
}, {
    'name': 'missing argument for format specifier (later in string)',
    'args': [ 'hello %s world %13d', 'big' ],
    'errmsg': new RegExp(
        'format string "hello %s world %13d": conversion specifier "%13d" at ' +
	'character 16 has no matching argument \\(too few arguments passed\\)')
}, {
    'name': 'printing null as string',
    'args': [ '%d cookies %3s', 15, null ],
    'errmsg': new RegExp(
        'format string "%d cookies %3s": conversion specifier "%3s" at ' +
	'character 12 attempted to print undefined or null as a string ' +
	'\\(argument 3 to sprintf\\)')
}, {
    'name': 'printing undefined as string',
    'args': [ '%d cookies %3s ah %d', 15, undefined, 7 ],
    'errmsg': new RegExp(
        'format string "%d cookies %3s ah %d": conversion specifier "%3s" at ' +
	'character 12 attempted to print undefined or null as a string ' +
	'\\(argument 3 to sprintf\\)')
}, {
    'name': 'unsupported format character',
    'args': [ 'do not use %X', 13 ],
    'errmsg': new RegExp(
        'format string "do not use %X": conversion ' +
	'specifier "%X" at character 12 is not supported$')
}, {
    'name': 'unsupported flags',
    'args': [ '%#x', 13 ],
    'errmsg': new RegExp(
        'format string "%#x": conversion ' +
	'specifier "%#x" at character 1 uses unsupported flags$')
} ];

function main(verbose) {
	testcases.forEach(function (tc) {
		var error;
		console.error('test case: %s', tc.name);
		if (verbose) {
			console.error('    args:   %s', JSON.stringify(tc.args));
		}
		mod_assert.throws(function () {
			try {
				sprintf.apply(null, tc.args);
			} catch (ex) {
				error = ex;
				throw (ex);
			}
		}, tc.errmsg);

		if (verbose && error) {
			console.error('    error:  %s', error.message);
		}
	});

	console.log('%s tests passed', mod_path.basename(__filename));
}

main(process.argv.length > 2 && process.argv[2] == '-v');

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

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