javascript-obfuscator / javascript-obfuscator/react-native-obfuscating-transformer
Just Don't Work
- 主要語言
- TypeScript
- 星號
- 211
- 分支
- 102
- PR 合併指標
- 30 天內沒有已合併 PR
描述
The plugin just don't work...
**installed other dependencies needed:**
```
npm install babylon --save
npm install --save babel-traverse
```
**transformer.js**
```
const obfuscatingTransformer = require("react-native-obfuscating-transformer")
const filter = filename => {
return filename.startsWith("src");
};
module.exports = obfuscatingTransformer({
// this configuration is based on https://github.com/javascript-obfuscator/javascript-obfuscator
obfuscatorOptions:{
compact: true,
controlFlowFlattening: false,
deadCodeInjection: false,
debugProtection: false,
debugProtectionInterval: false,
disableConsoleOutput: true,
identifierNamesGenerator: 'hexadecimal',
log: false,
renameGlobals: false,
rotateStringArray: true,
selfDefending: true,
shuffleStringArray: true,
splitStrings: false,
stringArray: true,
stringArrayEncoding: false,
stringArrayThreshold: 0.75,
unicodeEscapeSequence: false
},
upstreamTransformer: require('metro-react-native-babel-transformer'),
emitObfuscatedFiles: false,
enableInDevelopment: true,
filter: filter,
trace: true
})
```
**metro.config.js**
```
module.exports = {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
}),
babelTransformerPath: require.resolve("./transformer") // add here the transformer.js
},
};
```
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
從範例 transformer.js 和 metro.config.js 檔案開始,安裝列出的 babylon 和 babel-traverse 相依套件,並執行 React Native 建置以擷取失敗資訊。將 transformer 設定與專案文件中記錄的進入點進行比較,並判定具體錯誤;完成的標準是所回報的 setup 在啟用混淆的情況下成功執行。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- babel, javascript, react-native
- 領域
- mobile, tooling
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 20/100