저자 : Sean Pesce
nodejs 스크립트 분석 (미니싱/난독 화) JavaScript. 모든 도구는 로컬 파일의 처리, HTTP (S) URL을 통한 원격 파일 또는 표준 입력 데이터를 지원합니다.
이러한 도구는 여전히 개발 중이므로 아이디어와 기여를 환영합니다.
시스템 패키지 :
curlnodejs (18.3+)노드 모듈 :
escodegenesprimaestraversesource-map 참고 : 이 도구는 Nick Larosa의 업데이트 된 esrefactor 버전으로 제공됩니다. Nick의 버전은 NPM의 라이브러리 버전에서 몇 가지 주요 문제를 수정합니다 (여기서 풀 요청 참조). PR 버전은 npm install ariya/esrefactor#pull/9/head 와 직접 설치할 수도 있지만 편의를 위해 여기에 포함 시켰습니다.
jsretk-strings 이 스크립트는 JavaScript 코드에서 문자 리터럴을 추출하며, 컴파일 된 이진 실행 파일에 대한 strings 실행하는 것과 비슷한 결과를 얻습니다. 또한 JavaScript 댓글과 Regex Literals를 추출하는 옵션도 지원합니다.
$ node jsretk-strings.js --help
Usage:
node jsretk-strings.js [OPTIONS] <JS_FILE_1> [[JS_FILE_2] ...]
Options:
[-h|--help] Print usage and exit
[-P|--stdin] Pipe data from stdin
[-c|--comments] Include JavaScript comments in output
[-C|--comments-only] Find ONLY JavaScript comments (no string/RegEx literals; overrides "-c")
[-r|--regex] Include Regular Expression (RegEx) literals in output
[-R|--regex-only] Find ONLY RegEx literals (no comments/string literals; overrides "-r")
[-T|--templates-only] Find ONLY template strings (no static string/RegEx literals or comments)
[-m|--min] Find strings of this length or longer (inclusive)
[-M|--max] Find strings of this length or shorter (inclusive)
[-x|--match-regex] <ex> Find strings that match the given Regular Expression
[-k|--insecure] Don't verify TLS/SSL certificates for connections when fetching remotely-hosted JS files
[-p|--curl-path] <path> Non-standard path/name for the curl command
[-B|--max-buffer] <n> Maximum size (in bytes) for remotely-fetched JS files (default: 50MB)
[-E|--encoding] <enc> Text encoding for local input/output files (default: "utf8")
[-i|--interactive] Enter interactive NodeJS prompt after completion
jsretk-unminify경고 : 이 스크립트는 현재 상태에서 불안정하고 부적합합니다.
이 스크립트는 JavaScript 코드를 사용하지 않으려 고 시도합니다.
현재 구현은 고유화를 수행하는 데 매우 오랜 시간이 걸릴 수 있으므로 -v|--verbose 플래그를 사용하는 것은 진행 상황을 모니터링하는 것이 좋습니다. 일부 코드베이스 (예 : 일부 원시 배포)의 경우 실험적 -L|--per-line 플래그는 완료 시간을 기하 급수적으로 줄일 수 있습니다.
$ node jsretk-unminify.js --help
Usage:
node jsretk-unminify.js [OPTIONS] <JS_FILE_1> [[JS_FILE_2] ...]
Options:
[-h|--help] Print usage and exit
[-P|--stdin] Pipe data from stdin
[-v|--verbose] Enable verbose output
[-o|--output-dir] <dir> Output directory (default: "jsretk-out")
[-O|--overwrite] If output file(s) exist, automatically overwrite
[-t|--tab] Use tab characters ("t") instead of spaces for indenting formatted code
[-I|--indent] <n> Number of spaces (or tabs) used for indenting formatted code (default: 4 spaces or 1 tab)
[-r|--rename-len] <n> Rename variables if names are shorter than or equal to this value (default: 2 characters)
[-R|--no-rename] Don't rename variables to unique names
[-F|--no-format] Don't format the code for readability
[-C|--char-iter] Iterate over characters instead of tokens during refactoring. Significantly slower; may produce slightly different output
[-s|--smart-rename] (EXPERIMENTAL) Use various heuristics to attempt to generate more informative variable names
[-L|--per-line] (EXPERIMENTAL) Attempt to refactor code line by line (rather than the whole file at once). Useful for some react-native deployments, but fails on many (most?) codebases
[-k|--insecure] Don't verify TLS/SSL certificates for connections when fetching remotely-hosted JS files
[-p|--curl-path] <path> Non-standard path/name for the curl command
[-B|--max-buffer] <n> Maximum size (in bytes) for remotely-fetched JS files (default: 50MB)
[-E|--encoding] <enc> Text encoding for local input/output files (default: "utf8")
[-i|--interactive] Enter interactive NodeJS prompt after completion
jsretk-unsourcemap 이 스크립트는 Tim McCormack의 원본 코드를 기반으로 JS/소스 맵 파일 ( *.js.map )에서 JavaScript/TypeScript 소스 코드를 복구합니다.
$ node jsretk-unsourcemap.js --help
usage: jsretk-unsourcemap.js [-h] src-js src-map out-dir
Deobfuscate JavaScript code using a source map
positional arguments:
src-js Path to JavaScript file to recover
src-map Path to source-map to recover from
out-dir Path to directory where sources will be dumped
optional arguments:
-h, --help show this help message and exit
저에 대한 문의 및/또는 정보는 개인 웹 사이트를 방문하십시오.