Hacker News new | ask | show | jobs
by BearsAreCool 1612 days ago
I'm a big fan of CyberChef. One of its most useful features is "magic" and turning on "intensive mode". This will automatically detect the encoding used and can often detect 2-3 levels of encoding.
1 comments

Sometimes it can detect quite a lot more than 2-3 levels! The "magic" function really feels like it earns its name.
If you like that, try FTFY https://ftfy.readthedocs.io/en/latest/ which can automatically repair a huge range of ways that Unicode text can be broken by re-encoding. This would be a great addition to CyberChef if they could reproduce it in JS.

Classic example from the docs:

> ftfy can fix multiple layers of mojibake simultaneously:

    >>> ftfy.fix_text('The Mona Lisa doesn’t have eyebrows.')
    "The Mona Lisa doesn't have eyebrows."