Exploit databaseDownload repository ZIP
GH-67cfe9274a84b2ab15965e26c8740df4
ctlyz123/cve-2020-17496
Sources for CVE-2020-17496
4 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files69
ctlyz123/cve-2020-17496Revision d621d414aa56
- ↑..Parent directory
- cron/
- datastore/
- paymentapi/
- xml/
- adminfunctions.php
- adminfunctions_help.php
- adminfunctions_language.php
- adminfunctions_navpanel.php
- adminfunctions_options.php
- adminfunctions_prefix.php
- adminfunctions_product.php
- adminfunctions_profilefield.php
- adminfunctions_template.php
- adminfunctions_user.php
- cacert.pem
- class_bbcode.php
- class_bbcode_alt.php
- class_bitfield_builder.php
- class_bootstrap.php
- class_core.php
- class_dbalter.php
- class_diff.php
- class_filesystemxml_replace.php
- class_filesystemxml_template.php
- class_friendly_url.php
- class_humanverify.php
- class_humanverify_disabled.php
- class_humanverify_image.php
- class_humanverify_question.php
- class_humanverify_recaptcha2.php
- class_merge.php
- class_paid_subscription.php
- class_rss_poster.php
- class_sigparser.php
- class_sigparser_char.php
- class_sitemap.php
- class_stylevar.php
- class_taggablecontent.php
- class_template_merge.php
- class_template_parser.php
- class_upgrade_product.php
- class_upload.php
- class_userchangelog.php
- class_xml_dom.php
- config.php
- config.php.new
- config_cli.php.new
- functions.php
- functions_banning.php
- functions_calendar.php
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
html/core/includes/class_xml_dom.php
PHP · 8,614 bytes<?php if (!defined('VB_ENTRY')) die('Access denied.');
/*========================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.6.0
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2020 MH Sub I, LLC dba vBulletin. All Rights Reserved. # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| ###################################################################### ||
\*========================================================================*/
// #############################################################################
class vB_DomDocument
{
var $node_list = array();
function __construct($node_list)
{
$this->node_list = $node_list;
}
function _find_first_node(&$node_list, $type = 'tag')
{
foreach ($node_list AS $key)
{
$node =& $this->node_list["$key"];
if ($node['type'] == $type)
{
return $key;
}
}
return null;
}
function _find_children($key)
{
if (is_array($this->node_list["$key"]['children']))
{
$return = $this->node_list["$key"]['children'];
foreach ($this->node_list["$key"]['children'] AS $child)
{
$children = $this->_find_children($child);
if (is_array($children))
{
$return += $children;
}
}
return $return;
}
else
{
return null;
}
}
function documentElement()
{
$start = reset($this->node_list);
if (($key = $this->_find_first_node($start['children'], 'tag')) !== null)
{
return new vB_DomNode($this->node_list["$key"], $key, $this);
}
else
{
return null;
}
}
function childNodes()
{
$node_list = array();
$start = reset($this->node_list);
foreach ($start['children'] AS $child)
{
switch ($this->node_list["$child"]['type'])
{
case 'curly':
{
$node_list[] = new vB_CurlyNode($this->node_list["$child"], $this);
}
break;
case 'tag':
default:
{
$node_list[] = new vB_DomNode($this->node_list["$child"], $child, $this);
}
break;
}
}
return $node_list;
}
function getElementById($id)
{
foreach ($this->node_list AS $key => $node)
{
if (is_array($node['attributes']) AND !empty($node['attributes']['id']) AND $node['attributes']['id'] == $id)
{
return new vB_DomNode($node, $key, $this);
}
}
return null;
}
function getElementsByTagName($tagname)
{
$node_list = array();
if ($tagname == '*')
{
foreach ($this->node_list AS $key => $node)
{
if ($node['type'] == 'tag')
{
$node_list[] = new vB_DomNode($node, $key, $this);
}
}
}
else
{
foreach ($this->node_list AS $key => $node)
{
if ($node['type'] == 'tag' AND $node['value'] == $tagname)
{
$node_list[] = new vB_DomNode($node, $key, $this);
}
}
}
return $node_list;
}
}
class vB_DomNode implements vB_Xml_Node
{
private $internal_id = null;
public $type = '';
public $value = '';
public $attributes = null;
private $parent = null;
private $children = array();
private $document = null;
public function __construct($node, $internal_id, vB_DomDocument $document)
{
$this->internal_id = $internal_id;
$this->type = $node['type'];
if (isset($node['value']))
{
$this->value = $node['value'];
}
if (isset($node['attributes']))
{
$this->attributes = $node['attributes'];
}
if (isset($node['parent']))
{
$this->parent = $node['parent'];
}
if (!empty($node['children']))
{
$this->children = $node['children'];
}
$this->document = $document;
}
function childNodes()
{
$node_list = array();
foreach ($this->children AS $child)
{
switch ($this->document->node_list["$child"]['type'])
{
case 'curly':
{
$node_list[] = new vB_CurlyNode($this->document->node_list["$child"], $this->document);
}
break;
case 'tag':
default:
{
$node_list[] = new vB_DomNode($this->document->node_list["$child"], $child, $this->document);
}
break;
}
}
return $node_list;
}
function simplifiedChildNodes()
{
$simplified = array();
// look for children in the form of <tag>text</tag>
foreach ($this->children AS $childid)
{
$child_node = $this->document->node_list["$childid"];
if ($child_node['type'] == 'tag' AND !empty($child_node['children']) AND count($child_node['children']) == 1)
{
// find a child of this node which only has one child itself...
$grandchildid = reset($child_node['children']);
$grandchild_node = $this->document->node_list["$grandchildid"];
if ($grandchild_node['type'] == 'text')
{
// ... and that child is a text node
$simplified["$child_node[value]"] = $grandchild_node['value'];
}
}
}
return $simplified;
}
function firstChild()
{
if (!empty($this->children))
{
$first = reset($this->children);
return new vB_DomNode($this->document->node_list["$first"], $first, $this->document);
}
else
{
return null;
}
}
function lastChild()
{
if (!empty($this->children))
{
$last = end($this->children);
return new vB_DomNode($this->document->node_list["$last"], $last, $this->document);
}
else
{
return null;
}
}
function parentNode()
{
if ($this->parent !== null)
{
return new vB_DomNode($this->document->node_list[$this->parent], $this->parent, $this->document);
}
else
{
return null;
}
}
function previousSibling()
{
if ($this->parent !== null)
{
$siblings = $this->document->node_list[$this->parent]['children'];
$previous = null;
$found = false;
foreach ($siblings AS $sibling)
{
if ($sibling == $this->internal_id)
{
$found = true;
break;
}
$previous = $sibling;
}
if ($found AND $previous)
{
return new vB_DomNode($this->document->node_list["$previous"], $previous, $this->document);
}
}
return null;
}
function nextSibling()
{
if ($this->parent !== null)
{
$siblings = $this->document->node_list[$this->parent]['children'];
$previous = null;
$next = null;
$found = false;
foreach ($siblings AS $sibling)
{
if ($previous == $this->internal_id)
{
$found = true;
$next = $sibling;
break;
}
$previous = $sibling;
}
if ($found AND $next)
{
return new vB_DomNode($this->document->node_list["$next"], $next, $this->document);
}
}
return null;
}
function getElementsByTagName($tagname)
{
$children = $this->document->_find_children($this->internal_id);
$node_list = array();
if ($tagname == '*')
{
foreach ($children AS $key)
{
$node = $this->document->node_list["$key"];
if ($node['type'] == 'tag')
{
$node_list[] = new vB_DomNode($node, $key, $this->document);
}
}
}
else
{
foreach ($children AS $key)
{
$node = $this->document->node_list["$key"];
if ($node['type'] == 'tag' AND $node['value'] == $tagname)
{
$node_list[] = new vB_DomNode($node, $key, $this->document);
}
}
}
return $node_list;
}
}
interface vB_Xml_Node
{
}
class vB_CurlyNode implements vB_Xml_Node
{
public $type = '';
public $value = '';
public $attributes = null;
private $parent = null;
public function __construct($node, vB_DomDocument $document = null)
{
$this->type = $node['type'];
if (isset($node['value']))
{
$this->value = $node['value'];
}
if (isset($node['attributes']))
{
$this->attributes = $node['attributes'];
}
if (isset($node['parent']))
{
$this->parent = $node['parent'];
}
if (!empty($this->attributes))
{
$this->attributes = $this->parseAttributes();
}
}
private function parseAttributes()
{
$attributes = array();
foreach ($this->attributes AS $attribute)
{
if (is_array($attribute) AND $attribute['type'] == 'curly')
{
$attribute['value'] = $attribute['tag_name'];
$attributes[] = new vB_CurlyNode($attribute);
}
else
{
$attributes[] = $attribute;
}
}
return $attributes;
}
}
/*=========================================================================*\
|| #######################################################################
|| # NulleD By - vBSupport.org
|| # CVS: $RCSfile$ - $Revision: 99787 $
|| #######################################################################
\*=========================================================================*/