javascript-obfuscator / javascript-obfuscator/react-native-obfuscating-transformer

RN 0.55.4 require issue

Open
#6 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
211
Forks
102
PR merge metrics
No merged PRs in 30d

Description

Hi, Im getting
calls to `require` expect exactly 1 string literal argument, but this was found: `require(_0xbf50('0x4'))`.
anybody know what could be the issue there?

transformer used:
```
module.exports = obfuscatingTransformer({
upstreamTransformer: typescriptTransformer,
obfuscatorOptions: {
compact: true,
controlFlowFlattening: false,
controlFlowFlatteningThreshold: 0.75,
deadCodeInjection: true,
deadCodeInjectionThreshold: 0.4,
debugProtection: true,
debugProtectionInterval: false,
disableConsoleOutput: true,
identifierNamesGenerator: "hexadecimal",
log: false,
renameGlobals: false,
reservedNames: ['import', 'require', 'class declaration', 'export'],
rotateStringArray: false,
seed: 0,
selfDefending: false,
sourceMap: false,
sourceMapMode: "separate",
stringArray: false,
stringArrayEncoding: false,
// stringArrayThreshold: 1,
target: "node",
unicodeEscapeSequence: false,
}
});
```

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file, test, or entry point is identified in the report. Start by reproducing the React Native 0.55.4 build with the shown TypeScript transformer configuration and inspect the generated require(_0xbf50('0x4')) call; done means identifying the cause of the invalid require argument and documenting a confirmed fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.