FRET is a Unix command line tool that examines any file or files and attempts to identify the data structures and patterns within those file(s). It does this by firstly scanning files using heuristic algorithms to identify structures and then by comparing files to identify common patterns. Results are compared and ranked using a probabilistic approach. It outputs a sorted list of the detected structures within the file(s) which can then be parsed by other tools and scripts. libfret is the library used to implement FRET. It provides a clear interface to allow for the analysis of buffers of raw data. It is designed to be integrated with a range of other programs such as hex editors, packet analysers and other development tools.