Openload Link Generator (PHP)

インフォメーション

Auto Link Generator for openload.co」で使用しているPHPのソースコードの一部(関数)を公開しています。

we are publishing a part of PHP source code used by API.

ソースコード

※ 仕様変更がありました。 (for spec changed.) (17/09/19)

※ 仕様変更がありました。 (for spec changed.) (18/01/05)

※ 一部の変数名の誤植を修正しました。 (fix for typo of variable name.) (18/02/13)

<?php
/**
 * Openload Link Generator by neko.ga (18/02/13)
 *
 * @param string $hash
 * @param integer $int1
 * @param integer $int2
 *
 * @return string Accessible ur ID (a part of link)
 */
function openload_link_generator($hash, $int1, $int2) {

        $_0x9495 = ['Zft', 'pow', 'tcV', 'EAk', 'QHb', 'charCodeAt', '11|12|13|0|14|3|2|9|16|1|4|8|5|6|15|10|7', 'split', 'xXM', 'length', 'jLa', 'substring', 'aZP', 'dOD', 'Poy', 'write', 'push', 'dkF', 'text', 'tjf', 'HIZ', 'WyX', 'faz', 'Gcy', 'ucs', '2|0|5|4|3|1', 'dhh', 'pQu', 'eMz', 'ZBD', 'Lnk', 'fromCharCode', 'DYl', '4|3|0|5|6|2|1', 'WOa', 'gzw', 'cBV'];

        (function(&$_0x1f55fe, $_0x45ae62) {
            $_0x3d4039 = function($_0x32de24) use (&$_0x1f55fe) {
                while (--$_0x32de24) {
                    array_push($_0x1f55fe, array_shift($_0x1f55fe));
                }
            };
            $_0x3d4039(++$_0x45ae62);
        })($_0x9495, 191);

        $_0x5949 = function($_0x1f55fe) use ($_0x9495) {
            $_0x1f55fe = hexdec($_0x1f55fe);
            $_0x3d4039 = $_0x9495[$_0x1f55fe];
            return $_0x3d4039;
        };

        $_0x45ae41 = [
            'xXM' => function($_0x3f842b, $_0x6062d8) {
                return $_0x3f842b < $_0x6062d8;
            },
            'jLa' => function($_0x38f439, $_0x457b87) {
                return $_0x38f439 * $_0x457b87;
            },
            'aZP' => function($_0x56acea, $_0x37f246) {
                return $_0x56acea + $_0x37f246;
            },
            'dOD' => function($_0x44ea34, $_0xe1a069, $_0x49022f) {
                return $_0x44ea34($_0xe1a069, $_0x49022f);
            },
            'Poy' => function($_0x49e0ac, $_0x204c53) {
                return in_array($_0x49e0ac, $_0x204c53);
            },
            'dkF' => function($_0x48d105, $_0x930083) {
                return $_0x48d105($_0x930083);
            },
            'tjf' => function($_0x5d6e96, $_0x41b58f) {
                return $_0x5d6e96 * $_0x41b58f;
            },
            'HIZ' => function($_0x2f473c, $_0xef0da5) {
                return $_0x2f473c ^ $_0xef0da5;
            },
            'WyX' => function($_0x4fa9eb, $_0x4fc60d) {
                return $_0x4fa9eb ^ $_0x4fc60d;
            },
            'faz' => function($_0x1d25ce, $_0x2d0418) {
                return $_0x1d25ce ^ $_0x2d0418;
            },
            'Gcy' => function($_0x5cef79, $_0x59b5a3) {
                return $_0x5cef79 % $_0x59b5a3;
            },
            'ucs' => function($_0x3e1dda, $_0x192d4c) {
                return $_0x3e1dda < $_0x192d4c;
            },
            'dhh' => function($_0x240c12, $_0x5b7c4c) {
                return $_0x240c12 * $_0x5b7c4c;
            },
            'pQu' => function($_0x45e457, $_0x88979d) {
                return $_0x45e457 / $_0x88979d;
            },
            'eMz' => function($_0x5a668a, $_0x2c7bd1) {
                return $_0x5a668a << $_0x2c7bd1;
            },
            'ZBD' => function($_0x5ba232, $_0x312024) {
                return $_0x5ba232 & $_0x312024;
            },
            'Lnk' => function($_0x3aa5f8, $_0x3172ef) {
                return $_0x3aa5f8 != $_0x3172ef;
            },
            'DYl' => function($_0x144a2e, $_0x309a9f) {
                return $_0x144a2e >> $_0x309a9f;
            },
            'WOa' => function($_0x39dbf0, $_0x42e9f7) {
                return in_array($_0x39dbf0, $_0x42e9f7);
            },
            'gzw' => function($_0x21a7ef, $_0x482441) {
                return $_0x21a7ef < $_0x482441;
            },
            'cBV' => function($_0x47d3f1, $_0x4bebf9) {
                return $_0x47d3f1 << $_0x4bebf9;
            },
            'Zft' => function($_0x3fbb19, $_0x2691b7) {
                return $_0x3fbb19 & $_0x2691b7;
            },
            'tcV' => function($_0x524ea6, $_0x3d4c00) {
                return $_0x524ea6 >= $_0x3d4c00;
            },
            'EAk' => function($_0xcaad79, $_0x4bf3dc, $_0x1666a8) {
                return $_0xcaad79($_0x4bf3dc, $_0x1666a8);
            },
            'QHb' => function($_0x177c9e, $_0x33caaa) {
                return $_0x177c9e >= $_0x33caaa;
            }
        ];

        $_0x23d67d = preg_split('/\|/', $_0x5949('0x0'));
        $_0x436e75 = 0;
        while (1) {
            if (!isset($_0x23d67d[$_0x436e75])) {
                break;
            }
            switch ($_0x23d67d[$_0x436e75++]) {
                case '0':
                    $_0x1bf6e5 = '';
                    continue 2;

                case '1':
                    for ($i = 0; $_0x45ae41[$_0x5949('0x2')]($i, strlen($_0x439a49)); $i += 8) {
                        $_0x41e0ff = $_0x45ae41[$_0x5949('0x4')]($i, 8);
                        $_0x40b427 = substr($_0x439a49, $i, $_0x45ae41[$_0x5949('0x6')]($i, 8) - $i);
                        $_0x577716 = $_0x45ae41[$_0x5949('0x7')]('intval', $_0x40b427, 16);
                            array_push($_0x31f4aa['ke'], $_0x577716);
                    }
                    continue 2;

                case '2':
                    $_0x439a49 = substr($_0x5d72cd, 0, $_0x41e0ff);
                    continue 2;

                case '3':
                    $_0xccbe62 = strlen($_0x5d72cd);
                    continue 2;

                case '4':
                    $_0x3d7b02 = $_0x31f4aa['ke'];
                    continue 2;

                case '5':
                    $_0x5d72cd = substr($_0x5d72cd, $_0x41e0ff);
                    continue 2;

                case '6':
                    $_0x439a49 = 0;
                    continue 2;

                case '7':
                    $returnval = $_0x1bf6e5;
                    continue 2;

                case '8':
                    $_0x41e0ff = $_0x45ae41[$_0x5949('0x4')](9, 8);
                    continue 2;

                case '9':
                    $_0x3d7b02 = [];
                    continue 2;

                case '10':
                    while ($_0x45ae41[$_0x5949('0x2')]($_0x439a49, strlen($_0x5d72cd))) {
                        $_0x138ee5 = preg_split('/\|/', '5|8|0|12|13|9|10|4|11|6|3|1|7|2');
                        $_0x2d6ce4 = 0;
                        while (1) {
                            if (!isset($_0x138ee5[$_0x2d6ce4])) {
                                break;
                            }
                            switch ($_0x138ee5[$_0x2d6ce4++]) {
                                case '0':
                                    $_0x896767 = 0;
                                    continue 2;

                                case '1':
                                    $_0x2de433 = $_0x45ae41[$_0x5949('0x6')]($_0x45ae41[$_0x5949('0xd')]($_0x5eb93a, 2), $_0x37c346);
                                    continue 2;

                                case '2':
                                    $_0x145894 += 1;
                                    continue 2;

                                case '3':
                                    $_0x30725e = $_0x45ae41[$_0x5949('0xe')]($_0x45ae41[$_0x5949('0xf')]($_0x30725e, $int1), $_1x4bfb36);
                                    continue 2;

                                case '4':
                                    $_0x59ce16 = 681741804;
                                    continue 2;

                                case '5':
                                    $_0x5eb93a = 64;
                                    continue 2;

                                case '6':
                                    $_0x30725e = $_0x45ae41[$_0x5949('0x10')]($_0x896767, $_0x3d7b02[$_0x45ae41[$_0x5949('0x11')]($_0x145894, 9)]);
                                    continue 2;

                                case '7':
                                    for ($i = 0; $_0x45ae41[$_0x5949('0x12')]($i, 4); $i++) {
                                        $_0x444853 = preg_split('/\|/', $_0x5949('0x13'));
                                        $_0x3d6c21 = 0;
                                        while (1) {
                                            if (!isset($_0x444853[$_0x3d6c21])) {
                                                break;
                                            }
                                            switch ($_0x444853[$_0x3d6c21++]) {
                                                case '0':
                                                    $_0x1a0e90 = $_0x45ae41[$_0x5949('0x14')]($_0x45ae41[$_0x5949('0x15')]($_0x41e0ff, 9), $i);
                                                    continue 2;

                                                case '1':
                                                    $_0x2de433 = $_0x45ae41[$_0x5949('0x16')]($_0x2de433, $_0x45ae41[$_0x5949('0x15')]($_0x41e0ff, 9));
                                                    continue 2;

                                                case '2':
                                                    $_0x1a9381 = $_0x45ae41[$_0x5949('0x17')]($_0x30725e, $_0x2de433);
                                                    continue 2;

                                                case '3':
                                                    if ($_0x45ae41[$_0x5949('0x18')]($_0x3fa834, '$')) $_0x1bf6e5 .= $_0x3fa834;
                                                    continue 2;

                                                case '4':
                                                    $_0x3fa834 = chr($_0x1a9381 - 1);
                                                    continue 2;

                                                case '5':
                                                    $_0x1a9381 = $_0x45ae41[$_0x5949('0x1a')]($_0x1a9381, $_0x1a0e90);
                                                    continue 2;
                                            }
                                            break;
                                        }
                                    }
                                    continue 2;

                                case '8':
                                    $_0x37c346 = 127;
                                    continue 2;

                                case '9':
                                    $_0x31f4aa = [
                                        'mm' => 128,
                                        'xx' => 63
                                    ];
                                    continue 2;

                                case '10':
                                    do {
                                        $_0x1fb52e = preg_split('/\|/', $_0x5949('0x1b')); $_0x204cab = 0;
                                        while (1) {
                                            if (!isset($_0x1fb52e[$_0x204cab])) {
                                                break;
                                            }
                                            switch ($_0x1fb52e[$_0x204cab++]) {
                                                case '0':
                                                    $_0x439a49++;
                                                    continue 2;

                                                case '1':
                                                    $_0x1a873b += 6;
                                                    continue 2;

                                                case '2':
                                                    if ($_0x45ae41[$_0x5949('0x1d')]($_0x1a873b, $_0x45ae41[$_0x5949('0x14')](6, 5))) {
                                                        $_0x332549 = $_0x45ae41[$_0x5949('0x17')]($_0x3d9c8e, $_0x31f4aa['xx']);
                                                        $_0x896767 += $_0x45ae41[$_0x5949('0x1e')]($_0x332549, $_0x1a873b);
                                                    } else {
                                                        $_0x332549 = $_0x45ae41[$_0x5949('0x1f')]($_0x3d9c8e, $_0x31f4aa['xx']);
                                                        $_0x896767 += $_0x45ae41[$_0x5949('0x14')]($_0x332549, pow(2, $_0x1a873b));
                                                    }
                                                    continue 2;

                                                case '3':
                                                    $_0x1fa71e = substr($_0x5d72cd, $_0x439a49, $_0x45ae41[$_0x5949('0x6')]($_0x439a49, 2) - $_0x439a49);
                                                    continue 2;

                                                case '4':
                                                    if ($_0x45ae41[$_0x5949('0x21')]($_0x45ae41[$_0x5949('0x6')]($_0x439a49, 1), strlen($_0x5d72cd))) {
                                                        $_0x5eb93a = 143;
                                                    }
                                                    continue 2;

                                                case '5':
                                                    $_0x439a49++;
                                                    continue 2;

                                                case '6':
                                                    $_0x3d9c8e = $_0x45ae41[$_0x5949('0x22')]('intval', $_0x1fa71e, 16);
                                                    continue 2;
                                            }
                                            break;
                                        }
                                    } while ($_0x45ae41[$_0x5949('0x23')]($_0x3d9c8e, $_0x5eb93a));
                                    continue 2;

                                case '11':
                                    $_1x4bfb36 = $int2;
                                    continue 2;

                                case '12':
                                    $_0x1a873b = 0;
                                    continue 2;

                                case '13':
                                    $_0x3d9c8e = 0;
                                    continue 2;
                            }
                            break;
                        }
                    }
                    continue 2;

                case '11':
                    $_0x531f91 = $hash;
                    continue 2;

                case '12':
                    $_0x5d72cd = ord($_0x531f91);
                    continue 2;

                case '13':
                    $_0x5d72cd = $_0x531f91;
                    continue 2;

                case '14':
                    $_0x41e0ff = $_0x45ae41[$_0x5949('0x14')](9, 8);
                    continue 2;

                case '15':
                    $_0x145894 = 0;
                    continue 2;

                case '16':
                    $_0x31f4aa = [
                        'k' => $_0x439a49,
                        'ke' => []
                    ];
                    continue 2;
            }
            break;
        }
        return $returnval;
}

レビュー

上記のコードはopenloadのHTMLページソースに含まれる、ストリーム用のURLを生成しているjavascriptコード(顔文字の暗号[aaencode]で挟まれたスクリプト)をphpに移植したものです。

the above code is a source ported from js (openload-video-link) to php.

引数の hash は、spanタグで囲まれたながい長~い(100文字以上ありそうなhex)文字列。

hash : span's plaintext (a long hex string)

引数の int1 は、「_0x30725e,(parseInt('???',8)-???+0x4)/(???-0x8)」のカンマから後の数式の計算後の数値。(「???」は可変の数値)

php:

$int1 = (intval(???, 8) - (int)??? + 4) / ((int)??? - 8);

→ ??? is variable.

引数の int2 は、「var _1x4bfb36=parseInt('???',8)-???」の数式の計算後の数値。(「???」は可変の数値)

php:

$int2 = intval(???, 8) - (int)???;

→ ??? is variable.

返り値は、ISP共通でアクセス可能なファイルのIDを返します。このIDを使って最終的に「~/stream/<ID>」からダウンロード可能なURLを得ることができます。

the return value is the ID of stream url, and u can get the download link from [https://openload.co/stream/<ID>].

注意

このページに掲載されているPHPコードはオープンソースです。

all PHP codes on this page are open source.

plz let us know if u modify the code and publish it. 🙂


last update: February 13 2018