IUtilities is a project mainly written in C, it's free.
A collection of iDevice Utilities
iUtilities are a collection of tools used to communicate with iPhone/iPad.
boot_mode - Utility which shows if an iDevice is in DFU or Recovery Mode