Exploit database

GH-de2318f62d43bced52bf249576e6dec9

hoangrealer/cve-2023-27216

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2023-27216

1 source

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files47

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

_DSL-3782_A1_EU_1.01_07282016.bin.extracted/squashfs-root/boaroot/html/js/New_GUI/GridPanel.js

JavaScript · 2,487 bytes
if (!Array.prototype.indexOf) {
	Array.prototype.indexOf = function(b) {
		var a = this.length >>> 0;
		var c = Number(arguments[1]) || 0;
		c = (c < 0) ? Math.ceil(c) : Math.floor(c);
		if (c < 0) {
			c += a
		}
		for (; c < a; c++) {
			if (c in this && this[c] === b) {
				return c
			}
		}
		return - 1
	}
}
var GridPanel = function(c, a, b) {
	this.container;
	this.rows = c;
	this.columns = a;
	this.rowHeight = 86;
	this.columnWidth = 188;
	this.instanceArray = new Array();
	this.dataArray = new Array();
	if (typeof(b) == "string") {
		this.container = document.getElementById(b)
	} else {
		if (typeof(b) == "object") {
			this.container = b
		}
	}
};
GridPanel.prototype.isFull = function() {
	if (this.dataArray.length < this.instanceArray.length) {
		return false
	} else {
		return true
	}
};
GridPanel.prototype.existData = function(a) {
	if (this.dataArray.indexOf(a) == -1) {
		return false
	} else {
		return true
	}
};
GridPanel.prototype.nextCellPosition = function() {
	var a = -1;
	var e = -1;
	var c = this.dataArray.length;
	if (c <= this.instanceArray.length) {
		var b = this.instanceArray[c].element;
		var d = getElementXY(b);
		a = d.x;
		e = d.y
	}
	return {
		x: a,
		y: e
	}
};
GridPanel.prototype.addInstance = function(b) {
	if (this.instanceArray.length < this.rows * this.columns) {
		var f = this.instanceArray.length;
		var e = f % this.rows;
		var d = Math.floor(f / this.rows);
		var a = d * this.columnWidth;
		var g = e * this.rowHeight;
		var c = b.element;
		c.style.position = "absolute";
		c.style.top = g + "px";
		c.style.left = a + "px";
		this.container.appendChild(c);
		this.instanceArray.push(b);
		b.hide();
		b.parent = this
	}
};
GridPanel.prototype.addData = function(a) {
	if (this.dataArray.length < this.instanceArray.length) {
		var b = this.dataArray.length;
		var c = this.instanceArray[b];
		c.setDeviceData(a);
		this.dataArray.push(a);
		c.show()
	}
};
GridPanel.prototype.removeData = function(b) {
	var a = this.dataArray.indexOf(b);
	if (a != -1) {
		this.dataArray.splice(a, 1);
		this.updateInstance()
	}
};
GridPanel.prototype.updateInstance = function() {
	for (var a = 0; a < this.instanceArray.length; a++) {
		var c = this.instanceArray[a];
		if (this.dataArray[a] != undefined) {
			var b = this.dataArray[a];
			c.setDeviceData(b);
			c.show()
		} else {
			c.removeDeviceData();
			c.hide()
		}
	}
};