This is a tool for recovering data from corrupted disks. It relies on you knowing an exact UTF-8 string that appears in the file, and the file being contiguous on disk.
Please note that it has some known bugs, although as far as I am aware there is no case in which it would cause data loss. (As stated in the license's disclaimer, however, I am not responsible if you do lose data!) I wrote this a few months ago for personal use, without intending to distribute it, so it's not as polished as I would normally make software for distribution.
In particular, disk_searcher
will crash with an exception if you move the start of a window before the start of the disk, the end of a window after the end of the disk, or the end of a window before the start of the window.
disk_searcher <path> <data>
path
is the path to either the disk's block device in /dev
, or an image of the disk (.img
or .iso
file); data
is the known string to look for.
After disk_searcher
scans your disk, it will present the matches, one by one. Just press Enter if a match doesn't look right. If one does look right, and you want to resize the window that is shown, press any other key, then Enter.
The program will then prompt you with commands. Your commands must consist of either s
or e
, followed by a positive or negative integer. This will move either the start (s
) or end (e
) of the window forward by the specified number of bytes; use negative numbers to go backward.
Copyright (c) 2023-2024 Samuel Sloniker
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.