如何反编译 cocos creator 生成 的jsc文件/反编译jsc文件(一)

jsc文件 是 Mozilla 将 javascript/js 文件编译成的一种二进制格式


cocos creator 目前最大的优势就是可以使用 javascript/js 语言, 调试可以使用成熟的js调试器如谷歌浏览器等


为了研究其他游戏的一个实时更新功能是怎么实现的, 下载了其游戏APK, 解压后发现都是 jsc文件, 便产生了反编译的想法


查了些资料, 发现是可行的, 除了变量信息没有保存, 函数 类信息都完整可以反编译出来


先展示下研究成果

lb.GamePreload = {
	res: {
		mahjong_bg0: "res/lwlc_game_common/bgs/main_bg0.jpg",
		mahjong_bg1: "res/lwlc_game_common/bgs/main_bg1.jpg",
		mahjong_bg2: "res/lwlc_game_common/bgs/main_bg2.jpg",
		mahjong_timer: "res/lwlc_game_common/mahjong/GameBase/tb_timer_num1.png",
		mahjong_score: "res/lwlc_game_common/mahjong/dialog/ba_num.png"
	},
	frameCacheList: ["res/lwlc_game_common/mahjong/common", "res/lwlc_game_common/mahjong/effect/effect", "res/lwlc_game_common/mahjong/tiles", "res/lwlc_game_common/mahjong/GameBase/GameBase", "res/lwlc_game_common/mahjong/dialog/common", "res/lwlc_game_common/mahjong/dialog/dialog", "res/lwlc_game_common/mahjong/emoji/Sentence", "res/lwlc_game_common/mahjong/Gps/gpsImages", "res/lwlc_game_common/mahjong/emoji/xihonshi/xihonshi", "res/lwlc_game_common/mahjong/emoji/ganbei/ganbei", "res/lwlc_game_common/mahjong/emoji/woshou/woshou", "res/lwlc_game_common/mahjong/emoji/huaxulie/hua", "res/lwlc_game_common/mahjong/emoji/zhadan/zhadan", "res/lwlc_game_common/mahjong/emoji/zhuoji/zhuoji"],
	getResList: function() {
		_aliased9642 = [];
		cc.each(this.res,
		function() {
			_aliased9642.push(path);
		});
		cc.each(this.frameCacheList,
		function() {
			_aliased9642.push((item + ".png"), (item + ".plist"));
		},
		this);
		return _aliased9642;
	},
	onLoaded: function() {
		console.log("------------------------------Game res preloaded!------------------------------------");
		_local0 = 0;
		while ((_local0 < this.frameCacheList.length)) {
			_local1 = this.frameCacheList[_local0];
			cc.spriteFrameCache.addSpriteFrames((_local1 + ".plist"), (_local1 + ".png"));
			_local0 = (_local0 + 1);
		}
	},
	setMahjongBG: function() {
		cc.sys.localStorage.setItem("mahjong_bg", id);
	},

欢迎有兴趣研究这块的可以加我一起研究70571382 qq


评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值