如何反编译 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


没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试