Пример раскодировки на языке С++Script (Home Media Server)
string DecodeUppodText(string sData) {
char char1, char2; int i;
variant Client_codec_a = [#codec_a#];
variant Client_codec_b = [#codec_b#];
#ccomment#sData = ReplaceStr(sData, "#Trash#", ""); // Убираем мусор
#urldecodecmdcpp#
sData = ReplaceStr(sData, "\n", "");
for (i=0; i < Length(Client_codec_a); i++) {
char1 = Client_codec_b[i];
char2 = Client_codec_a[i];
sData = ReplaceStr(sData, char1, "___");
sData = ReplaceStr(sData, char2, char1);
sData = ReplaceStr(sData, "___", char2);
}
sData = HmsUtf8Decode(HmsBase64Decode(sData));
return sData;
}
///////////////////////////////////////////////////////////////////////////////
// Г Л А В Н А Я П Р О Ц Е Д У Р А //
{
ShowMessage(DecodeUppodText('#input#'));
}
string DecodeUppodTextHash(string sData) {
variant char1, char2, hash, tab_a, tab_b; int i;
hash = "0123456789WGXMHRUZID=NQVBLihbzaclmepsJxdftioYkngryTwuvihv7ec41D6GpBtXx3QJRiN5WwMf=ihngU08IuldVHosTmZz9kYL2bayE";
// Проверяем, может не нужно раскодировать (json или ссылка)
if ((Pos("{", sData)>0) || (LeftCopy(sData, 4)=="http")) return HmsUtf8Decode(sData);
#ccomment#sData = ReplaceStr(sData, "#Trash#", ""); // Убираем мусор
#urldecodecmdcpp#
sData = DecodeUppod_tr(sData, "r", "A");
hash = ReplaceStr(hash, 'ih', '\n');
if (RightCopy(sData, 1)=='!') {
sData = LeftCopy(sData, Length(sData)-1);
tab_a = ExtractWord(4, hash, '\n');
tab_b = ExtractWord(3, hash, '\n');
} else {
tab_a = ExtractWord(2, hash, '\n');
tab_b = ExtractWord(1, hash, '\n');
}
sData = ReplaceStr(sData, "\n", "");
for (i=1; i<=Length(tab_a); i++) {
char1 = Copy(tab_b, i, 1);
char2 = Copy(tab_a, i, 1);
sData = ReplaceStr(sData, char1, "___");
sData = ReplaceStr(sData, char2, char1);
sData = ReplaceStr(sData, "___", char2);
}
sData = HmsUtf8Decode(HmsBase64Decode(sData));
return sData;
}
string DecodeUppod_tr(string sData, string ch1, string ch2) {
string s = ""; int i, loc3, nLen;
if ((Copy(sData, Length(sData)-1, 1)==ch1) && (Copy(sData, 3, 1)==ch2)) {
nLen = Length(sData);
for (i=nLen; i>0; i--) s += Copy(sData, i, 1);
loc3 = Int(StrToIntDef(Copy(s, nLen-1, 2), 0)/2);
s = Copy(s, 3, nLen-5); i = loc3;
if (loc3 < Length(s)) {
while (i < Length(s)) {
s = LeftCopy(s, i) + Copy(s, i+2, 99999);
i+= loc3;
}
}
sData = s + "!";
}
return sData;
}
///////////////////////////////////////////////////////////////////////////////
// Г Л А В Н А Я П Р О Ц Е Д У Р А //
{
ShowMessage(DecodeUppodTextHash('#input#'));
}
Пример раскодировки на языке PascalScript (Home Media Server)
Function DecodeUppodText(sData: String): String;
Var
char1, char2: String; i: Integer;
Client_codec_a: Variant = [#codec_a#];
Client_codec_b: Variant = [#codec_b#];
Begin
#ccomment#sData := ReplaceStr(sData, "#Trash#", ""); // Убираем мусор
#urldecodecmdpas#
sData := ReplaceStr(sData, "\n", "");
For i:=0 to Length(Client_codec_a)-1 Do Begin
char1 := Client_codec_b[i];
char2 := Client_codec_a[i];
sData := ReplaceStr(sData, char1, "___");
sData := ReplaceStr(sData, char2, char1);
sData := ReplaceStr(sData, "___", char2);
End;
Result := HmsUtf8Decode(HmsBase64Decode(sData));
End;
///////////////////////////////////////////////////////////////////////////////
// Г Л А В Н А Я П Р О Ц Е Д У Р А //
Begin
ShowMessage(DecodeUppodText("#input#"));
End.
Function DecodeUppodTextHash(sData: String): String;
var
hash, tab_a, tab_b: string; i: Integer;
begin
hash := "0123456789WGXMHRUZID=NQVBLihbzaclmepsJxdftioYkngryTwuvihv7ec41D6GpBtXx3QJRiN5WwMf=ihngU08IuldVHosTmZz9kYL2bayE";
#ccomment#sData:= ReplaceStr(sData, "#Trash#", ""); // Убираем мусор
#urldecodecmdpas#
sData := DecodeUppod_tr(sData, 'r', 'A'); //engine/classes/flashplayer/uppod-tc.swf
hash := ReplaceStr(hash, 'ih', #13);
if RightCopy(sData, 1) = '!' then begin
sData := LeftCopy(sData, Length(sData)-1);
tab_a := ExtractWord(4, hash, #13);
tab_b := ExtractWord(3, hash, #13);
end else begin
tab_a := ExtractWord(2, hash, #13);
tab_b := ExtractWord(1, hash, #13);
end;
sData := ReplaceStr(sData, #13, "");
for i := 1 to Length(tab_a) do begin
sData := ReplaceStr(sData, tab_b[i], "___" );
sData := ReplaceStr(sData, tab_a[i], tab_b[i]);
sData := ReplaceStr(sData, "___", tab_a[i]);
end;
Result := HmsUtf8Decode(HmsBase64Decode(sData));
End;
Function DecodeUppod_tr(sData, ch1, ch2: String): String;
var
sNewData, sLoc3: string; i, n: Integer; e, iLoc3: Extended;
begin
sNewData := '';
if (sData[Length(sData)-1] = ch1) AND (sData[3] = ch2) then begin
i := Length(sData);
while (i > 0) do begin sNewData := sNewData + sData[i]; i := i - 1; end;
sData := sNewData;
sLoc3 := Copy(sData, Length(sData)-1, 2);
sData := Copy(sData, 3, Length(sData)-5);
iLoc3 := StrToFloatDef(sLoc3, 10000) / 2;
if iLoc3 < Length(sData) then begin
e := iLoc3; i := Length(sData); n := 0;
while (e <= i) do begin
sData := LeftCopy(sData, Trunc(e)) + Copy(sData, Trunc(e)+2, 10000);
e := e + iLoc3 * 1;
i := Length(sData);
n := n + 1;
end;
end;
sData := sData + '!';
end;
Result := sData;
End;
///////////////////////////////////////////////////////////////////////////////
// Г Л А В Н А Я П Р О Ц Е Д У Р А //
Begin
ShowMessage(DecodeUppodTextHash("#input#"));
End.
Пример раскодировки на языке Python
import base64
def dec(dt):
a = [#codec_a#]
b = [#codec_b#]
#pcomment#dt = dt.replace("#Trash#", "") # Remove trash
#urldecodecmd1python#
out = ''
for s in dt:
out += b[a.index(s)] if s in a else a[b.index(s)] if s in b else s
return base64.b64decode(out)
#urldecodefuncpython#
print dec('#input#')
import base64
def DecodeUppodTextHash( data ):
hash = "0123456789WGXMHRUZID=NQVBLihbzaclmepsJxdftioYkngryTwuvihv7ec41D6GpBtXx3QJRiN5WwMf=ihngU08IuldVHosTmZz9kYL2bayE"
#pcomment#data = data.replace("#Trash#", "") # Remove trash
#urldecodecmd1python#
data = DecodeUppod_tr(data, "r", "A")
data = data.replace("\n", "")
hash = hash.split('ih')
if data.endswith('!'):
data = data[:-1]
taba = hash[3]
tabb = hash[2]
else:
taba = hash[1]
tabb = hash[0]
i = 0;
while i < len(taba):
data = data.replace(tabb[i], "__" )
data = data.replace(taba[i], tabb[i])
data = data.replace("__" , taba[i])
i += 1
result = base64.b64decode(data)
return result
def DecodeUppod_tr(data, ch1, ch2):
if data[:-1].endswith(ch1) and data[2]==ch2:
srev = data[::-1] # revers string
try:
loc3 = int(float(srev[-2:]) / 2) # get number at end of string
except ValueError:
return data
srev = srev[2:-3] # get string between ch1 and ch2
if loc3 < len(srev):
i = loc3
while i < len(srev):
srev = srev[:i] + srev[i+1:] # remove char at index i
i += loc3
data = srev + "!"
return data
#urldecodefuncpython#
print(DecodeUppodTextHash('#input#'))
Пример раскодировки на языке PHP
echo DecodeUppodText('#input#');
function DecodeUppodText( $data ) {
$a = [#codec_a#];
$b = [#codec_b#];
#ccomment#$data = str_replace("#Trash#", "", $data); // Убираем мусор
#urldecodecmdphp#
for ($i=0; $i < count($a); $i++) {
$data = str_replace($b[$i], "__" , $data);
$data = str_replace($a[$i], $b[$i], $data);
$data = str_replace("__" , $a[$i], $data);
}
return base64_decode($data);
}
echo DecodeUppodTextHash('#input#');
function DecodeUppodTextHash( $data ) {
$hash = "0123456789WGXMHRUZID=NQVBLihbzaclmepsJxdftioYkngryTwuvihv7ec41D6GpBtXx3QJRiN5WwMf=ihngU08IuldVHosTmZz9kYL2bayE";
#ccomment#$data = str_replace("#Trash#", "", $data); // Убираем мусор
#urldecodecmdphp#
$data = DecodeUppod_tr($data, "r", "A");
$data = str_replace("\n", "", $data);
$harr = split('ih', $hash);
if (substr($data, -1)=='!') {
$data = substr($data, 0, -1);
$a = str_split($harr[3]);
$b = str_split($harr[2]);
} else {
$a = str_split($harr[1]);
$b = str_split($harr[0]);
}
for ($i=0; $i < count($a); $i++) {
$data = str_replace($b[$i], "__" , $data);
$data = str_replace($a[$i], $b[$i], $data);
$data = str_replace("__" , $a[$i], $data);
}
return utf8_decode(base64_decode($data));
}
function DecodeUppod_tr($data, $ch1, $ch2) {
if ((substr($data, -2, 1)==$ch1) && ($data[2]==$ch2)) {
$srev = strrev($data);
$loc3 = intval(substr($srev, -2)) / 2;
$srev = substr($srev, 2, -3); # get string between ch1 and ch2
if ($loc3 < strlen($srev)) {
$i = $loc3;
while ($i < strlen($srev)) {
$srev = substr($srev, 0, $i) . substr($srev, $i+1); # remove char at index i
$i += $loc3;
}
}
$data = $srev . "!";
}
return $data;
}
Пример раскодировки на языке JavaScript
function DecodeUppodText(data){
var a = [#codec_a#];
var b = [#codec_b#];
#ccomment#data = data.replace(new RegExp("#Trash#", 'g'), ""); // remove trash
#urldecodecmdjs#
var out = '';
for (var i = 0, len = data.length; i < len; i++) {
s = data[i];
idx = a.indexOf(s);
if (idx != -1) {
out += b[idx];
} else {
idx = b.indexOf(s);
if (idx != -1) { out += a[idx]; }
else { out += s; }
}
}
return atob(out)
}
var l = DecodeUppodText('#input#');
String.prototype.replaceAll = function(search, replacement) {
var target = this;
return target.replace(new RegExp(search, 'g'), replacement);
};
function DecodeUppodTextHash( data ) {
hash = "0123456789WGXMHRUZID=NQVBLihbzaclmepsJxdftioYkngryTwuvihv7ec41D6GpBtXx3QJRiN5WwMf=ihngU08IuldVHosTmZz9kYL2bayE";
#ccomment#data = data.replace("#Trash#", ""); // Убираем мусор
#urldecodecmdjs#
data = DecodeUppod_tr(data, "r", "A");
data = data.replace("\n", "");
harr = hash.split('ih');
if (data.substr(-1)=='!') {
data = data.substr(0, data.length-1);
a = harr[3];
b = harr[2];
} else {
a = harr[1];
b = harr[0];
}
for (i=0; i < a.length; i++) {
data = data.replaceAll(b[i], "__");
data = data.replaceAll(a[i], b[i]);
data = data.replaceAll("__", a[i]);
}
return atob(data);
}
function DecodeUppod_tr(data, ch1, ch2) {
if ((data.substr(-2, 1)==ch1) && (data[2]==ch2)) {
srev = data.split("").reverse().join("");
loc3 = parseInt(srev.substr(-2)) / 2;
srev = srev.substr(2, srev.length-5); // get string between ch1 and ch2
if (loc3 < srev.length) {
i = loc3;
while (i < srev.length) {
srev = srev.substr(0, i) + srev.substr(i+1); // remove char at index i
i += loc3;
}
}
data = srev + "!";
}
return data;
}
var l = DecodeUppodTextHash('#input#');