当前位置:网站首页>调用JShaman的Web API接口,实现JS代码加密。
调用JShaman的Web API接口,实现JS代码加密。
2022-07-27 00:14:00 【w2sfot】
在NodeJS中,调用JShaman的Web API接口,实现JS代码加密。
同样的方法,也可把该功能集成到自己的产品或项目中,让自己也具备JS加密功能。
调用JShaman接口的源码非常简单:
/*调用JShaman.com Web API ,实现JS代码加密*/
//JS代码,测试用
var js_code = `
var a=1;
var b=true;
console.log(a,b);
`;
//JShaman.com提交代码接口地址
var jshaman_url = "http://www.jshaman.com:800/submit_js_code/";
//同步请求库
var request = require("sync-request");
console.log(js_code);
//发起POST请求
var res = request("POST",jshaman_url,{
json:{
"js_code":js_code, //js代码
"vip_code":"free" //
}
});
//返回结果:含加密的js代码
var json_res = JSON.parse(res.getBody('utf8'));
//输出
console.log(json_res);JShaman是专业的JavaScript源代码保护服务提供商。
这里使用的是JShaman的免费加密接口。JShaman也有收费的商业接口,对JS代码的加密效果更好。
更进一步而言,JShaman还支持本地化部署,比如可以部署在内网或是自己的产品环境中。
边栏推荐
猜你喜欢

Function stack frame explanation

面试突击68:为什么 TCP 需要 3 次握手?

Getlocation:fail the API need to be declared in the requiredprivateinfo field in app.json

Why do people like to rank things
![[Li Kou] 1859. Sort sentences](/img/0c/f7f698ad0052d07be98e5f888d7da9.png)
[Li Kou] 1859. Sort sentences

Okaleido Tiger 7.27日登录Binance NFT,首轮已获不俗成绩

Database knowledge required by testers: MySQL common syntax

八皇后编程实现

JMeter interface test, quickly complete a single interface request

Plato farm is expected to further expand its ecosystem through elephant swap
随机推荐
Scheduling of processes
LeetCode->二分查找打卡(三)
The XML format of labelimg annotation is converted to yolov5
LabVIEW中编程更改进程的优先级
static关键字
Static keyword
次轮Okaleido Tiger即将登录Binance NFT,引发社区热议
快速排序(Quick sort)
Redis installation and operation (Linux)
Goatgui invites you to attend a machine learning seminar
消息队列学习 -- 概念
[redis] five common data types
Okaleido tiger logged into binance NFT on July 27, and has achieved good results in the first round
How to do the system security test? Let's talk about it in detail
信息收集-端口扫描工具-Nmap使用说明
Time module: acquisition and mutual transformation of timestamp, structured time and formatted time
iNFTnews | “流量+体验”白衬e数字时装节引领数字时装新变迁
Interview shock 68: why does TCP need three handshakes?
ansible系列之:不收集主机信息 gather_facts: False
Debezium series: pull historical data based on debezium offset to ensure that data is not lost