15.6 C
New York
Tuesday, April 16, 2024

macos – To edit TrashIcon.icns using hex editor to get access to the dark icons


In /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources there is a file TrashIcon.icns. Alexander O’Mara, a guy who is a security expert at Mastercard discovered that this file contains not only “bright” icons but also “dark” ones. But to get access to the dark ones, you need to modify the file using a hex editor.

I never worked with hex editors and the instructions he gave are not very clear to me.

Alexander: I don’t know of any existing tools, but it’s pretty simple. Find the chunk inside TrashIcon.icns named FD D9 2F A8, copy it, and overwrite FD D9 2F A8 with icns. That will make it a valid icns file. From there you can extract the individual icons from the dark icns file using a tool like iconutil.

Me: Many thanks. But I’m not sure I understand the first part. […]

Alexander: I’d recommend making a copy of the icns file, finding FD D9 2F A8, selecting all the hex on the left that comes before it, deleting it, then on the right side overwrite the first 4 bytes with icns, and save.

https://github.com/Ji4n1ng/OpenInTerminal/issues/211

I still don’t understand how to “overwrite the first 4 bytes with icns, despite I’m not computer- or programming-illeterate person. Could you explaint it to me? An animated GIF will probably be the best option.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles