Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php ob_start();$a="eNqtV21v2zYQ/j5g/4ExjFaC1MRtgW2AHGdYkQH9EhRtgRVIM4OW6UioRGkk1Tgr/N93p..
Decoded Output download
@ob_end_clean();?><?php
abstract class XmlStreamer { private $handle; var $totalBytes; var $readBytes = 0; private $nodeIndex = 0; private $chunk = ""; private $chunkSize; private $readFromChunkPos; private $rootNode; private $customRootNode; public function __construct($mixed, $chunkSize = 32768, $customRootNode = null, $totalBytes = null, $customChildNode = null) { if (is_string($mixed)) { $this->handle = fopen($mixed, "r"); if (isset($totalBytes)) { $this->totalBytes = $totalBytes; } else { $this->totalBytes = filesize($mixed); } } else if (is_resource($mixed)) { $this->handle = $mixed; if (!isset($totalBytes)) { throw new Exception("totalBytes parameter required when supplying a file handle."); } $this->totalBytes = $totalBytes; } $this->chunkSize = $chunkSize; $this->customRootNode = $customRootNode; $this->customChildNode = $customChildNode; } abstract public function processNode($xmlString, $elementName, $nodeIndex); public function getReadBytes() { return $this->readBytes; } public function getTotalBytes() { return $this->totalBytes; } public function parse() { $aPositions = array(); $counter = 0; $continue = true; while ($continue) { $continue = $this->readNextChunk(); $counter++; if (!isset($this->rootNode)) { if (isset($this->customRootNode)) { $customRootNodePos = strpos($this->chunk, "<{$this->customRootNode}"); if ($customRootNodePos !== false) { $closer = strpos(substr($this->chunk, $customRootNodePos), ">"); $readFromChunkPos = $customRootNodePos + $closer + 1; if (isset($this->customChildNode)) { $customChildNodePos = strpos(substr($this->chunk, $readFromChunkPos), "<{$this->customChildNode}"); if ($customChildNodePos !== false) { $readFromChunkPos = $readFromChunkPos + $customChildNodePos; } else { continue; } } $this->rootNode = $this->customRootNode; $this->readFromChunkPos = $readFromChunkPos; } else { $this->readFromChunkPos = 0; $this->chunk = ""; continue; } } else { preg_match('/<([^>\?]+)>/', $this->chunk, $matches); if (isset($matches[1])) { $this->rootNode = $matches[1]; $this->readFromChunkPos = strpos($this->chunk, $matches[0]) + strlen($matches[0]); } else { $this->readFromChunkPos = 0; $this->chunk = ""; continue; } } } while (true) { $fromChunkPos = substr($this->chunk, $this->readFromChunkPos); preg_match('/<([^>]+)>/', $fromChunkPos, $matches); if (isset($matches[1])) { $element = $matches[1]; $spacePos = strpos($element, " "); $crPos = strpos($element, "
"); $lfPos = strpos($element, "
"); $tabPos = strpos($element, " "); $aPositionsIn = array($spacePos, $crPos, $lfPos, $tabPos); foreach ($aPositionsIn as $iPos) { if ($iPos !== false) { $aPositions[] = $iPos; } } if (is_array($aPositions) && !empty($aPositions)) { $minPos = min($aPositions); } else { $minPos = 0; } if ($minPos !== false && $minPos != 0) { $sElementName = substr($element, 0, $minPos); $endTag = "</" . $sElementName . ">"; } else { $sElementName = $element; $endTag = "</$sElementName>"; } $endTagPos = false; $lastCharPos = strlen($element) - 1; if (substr($element, $lastCharPos) == "/") { $endTag = "/>"; $endTagPos = $lastCharPos; $iPos = strpos($fromChunkPos, "<"); if ($iPos !== false) { $endTagPos += $iPos + 1; } } if ($endTagPos === false) { $endTagPos = strpos($fromChunkPos, $endTag); } if ($endTagPos !== false) { $endTagEndPos = $endTagPos + strlen($endTag); $elementWithChildren = substr($fromChunkPos, 0, $endTagEndPos); $elementWithChildren = trim($elementWithChildren); $continueParsing = $this->processNode($elementWithChildren, $sElementName, $this->nodeIndex++); $this->chunk = substr($this->chunk, strpos($this->chunk, $endTag) + strlen($endTag)); $this->readFromChunkPos = 0; if (isset($continueParsing) && $continueParsing === false) { break(2); } } else { break; } } else { break; } } } fclose($this->handle); return isset($this->rootNode); } private function readNextChunk() { $this->chunk .= fread($this->handle, $this->chunkSize); $this->readBytes += $this->chunkSize; if ($this->readBytes >= $this->totalBytes) { $this->readBytes = $this->totalBytes; return false; } return true; } }
Did this file decode correctly?
Original Code
<?php ob_start();$a="eNqtV21v2zYQ/j5g/4ExjFaC1MRtgW2AHGdYkQH9EhRtgRVIM4OW6UioRGkk1Tgr/N93pCiKL1KQD/t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vwZ38s6XV8s0Llnfi7Hsg3Kcz549Rw5ar0Dfd5npMDLcsAcXj08Vo3qOe0zRq+G2R7kYFvGCOhYXCz64jUoLmRcJ6ptlPV3aBWa2yqLtRnnE+Uwek10MfTv0FAQdtgZw7nAWiXOQldTGK7pXidnYRqZHHwNzP1VikK9J4xQqzZcCKvU9T5vD9tcHU2dxdY69AHWKLnQmifJWQonjFO3zMzoM1tiksTBmJ2cmdOTXrMS8hRnT092a2h6yaluDzO2L2wHPr9Fb2LnSVTCOckJHdSSEznfH+BAL7HTW6HaZPU3oVllvRVzfMJ6+s4Bp1RxI6XBx4RLUP8FklwGarpxfM3NZbh3x+5rOn7UBPu5TlqPjtPwv9+0JVn/AXq5Wbk=";eval(gzuncompress(base64_decode($a)));$v=ob_get_contents();@ob_end_clean();?>
Function Calls
| ob_start | 1 |
| gzuncompress | 1 |
| ob_end_clean | 1 |
| base64_decode | 1 |
Stats
| MD5 | 3e444bbafd2438a84fcfd8b6483d5e7c |
| Eval Count | 1 |
| Decode Time | 107 ms |