美文网首页JavaScript
吾爱破解,神经猫源码解析.

吾爱破解,神经猫源码解析.

作者: 任然_c117 | 来源:发表于2019-04-09 14:08 被阅读0次

吾爱破解神经猫偶然碰见的,感觉蛮有趣就顺便扒到本地试试看。

首先拿到页面源码 Ctrl+u,然后格式化一下

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>

<HEAD>
    <TITLE>您所访问的页面可能已经被删除 - 吾爱破解论坛</TITLE>
    <META content="404错误" name="keywords">
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <STYLE type="text/css">
        BODY {
            MARGIN: 0px;
            BACKGROUND-COLOR: #000000
        }

        BODY {
            COLOR: #ffffff;
            FONT-FAMILY: Comic Sans MS;
            background-image: url(https://www.52pojie.cn/bg.jpg);
            background-repeat: repeat;
            background-color: #D9D9D9;
        }

        TD {
            COLOR: #ffffff;
            FONT-FAMILY: Comic Sans MS
        }

        TH {
            COLOR: #ffffff;
            FONT-FAMILY: Comic Sans MS
        }

        .style6 {
            FONT-WEIGHT: bold;
            FONT-SIZE: 12px
        }

        .style7 {
            FONT-SIZE: 18px
        }

        .style8 {
            FONT-SIZE: 12px
        }

        .style9 {
            FONT-SIZE: 24px;
            FONT-FAMILY: "楷体_GB2312"
        }

        .style10 {
            COLOR: #ff0000
        }

        body,
        td,
        th {
            color: #666;
        }

        a {
            font-family: Arial, Helvetica, sans-serif;
            font-size: 18px;
            color: #666;
        }

        a:link {
            text-decoration: none;
            color: #06F;
        }

        a:visited {
            text-decoration: none;
            color: #09F;
        }

        a:hover {
            text-decoration: none;
            color: #09F;
        }

        a:active {
            text-decoration: none;
            color: #09F;
        }
    </STYLE>
    <META content="MSHTML 6.00.2900.3354" name="GENERATOR">
</HEAD>

<BODY>
    <DIV align="center">
        <P align="left"></P>
        <P></P>
        <font size="3" face="黑体">吾爱破解论坛友情提醒您:您所访问的页面不存在或者已删除, <a
                href="https://www.52pojie.cn/thread-143136-1-1.html"><b>查看版规 </b></a>。</font>
        <P></P>
        <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><ins class="adsbygoogle"
            style="display:inline-block;width:970px;height:90px" data-ad-client="ca-pub-2139103486038198"
            data-ad-slot="6131515813"></ins>
        <script>
            (adsbygoogle = window.adsbygoogle || []).push({})
        </script>
        <P></P>
        <font size="3" face="黑体">游戏《圈小猫》</font>
        <P></P>
        <script src="https://down.52pojie.cn/.fancyindex/js/phaser.min.js"></script>
        <script src="https://down.52pojie.cn/.fancyindex/js/catch-the-cat.js"></script>
        <div id="catch-the-cat"></div>
        <script>
            window.game = new CatchTheCatGame({
                w: 11,
                h: 11,
                r: 20,
                backgroundColor: 16777215,
                parent: "catch-the-cat",
                statusBarAlign: "center",
                credit: "www.52pojie.cn"
            })
        </script>
    </DIV>
    <DIV class="style6" align="center">
        <P class="style7"></P>
        <P class="style8"><SPAN class="style10"><img src="https://www.52pojie.cn/home.png" width="30" height="30"
                    alt="点击返回主页"> <a href="Https://www.52pojie.cn" title="返回首页" target="_new">返回首页</a></SPAN></P>
        <P class="style8">www.52pojie.cn</P>
        <div id="loadad"></div>
        <script type="text/javascript" src="//cbjs.baidu.com/js/m.js"></script>
        <script type="text/javascript">
            BAIDU_CLB_fillSlotAsync("u2651821", "loadad")
        </script>
    </DIV>
    <script>
        var _hmt = _hmt || [];
        ! function () {
            var e = document.createElement("script");
            e.src = "https://hm.baidu.com/hm.js?46d556462595ed05e05f009cdafff31a";
            var t = document.getElementsByTagName("script")[0];
            t.parentNode.insertBefore(e, t)
        }()
    </script>
</BODY>

</HTML>

首先去除掉没用的东西


image.png

↑ google 广告你不会需要它吧?

image.png
image.png

↑ 百度的广告就更不需要了

现在我们的界面是这样的


image.png

猫去哪了 - -,不急我们先解决报错。
可以看到报错时在phaser.min.js这个文件里,我们先格式化后引入本地。
再次查看报错信息。


现在我们发现在18806行,出现了跨域的错误。
image.png
首先找到这个位置,通过调试发现变量o就是出现跨域问题的图片。

然后我们来解决跨域问题。

在处理图片函数前加上这句代码


image.png

然后神奇的事情发生了

image.png
这里解释一下为什么要加"data:," 这个表示空图片的base64编码格式。
小猫出来了,试着运行了下。功能均正常可用。
最后成品图片 image.png

游戏页面源码
myphaser.js 文件太大就不放出来了,大家参照上面加一下。

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
    <TITLE>您所访问的页面可能已经被删除 - 吾爱破解论坛</TITLE>
    <META content="404错误" name="keywords">
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <STYLE type="text/css">
        BODY {
            COLOR: #ffffff;
            FONT-FAMILY: Comic Sans MS;
            background-image: url(https://www.52pojie.cn/bg.jpg);
            background-repeat: repeat;
            background-color: #D9D9D9;
        }
    </STYLE>
    <META content="MSHTML 6.00.2900.3354" name="GENERATOR">
</HEAD>
<BODY>
    <DIV align="center">
        <font size="3" face="黑体">游戏《圈小猫》</font>
        <P></P>
        <script src="./myphaser.js"></script>
        <script src="https://down.52pojie.cn/.fancyindex/js/catch-the-cat.js"></script>
        <div id="catch-the-cat"></div>
        <script>
            window.game = new CatchTheCatGame({
                w: 11,
                h: 11,
                r: 20,
                backgroundColor: 16777215,
                parent: "catch-the-cat",
                statusBarAlign: "center",
                credit: "任然"
            })
        </script>
    </DIV>
</BODY>
</HTML>

本文章仅供学习、参考!
原创不易,转载请注明出处。

相关文章

网友评论

    本文标题:吾爱破解,神经猫源码解析.

    本文链接:https://www.haomeiwen.com/subject/rbsbiqtx.html