龙空技术网

[源码]JS加密:调用JShaman接口,实现JS代码加密

JShaman 259

前言:

而今看官们对“js加密器”可能比较关心,同学们都需要知道一些“js加密器”的相关知识。那么小编在网上汇集了一些关于“js加密器””的相关知识,希望我们能喜欢,兄弟们快快来学习一下吧!

源码如下,保存为html即可直接使用。

免费版:

    <html>        <head>            <script src=";></script>        </head>        <body>            <h2>混淆加密JS代码,防止分析、复制、盗用</h2>            <input type="button" value="调用JShaman.com接口,混淆加密JS代码" onclick="common_example()" style="font-size: 30px;"><br>            <br>            <script>                function common_example(){                    $.ajax({                        url: ";,                        dataType: "json",                        data : {                            //JS代码                            "js_code": `                                function get_copyright(){                                    var domain = "jshaman.com";                                    var from_year = 2017;                                    var copyright = "(c)" + from_year + "-" + (new Date).getFullYear() + "," + domain;                                    return copyright;                                }                                console.log(get_copyright());                            `,                            //VIP码                            "vip_code": "free"                        },                        method: "POST",                                            }).done(function (res) {                        //返回结果                        if(res.status == 0){                            document.getElementById("common_code_result").innerHTML = res.content;                        }else{                            alert(res.message)                        }                    }).fail(function(){                        alert("发生了未知错误!");                    });                }            </script>            <div id="common_code_result" style="font-size: 9px;">                function get_copyright(){<br>                    var domain = "jshaman.com";<br>                    var from_year = 2017;<br>                    var copyright = "(c)" + from_year + "-" + (new Date).getFullYear() + "," + domain;<br>                    return copyright;<br>                }<br>                console.log(get_copyright());<br>            </div>        </body>    </html>    

免费版能配置参数,下面是购买VIP后的版本,可自定义加密参数:

    <html>        <head>            <script src=";></script>        </head>        <body>            <h2>混淆加密JS代码,防止分析、复制、盗用</h2>            <input type="button" value="调用JShaman.com接口,混淆加密JS代码" onclick="common_example()" style="font-size: 30px;"><br>            <br>            <script>                function common_example(){                    //参数配置                    var common_config = {                        //压缩                        "compact": true,                        //平展控制流                        "controlFlowFlattening": true,                        //字符串阵列化                        "stringArray": true,                        //字符串加密                        "stringArrayEncoding": true,                        //禁用命令行输出                        "disableConsoleOutput": true,                        //反浏览器调试                        "debugProtection": true,                        //时间限定                        "time_range":false,                        //域名锁定                        "domainLock": [],                        //保留字                        "reservedNames": []                    }                    $.ajax({                        url: ";,                        dataType: "json",                        data : {                            //JS代码                            "js_code": `                                function get_copyright(){                                    var domain = "jshaman.com";                                    var from_year = 2017;                                    var copyright = "(c)" + from_year + "-" + (new Date).getFullYear() + "," + domain;                                    return copyright;                                }                                console.log(get_copyright());                            `,                            //参数                            "config": common_config,                            //VIP码                            "vip_code": "js9v-ux7a-xnbf"                        },                        method: "POST",                                            }).done(function (res) {                        //返回结果                        if(res.status == 0){                            document.getElementById("common_code_result").innerHTML = res.content;                        }else{                            alert(res.message)                        }                    }).fail(function(){                        alert("发生了未知错误!");                    });                }            </script>            <div id="common_code_result" style="font-size: 9px;">                function get_copyright(){<br>                    var domain = "jshaman.com";<br>                    var from_year = 2017;<br>                    var copyright = "(c)" + from_year + "-" + (new Date).getFullYear() + "," + domain;<br>                    return copyright;<br>                }<br>                console.log(get_copyright());<br>            </div>        </body>    </html>    

标签: #js加密器