[GH-ISSUE #509] Feature Request: Add option to specify custom output filename (not just directory) #87

Open
opened 2026-03-03 13:52:52 +03:00 by kerem · 2 comments
Owner

Originally created by @NoahTheGinger on GitHub (Jun 30, 2025).
Original GitHub issue: https://github.com/jehna/humanify/issues/509

Current Behavior

Currently, humanify only allows specifying an output directory with -o, and the output file is always named deobfuscated.js:

humanify openai -o ./output input.js
# Creates: ./output/deobfuscated.js

Problem

This makes it difficult to:

  1. Compare deobfuscation results from different models on the same file
  2. Process multiple files without overwriting previous results
  3. Keep track of which output corresponds to which input/model combination

Proposed Solution

Add a new option (e.g., --output-file or enhance -o) to specify the complete output path including filename:

# New option
humanify openai --output-file ./results/myfile-gpt4.js input.js

# Or enhance existing -o to detect file vs directory
humanify openai -o ./results/myfile-gpt4.js input.js

Use Case Examples

# Compare different models
humanify openai --model gpt-4.1-nano --output-file compare-nano.js input.js
humanify gemini --model gemini-2.0-flash --output-file compare-gemini.js input.js

# Process multiple files
humanify openai --output-file processed/file1-clean.js file1.min.js
humanify openai --output-file processed/file2-clean.js file2.min.js

Alternative

If changing the CLI is not preferred, even just preserving the input filename would help:

humanify openai -o ./output input.js
# Could create: ./output/input-deobfuscated.js (instead of deobfuscated.js)

Would love to hear your thoughts on this! Happy to help implement if you think it's a good addition.

Originally created by @NoahTheGinger on GitHub (Jun 30, 2025). Original GitHub issue: https://github.com/jehna/humanify/issues/509 ## Current Behavior Currently, humanify only allows specifying an output directory with `-o`, and the output file is always named `deobfuscated.js`: ```bash humanify openai -o ./output input.js # Creates: ./output/deobfuscated.js ``` ## Problem This makes it difficult to: 1. Compare deobfuscation results from different models on the same file 2. Process multiple files without overwriting previous results 3. Keep track of which output corresponds to which input/model combination ## Proposed Solution Add a new option (e.g., `--output-file` or enhance `-o`) to specify the complete output path including filename: ```bash # New option humanify openai --output-file ./results/myfile-gpt4.js input.js # Or enhance existing -o to detect file vs directory humanify openai -o ./results/myfile-gpt4.js input.js ``` ## Use Case Examples ```bash # Compare different models humanify openai --model gpt-4.1-nano --output-file compare-nano.js input.js humanify gemini --model gemini-2.0-flash --output-file compare-gemini.js input.js # Process multiple files humanify openai --output-file processed/file1-clean.js file1.min.js humanify openai --output-file processed/file2-clean.js file2.min.js ``` ## Alternative If changing the CLI is not preferred, even just preserving the input filename would help: ```bash humanify openai -o ./output input.js # Could create: ./output/input-deobfuscated.js (instead of deobfuscated.js) ``` Would love to hear your thoughts on this! Happy to help implement if you think it's a good addition.
Author
Owner

@0xdevalias commented on GitHub (Jun 30, 2025):

I haven't looked at this for a while, but off the top of my head I believe it's done this way because if you're unpacking a webpack chunk/similar it creates multiple files.

The main part that handles the unpacking/etc comes from webcrack; and I think it might be it that sets that filename even (though can't remember for sure off the top of my head)

<!-- gh-comment-id:3019413307 --> @0xdevalias commented on GitHub (Jun 30, 2025): I haven't looked at this for a while, but off the top of my head I believe it's done this way because if you're unpacking a webpack chunk/similar it creates multiple files. The main part that handles the unpacking/etc comes from `webcrack`; and I think it might be it that sets that filename even (though can't remember for sure off the top of my head)
Author
Owner

@0xdevalias commented on GitHub (Jul 1, 2025):

See also:

Edit: I left a number of review comments on that PR, including:

In particular, that last review comment has a bit more of a deep dive and some of my thinking on how this could be implemented, and what might make sense to do with it.

<!-- gh-comment-id:3021413680 --> @0xdevalias commented on GitHub (Jul 1, 2025): See also: - https://github.com/jehna/humanify/pull/510 **Edit:** I left a number of review comments on that PR, including: - https://github.com/jehna/humanify/pull/510#pullrequestreview-2973237888 - https://github.com/jehna/humanify/pull/510#pullrequestreview-2973241785 - https://github.com/jehna/humanify/pull/510#pullrequestreview-2973247554 In particular, that [last review comment](https://github.com/jehna/humanify/pull/510#pullrequestreview-2973247554) has a bit more of a deep dive and some of my thinking on how this could be implemented, and what might make sense to do with it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/humanify#87
No description provided.