javascript-obfuscator / javascript-obfuscator/webpack-obfuscator

using electron outside of /main.js

Đang mở
#131 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
928
Fork
92
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Currently obfuscating my electron app using webpack-obfuscator - my config file is as follows:

**// webpack.config.js
'use strict';

const nodeExternals = require('webpack-node-externals');
const path = require('path'),
Obfuscate = require('webpack-obfuscator');
// const ObfuscateOption = require('../obfuscation_config.js');
module.exports = {
entry: {
electron: './main.js',
script: './scripts/index.js',
},
output: {
path: path.resolve(__dirname, '..', 'build'),
filename: '[name].js', // output: abc.js, cde.js
},
target: 'electron-main',
plugins: [
new Obfuscate({
compact: true,
controlFlowFlattening: true,
controlFlowFlatteningThreshold: 0.75,
deadCodeInjection: true,
deadCodeInjectionThreshold: 0.4,
debugProtection: false,
debugProtectionInterval: false,
disableConsoleOutput: false,
identifierNamesGenerator: 'hexadecimal',
log: false,
numbersToExpressions: true,
renameGlobals: false,
rotateStringArray: true,
selfDefending: true,
shuffleStringArray: true,
simplify: true,
splitStrings: true,
splitStringsChunkLength: 10,
stringArray: true,
stringArrayEncoding: ['base64'],
stringArrayWrappersCount: 2,
stringArrayWrappersChainedCalls: true,
stringArrayWrappersType: 'variable',
stringArrayThreshold: 0.75,
/*transformObjectKeys: true,*/
unicodeEscapeSequence: false,
}),
],

externals: [nodeExternals({ modulesFromFile: true })],
};
**

however, i now need to use the electron net api in another file, not in the /build folder the obfuscation creates -
how would i go about this? thanks

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Bắt đầu với webpack.config.js và so sánh entry của Electron tại main.js với scripts/index.js và các tệp được tạo trong build. Kiểm tra cách cấu hình webpack-obfuscator xử lý mã sử dụng net API của Electron bên ngoài đầu ra được đóng gói. Hoàn thành nghĩa là đã ghi lại một cấu hình được hỗ trợ hoặc giải thích vị trí tệp cần thiết và hành vi build.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
electron, javascript, webpack
Lĩnh vực
build-system, desktop
Loại issue
Tài liệu
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.