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.) ()

※ 仕様変更がありました。[与える引数の計算式が変わりました::関数は変更なし] (for spec changed. [the calculation formula of the argument has changed.]) ()

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

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

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

<?php

/**
 * Openload Link Generator by neko.ga (18/06/03)
 *
 * @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(&$x, $e) {
        $n = function($e) use (&$x) {
            while (--$e) {
                array_push($x, array_shift($x));
            }
        };
        $n(++$e);
    })($_0x9495, 191);

    $_0x5949 = function($x, $e = null) use ($_0x9495) {
        $x = hexdec($x);
        $n = $_0x9495[$x];
        return $n;
    };

    $_0x45ae41 = [
        'xXM' => function($e, $n) {
            return $e < $n;
        },
        'jLa' => function($e, $n) {
            return $e * $n;
        },
        'aZP' => function($e, $n) {
            return $e + $n;
        },
        'dOD' => function($e, $n, $_) {
            return $e($n, $_);
        },
        'Poy' => function($e, $n) {
            return in_array($e, $n);
        },
        'dkF' => function($e, $n) {
            return $e($n);
        },
        'tjf' => function($e, $n) {
            return $e * $n;
        },
        'HIZ' => function($e, $n) {
            return $e ^ $n;
        },
        'WyX' => function($e, $n) {
            return $e ^ $n;
        },
        'faz' => function($e, $n) {
            return $e ^ $n;
        },
        'Gcy' => function($e, $n) {
            return $e % $n;
        },
        'ucs' => function($e, $n) {
            return $e < $n;
        },
        'dhh' => function($e, $n) {
            return $e * $n;
        },
        'pQu' => function($e, $n) {
            return $e / $n;
        },
        'eMz' => function($e, $n) {
            return $e << $n;
        },
        'ZBD' => function($e, $n) {
            return $e & $n;
        },
        'Lnk' => function($e, $n) {
            return $e != $n;
        },
        'DYl' => function($e, $n) {
            return $e >> $n;
        },
        'WOa' => function($e, $n) {
            return in_array($e, $n);
        },
        'gzw' => function($e, $n) {
            return $e < $n;
        },
        'cBV' => function($e, $n) {
            return $e << $n;
        },
        'Zft' => function($e, $n) {
            return $e & $n;
        },
        'tcV' => function($e, $n) {
            return $e >= $n;
        },
        'EAk' => function($e, $n, $_) {
            return $e($n, $_);
        },
        'QHb' => function($e, $n) {
            return $e >= $n;
        }
    ];

    $_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)???) / ((int)??? - 8);

→ ??? is variable. (string value::not integer)

引数の int2 は、「_1x4bfb36=parseInt('???',8)-???」の数式の計算後の数値。(「???」は可変)(数値にみえるが処理する値は文字列)

php:

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

→ ??? is variable. (string value::not integer)

返り値は、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: June 03 2018