viper-framework / viper

Binary analysis and management framework
Other
1.54k stars 353 forks source link

Use xxd instead of hd on Macs when getting the hex view in viperweb #716

Closed toomanybananas closed 5 years ago

toomanybananas commented 5 years ago

Macs don't ship the hd utility by default, so using the hex view functionality in the web UI doesn't work. This PR adds an OS check and uses xxd instead when macOS is detected.

The color formatting is a little screwed up since xxd and hd have slightly different output, but it's better than nothing.

botherder commented 5 years ago

Thanks