[GH-ISSUE #2802] Add check for UTF-16 BOM #1795

Closed
opened 2026-10-15 04:24:37 +07:00 by bsakaguchi · 6 comments
Owner

Originally created by @magnumripper on GitHub (Sep 30, 2017).
Original GitHub issue: https://github.com/openwall/john/issues/2802

Originally assigned to: @magnumripper on GitHub.

Provided we don't add a performance hit, we should detect UTF-16 BOM and bail out with an informative message.

github.com/magnumripper/JohnTheRipper@91bd304258 (commitcomment-24667963)

Originally created by @magnumripper on GitHub (Sep 30, 2017). Original GitHub issue: https://github.com/openwall/john/issues/2802 Originally assigned to: @magnumripper on GitHub. Provided we don't add a performance hit, we should detect UTF-16 BOM and bail out with an informative message. https://github.com/magnumripper/JohnTheRipper/commit/91bd304258c4edfda84fc89c77d1e586e7bb6e59#commitcomment-24667963
bsakaguchi 2026-10-15 04:24:37 +07:00
Author
Owner

@magnumripper commented on GitHub (Sep 30, 2017):

And I do mean bail out. If given UTF-16 or UCS-2 input, it's likely going downhill very fast so luser should get to reconsider.

<!-- gh-comment-id:333339636 --> @magnumripper commented on GitHub (Sep 30, 2017): And I do mean bail out. If given UTF-16 or UCS-2 input, it's likely going downhill very fast so luser should get to reconsider.
Author
Owner

@gbakeman commented on GitHub (Sep 30, 2017):

Powershell users, be warned.

<!-- gh-comment-id:333342267 --> @gbakeman commented on GitHub (Sep 30, 2017): Powershell users, [be warned](https://stackoverflow.com/questions/40098771/changing-powershells-default-output-encoding-to-utf-8).
Author
Owner

@magnumripper commented on GitHub (Sep 30, 2017):

Right! And emphasize from that quote: "which isn't useful" 😆 What the heck are Microsoft thinking? Oh, I know: "all systems in the world run our cuckoo system so let's get crazy and break any standard known to man. Yet again."

<!-- gh-comment-id:333342544 --> @magnumripper commented on GitHub (Sep 30, 2017): Right! And emphasize from that quote: **"which isn't useful"** 😆 What the heck are Microsoft thinking? Oh, I know: "all systems in the world run our cuckoo system so let's get crazy and break any standard known to man. Yet again."
Author
Owner

@magnumripper commented on GitHub (Sep 30, 2017):

That's a good link BTW, with some solutions. And still caveats: PowerShell, as of v5.1, invariably creates UTF-8 files with a (pseudo) BOM, which is customary only in the Windows world.

<!-- gh-comment-id:333342744 --> @magnumripper commented on GitHub (Sep 30, 2017): That's a good link BTW, with some solutions. And still caveats: *PowerShell, as of v5.1, invariably creates UTF-8 files **with a (pseudo) BOM**, which is customary only in the Windows world*.
Author
Owner

@gbakeman commented on GitHub (Oct 1, 2017):

Heh... That's sad too, because Powershell was supposed to be the ultimate replacement for Command Prompt. Yet here it is using some weird kind of encoding.

<!-- gh-comment-id:333348855 --> @gbakeman commented on GitHub (Oct 1, 2017): Heh... That's sad too, because Powershell was supposed to be the ultimate replacement for Command Prompt. Yet here it is using some weird kind of encoding.
Author
Owner

@magnumripper commented on GitHub (Oct 12, 2017):

See #2812 for later events

<!-- gh-comment-id:335983636 --> @magnumripper commented on GitHub (Oct 12, 2017): See #2812 for later events
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
openwall/john#1795
No description provided.