Last active
December 18, 2018 19:24
-
-
Save chezsick/aee943eab972af1b707b52044e8281ab to your computer and use it in GitHub Desktop.
Generate Parameter Encoding VideoCrypt And Nagravision Syster For CryptImage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$tp = $argv[1]; | |
$demi = boolval($argv[2]); | |
$n = 0; | |
while ($o = fread(STDIN,4)) | |
{ | |
$offset1 = ord($o[0]); | |
$increment1 = (intval(ord($o[1])/2)*2)+1; | |
if ($demi) | |
{ | |
$offset2 = ord($o[2]); | |
$increment2 = (intval(ord($o[3])/2)*2)+1; | |
} | |
else | |
{ | |
$offset2 = $offset1; | |
$increment2 = $increment1; | |
} | |
$n = $n + 1; | |
echo "frame ".$n.";".$tp.";".$offset1.";".$increment1.";".$offset2.";".$increment2."\n"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$start = $argv[1]; | |
$end = $argv[2]; | |
while ($o = fread(STDIN,3)) | |
{ | |
$a = ((ord($o[2])*pow(256,2))+(ord($o[1])*pow(256,1))+(ord($o[0])*pow(256,0)))+1; | |
echo $a.";".$start.";".$end."\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment