unminify
Version 2.0.0
JavaScript 빌드 도구가 JavaScript에 수행하는 몇 가지 끔찍한 것들을 취소하는 작은 프로젝트. 대부분의 미니 화를 취소하는 것 외에도, 그것은 야생에서 사용되는 엄청나게 일반적인 "난독 화"기술을 뒤집습니다.
예를 들어, 내가 찾은이 임의의 자바 스크립트 비트에 그것을 시도하는 것이 당신이 그것을 즐겁게 할 수 있습니다.
npm install -g unminify
또는 npx 통해 설치하지 않고 사용하십시오 ( npm 5.2.0 이후 사용 가능).
npx unminify [...args]
unminify /path/to/file.js
--safety 주어질 수 있습니다. 자세한 내용은 안전 수준 문서를 참조하십시오. --safety 의 값은 중 하나 일 수 있습니다uselesssafe (기본값)mostly-safeunsafewildly-unsafe--additional-transform 0 이상이 주어질 수 있으며, 각각 AST 변환을 제공하는 모듈로가는 경로가 이어질 수 있습니다. 함수는 입력을 반환하여 변환이 적용되지 않았 음을 나타냅니다. let { 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 ) { /* ... */ } ] ,
} ) ) ; 이미 시프트 트리가있는 경우 unminifyTree 사용하여 Codegen & Reparse 비용을 피할 수 있습니다.
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.