momoca
momoca
  • 发布:2019-04-26 11:32
  • 更新:2020-04-13 13:25
  • 阅读:2391

HbuilderX 打包时勾选js混淆不起作用

分类:HBuilderX

JS混淆勾选了,还配置confusion。

{  
    "confusion": {  
        "description": "JS原生混淆",  
        "resources": {  
            "js/common.js": {},  
            "js/immersed.js": {}  
        }  
    }  
}

打包后查看加密的js还是明文原码。

我上传程序打包了。

2019-04-26 11:32 负责人:无 分享
已邀请:
momoca

momoca (作者)

????

DCloud_App_Array

DCloud_App_Array

confusion数据应该放到plus节点下:

"plus": {  
  "confusion": {    
    "description": "js原生混淆配置",    
    "resources": {    
      "lib/util/partials.js": {},    
      "lib/util/util.js": {},    
      "js/events.js": {}    
    }    
  },  
 //...  
}
[已删除]

[已删除]

"plus": {    
//加密代码开始  
  "confusion": {      
    "description": "js原生混淆配置",      
    "resources": {      
      "lib/util/partials.js": {},      
      "lib/util/util.js": {},      
      "js/events.js": {}      
    }      
  },    
 //加密代码结束  
}  
DCloud_App_Array

DCloud_App_Array

请提供完整的manifest.json。

  • momoca (作者)

    隐藏掉了一些用xxx代替了。


    {  
    "id": "com.xxx.xxx",
    "name": "xxx",
    "version": {
    "name": "1.0",
    "code": 1
    },
    "description": "xxx",
    "icons": {
    "72": "icon.png"
    },
    "launch_path": "index.html",
    "developer": {
    "name": "",
    "email": "",
    "url": ""
    },
    "confusion": {
    "description": "js原生混淆配置",
    "resources": {
    "lib/util/partials.js": [],
    "lib/util/util.js": [],
    "js/events.js": []
    }
    },
    "permissions": {
    "Accelerometer": {
    "description": "plus.accelerometer.*"
    },
    "Audio": {
    "description": "plus.audio.*"
    },
    "Messaging": {
    "description": "Messaging"
    },
    "Cache": {
    "description": "plus.cache.*"
    },
    "Camera": {
    "description": "plus.camera.*"
    },
    "Console": {
    "description": "plus.console.*"
    },
    "Contacts": {
    "description": "Contacts"
    },
    "Device": {
    "description": "plus.device.*"
    },
    "Downloader": {
    "description": "plus.downloader.*"
    },
    "Events": {
    "description": "Events"
    },
    "File": {
    "description": "plus.io.*"
    },
    "Gallery": {
    "description": "plus.gallery.*"
    },
    "Geolocation": {
    "description": "plus.geolocation.*"
    },
    "Invocation": {
    "description": "plus.android.*"
    },
    "Orientation": {
    "description": "plus.orientation.*"
    },
    "Proximity": {
    "description": "plus.proximity.*"
    },
    "Storage": {
    "description": "plus.storage.*"
    },
    "Uploader": {
    "description": "plus.uploader.*"
    },
    "Runtime": {
    "description": "plus.runtime.*"
    },
    "XMLHttpRequest": {
    "description": "plus.net.*"
    },
    "Zip": {
    "description": "plus.zip.*"
    },
    "Barcode": {
    "description": "plus.barcode.*"
    },
    "Maps": {
    "description": "Maps"
    },
    "Speech": {
    "description": "Speech"
    },
    "Webview": {
    "description": "plus.webview.*"
    },
    "NativeUI": {
    "description": "plus.nativeUI.*"
    },
    "Navigator": {
    "description": "plus.navigator.*"
    },
    "NativeObj": {
    "description": "plus.nativeObj.*"
    },
    "OAuth": {
    "description": "OAuth"
    },
    "Payment": {
    "description": "Payment"
    },
    "Push": {
    "description": "Push"
    },
    "Statistic": {
    "description": "Statistic"
    },
    "SQLite": [],
    "Share": {
    "description": "plus.share.*"
    },
    "VideoPlayer": {
    "description": "VideoPlayer"
    },
    "Stream": {
    "description": "plus.stream.*"
    },
    "Confusion": {
    "description": "Resource confusion"
    }
    },
    "plus": {
    "splashscreen": {
    "autoclose": true,
    "waiting": true
    },
    "popGesture": "close",
    "runmode": "liberate",
    "signature": "xxx",
    "adid": "xxx"
    }
    }

    2019-04-26 13:30

  • momoca (作者)

    在不呢?怎么没回复呢。

    2019-04-26 15:48

momoca

momoca (作者)

隐藏掉了一些用xxx代替了。

{  
  "id": "com.xxx.xxx",  
  "name": "xxx",  
  "version": {  
    "name": "1.0",  
    "code": 1  
  },  
  "description": "xxx",  
  "icons": {  
    "72": "icon.png"  
  },  
  "launch_path": "index.html",  
  "developer": {  
    "name": "",  
    "email": "",  
    "url": ""  
  },  
  "confusion": {  
    "description": "js原生混淆配置",  
    "resources": {  
      "lib/util/partials.js": [],  
      "lib/util/util.js": [],  
      "js/events.js": []  
    }  
  },  
  "permissions": {  
    "Accelerometer": {  
      "description": "plus.accelerometer.*"  
    },  
    "Audio": {  
      "description": "plus.audio.*"  
    },  
    "Messaging": {  
      "description": "Messaging"  
    },  
    "Cache": {  
      "description": "plus.cache.*"  
    },  
    "Camera": {  
      "description": "plus.camera.*"  
    },  
    "Console": {  
      "description": "plus.console.*"  
    },  
    "Contacts": {  
      "description": "Contacts"  
    },  
    "Device": {  
      "description": "plus.device.*"  
    },  
    "Downloader": {  
      "description": "plus.downloader.*"  
    },  
    "Events": {  
      "description": "Events"  
    },  
    "File": {  
      "description": "plus.io.*"  
    },  
    "Gallery": {  
      "description": "plus.gallery.*"  
    },  
    "Geolocation": {  
      "description": "plus.geolocation.*"  
    },  
    "Invocation": {  
      "description": "plus.android.*"  
    },  
    "Orientation": {  
      "description": "plus.orientation.*"  
    },  
    "Proximity": {  
      "description": "plus.proximity.*"  
    },  
    "Storage": {  
      "description": "plus.storage.*"  
    },  
    "Uploader": {  
      "description": "plus.uploader.*"  
    },  
    "Runtime": {  
      "description": "plus.runtime.*"  
    },  
    "XMLHttpRequest": {  
      "description": "plus.net.*"  
    },  
    "Zip": {  
      "description": "plus.zip.*"  
    },  
    "Barcode": {  
      "description": "plus.barcode.*"  
    },  
    "Maps": {  
      "description": "Maps"  
    },  
    "Speech": {  
      "description": "Speech"  
    },  
    "Webview": {  
      "description": "plus.webview.*"  
    },  
    "NativeUI": {  
      "description": "plus.nativeUI.*"  
    },  
    "Navigator": {  
      "description": "plus.navigator.*"  
    },  
    "NativeObj": {  
      "description": "plus.nativeObj.*"  
    },  
    "OAuth": {  
      "description": "OAuth"  
    },  
    "Payment": {  
      "description": "Payment"  
    },  
    "Push": {  
      "description": "Push"  
    },  
    "Statistic": {  
      "description": "Statistic"  
    },  
    "SQLite": [],  
    "Share": {  
      "description": "plus.share.*"  
    },  
    "VideoPlayer": {  
      "description": "VideoPlayer"  
    },  
    "Stream": {  
      "description": "plus.stream.*"  
    },  
    "Confusion": {  
      "description": "Resource confusion"  
    }  
  },  
  "plus": {  
    "splashscreen": {  
      "autoclose": true,  
      "waiting": true  
    },  
    "popGesture": "close",  
    "runmode": "liberate",  
    "signature": "xxx",  
    "adid": "xxx"  
  }  
}
NightsWatcher

NightsWatcher

把混淆的代码放在图示的节点中试试

该问题目前已经被锁定, 无法添加新回复