08-17-2023, 04:28 AM
Does anyone have a secure JavaScript obfuscater that’s not obfuscater.io? I’m having trouble finding an obfuscater so my code does not get leaked, thanks for any help!
|
JavaScript Obfuscater?
by i3eaI - Thursday August 17, 2023 at 04:28 AM
|
|
08-17-2023, 04:28 AM
Does anyone have a secure JavaScript obfuscater that’s not obfuscater.io? I’m having trouble finding an obfuscater so my code does not get leaked, thanks for any help!
08-17-2023, 04:41 AM
making your own simple one is the best option
Ban reason: Requested (Permanent)
08-17-2023, 04:45 AM
08-17-2023, 10:47 AM
you can use this tools with node js https://www.npmjs.com/package/@skiff-org/skiff-crypto
08-25-2023, 05:54 PM
I was using UglifyJS https://github.com/mishoo/UglifyJS
09-04-2023, 02:21 PM
goated obfuscator that as of now isn't getting picked up by AV: https://www.javascriptobfuscator.com/
09-04-2023, 02:24 PM
09-04-2023, 02:48 PM
(08-17-2023, 04:28 AM)i3eaI Wrote: Does anyone have a secure JavaScript obfuscater that’s not obfuscater.io? I’m having trouble finding an obfuscater so my code does not get leaked, thanks for any help! I agree with @victim build you own : - Using JavaScript Obfuscator with Node.js To use javascript-obfuscator, you can install it via npm: npm install --save javascript-obfuscatorThen, you can create a Node.js script to obfuscate your code: const JavaScriptObfuscator = require('javascript-obfuscator');
const codeToObfuscate = `
function helloWorld() {
console.log('Hello, world!');
}
`;
const obfuscatedCode = JavaScriptObfuscator.obfuscate(
codeToObfuscate,
{
compact: true,
controlFlowFlattening: true,
controlFlowFlatteningThreshold: 1,
numbersToExpressions: true,
simplify: true,
shuffleStringArray: true,
splitStrings: true,
stringArrayThreshold: 1
}
).getObfuscatedCode();
console.log(obfuscatedCode);- Using Terser with Node.js To use terser, you can also install it via npm: npm install terserThen, you can create a Node.js script: const Terser = require("terser");
const codeToMinify = `
function helloWorld() {
console.log('Hello, world!');
}
`;
const options = {
compress: {
dead_code: true,
conditionals: true,
booleans: true
},
mangle: {
toplevel: true
}
};
const result = Terser.minify(codeToMinify, options);
if (result.error) {
console.log("Terser Error: ", result.error);
} else {
console.log(result.code);
}To use webpack-obfuscator, you first need to install the package: npm install webpack-obfuscatorThen, add it to your Webpack configuration file (webpack.config.js): const JavaScriptObfuscator = require('webpack-obfuscator');
module.exports = {
// ... other Webpack configurations
plugins: [
new JavaScriptObfuscator ({
rotateStringArray: true,
stringArray: true,
// other options
}, [])
]
};These examples are quite basic, and the obfuscation options can be adjusted according to your needs. you can also use python : install terser : npm install -g tersernpm install terserpython code : import subprocess
def obfuscate_js(input_file, output_file):
try:
subprocess.run(["terser", input_file, "-o", output_file, "-c", "-m"])
print(f"Obfuscation successful. Output file is {output_file}")
except Exception as e:
print(f"An error occurred: {e}")
# Prompt the user for input and output file paths
input_file = input("Please enter the path of the input JavaScript file: ")
output_file = input("Please enter the path where you'd like to save the obfuscated file: ")
# Use the function
obfuscate_js(input_file, output_file)
09-04-2023, 03:13 PM
Just dont if you want to hide your code just make a api is the only good way to do it
09-04-2023, 08:10 PM
|
|
« Next Oldest | Next Newest »
|