!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/.nvm/versions/node/v18.17.1/lib/node_modules/pm2/node_modules/needle/test/   drwxr-xr-x
Free 23.51 GB of 117.98 GB (19.93%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     querystring_spec.js (2.27 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
var should    = require('should'),
	  stringify = require('../lib/querystring').build;

describe('stringify', function() {

	describe('with null', function() {

		it('throws', function() {
			(function() {
				var res = stringify(null);
			}).should.throw();
		})

	})

	describe('with a number', function() {

		it('throws', function() {
			(function() {
				var res = stringify(100);
			}).should.throw();
		})

	})

	describe('with a string', function() {

		describe('that is empty', function() {

			it('throws', function() {
				(function() {
					var res = stringify('');
				}).should.throw();
			})

		})

		describe('that doesnt contain an equal sign', function() {

			it('throws', function() {
				(function() {
					var res = stringify('boomshagalaga');
				}).should.throw();
			})

		})

		describe('that contains an equal sign', function() {

			it('works', function() {
				var res = stringify('hello=123');
				res.should.eql('hello=123');
			})

		})

	})

	describe('with an array', function() {

		describe('with key val objects', function() {

			it('works', function() {
				var res = stringify([ {foo: 'bar'} ]);
				res.should.eql('foo=bar');
			})

		})

		describe('where all elements are strings with an equal sign', function() {

			it('works', function() {
				var res = stringify([ 'bar=123', 'quux=' ]);
				res.should.eql('bar=123&quux=');
			})

		})

		describe('with random words', function() {

			it('throws', function() {
				(function() {
					var res = stringify(['hello', 'there']);
				}).should.throw();
			})

		})

		describe('with integers', function() {

			it('throws', function() {
				(function() {
					var res = stringify([123, 432]);
				}).should.throw();
			})

		})

	})

	describe('with an object', function() {

			it('works', function() {
				var res = stringify({ test: 100 });
				res.should.eql('test=100');
			})

			describe('with object where val is an array', function() {

				it('works', function() {
					var res = stringify({ foo: ['bar', 'baz'] });
					res.should.eql('foo[]=bar&foo[]=baz');
				})

			})

			describe('with object where val is an array of key val objects', function() {

				it('works', function() {
					var res = stringify({ foo: [{'1': 'bar'}, {'2': 'baz'}] });
					res.should.eql('foo[][1]=bar&foo[][2]=baz');
				})

			})

	})

})

:: 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.003 ]--