
Security News
Open Source Maintainers Demand Ability to Block Copilot-Generated Issues and PRs
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
reverse many of the transformations applied by minifiers and naïve obfuscators
A little project to undo several of the horrible things JavaScript build tools will do to JavaScript. In addition to undoing most minification, it reverses some of the stupider but surprisingly common "obfuscation" techniques used in the wild.
It may amuse you to try it on, say, this random bit of JavaScript I found.
npm install -g unminify
or use it without installing via npx
(available since npm
5.2.0)
npx unminify [...args]
unminify /path/to/file.js
--safety
may be given to enable/disable transformations based on the user's required safety guarantees. Refer to the safety levels documentation for more details. The value of --safety
may be one of
useless
safe
(default)mostly-safe
unsafe
wildly-unsafe
--additional-transform
may be given zero or more times, each followed by a path to a module providing an AST transform; the function signals that the transformation was not applied by returning its inputlet { unminifySource } = require('unminify');
let sourceText = '/* a minified/"obfuscated" JavaScript program */';
console.log(unminify(sourceText));
// or, with options
console.log(unminifySource(sourceText, {
safety: unminify.safetyLevels.UNSAFE,
additionalTransforms: [function(ast) { /* ... */ }],
}));
If you already have a Shift tree then you can use unminifyTree
to avoid the codegen & reparse cost.
let { parseScript } = require('shift-parser');
let { unminifyTree } = require('unminify');
let sourceText = '/* a minified/"obfuscated" JavaScript program */';
let tree = parseScript(sourceText);
let unminifiedTree = unminifyTree(tree);
Copyright 2017 Shape Security, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
FAQs
reverse many of the transformations applied by minifiers and naïve obfuscators
The npm package unminify receives a total of 500 weekly downloads. As such, unminify popularity was classified as not popular.
We found that unminify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Research
Security News
Malicious Koishi plugin silently exfiltrates messages with hex strings to a hardcoded QQ account, exposing secrets in chatbots across platforms.
Research
Security News
Malicious PyPI checkers validate stolen emails against TikTok and Instagram APIs, enabling targeted account attacks and dark web credential sales.