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 /* typy VideoMotion = 0 VideoLoss = 1 VideoBlind = 2 */ function getA..

Decoded Output download

<br><BR>

Did this file decode correctly?

Original Code


<?php
/* typy
	VideoMotion = 0
	VideoLoss = 1
	VideoBlind = 2

*/

function getAction($id) {
	if ($id == 0)
		return 'VideoMotion';
	elseif ($id == 1) 
		return  'VideoLoss';
	elseif($id == 2) 
		return  'VideoBlind';
	return false;

	
}


echo '<br><BR>';
$ip=$_GET['ip'];
for($z=0;$z<3;$z++) {
	$link='http://rtsp:[email protected].'.$ip.':5445/cgi-bin/eventManager.cgi?action=getEventIndexes&code='.getAction($z);
	$zawartosc_zdalnej_strony = file_get_contents($link);
	for($i=0;$i<8;$i++){
		$j=$i+1;
		if($i==7) {
			$poczatek = strpos($zawartosc_zdalnej_strony, "channels[7]")+12;
			$koniec = strpos($zawartosc_zdalnej_strony,  "channels[7]")+13;
		}
		else {
			$poczatek = strpos($zawartosc_zdalnej_strony, "channels[$i]")+12;
			$koniec = strpos($zawartosc_zdalnej_strony,  "channels[$j]");
		}

		$szukany_fragment = substr($zawartosc_zdalnej_strony, $poczatek, 
		$koniec-$poczatek); 
		$res[$z][$i]=$szukany_fragment;
	}
}


for($z=0;$z<3;$z++) {
	for($i=0;$i<8;$i++){
		echo 'Typ=',$z,', Kanal=',$i,', Wartosc=',$res[$z][$i],'<br>';
	}
}
?>

Function Calls

strpos 2
substr 1
getAction 1
file_get_contents 1

Variables

$i 0
$j 1
$z 0
$id 0
$ip None
$link http://rtsp:[email protected]:5445/cgi-bin/eventManage..
$koniec 0
$poczatek 12
$szukany_fragment
$zawartosc_zdalnej_strony

Stats

MD5 27b821096dbddcb803ea4b0816ffc6e5
Eval Count 0
Decode Time 175 ms