david-pace / wave-recovery-tool Goto Github PK
View Code? Open in Web Editor NEWTool to display WAVE/AIFF file header information and to restore corrupted WAVE/AIFF file headers
License: GNU General Public License v3.0
Tool to display WAVE/AIFF file header information and to restore corrupted WAVE/AIFF file headers
License: GNU General Public License v3.0
I am trying to restore an AIFF file on macOS Catalina but having a few issues.
python3 -r wave-recovery-tool-master/waverecovery.py audio restored
gave me the error Unknown option: -r
-r
to give python3 wave-recovery-tool-master/waverecovery.py -r audio restored
gets around that but then I'm getting an error sayingCreating destination directory restored...
Scanning directory audio...
------------------------------------------
waverecovery.py: UnicodeDecodeError('utf-8', b'\x15\xbd\xd2U', 1, 2, 'invalid start byte')
Do you have any thoughts about how I can get around this problem?
Thank you!
The Stop/Djvu ransomware encrypts the first 153605 bytes (150 kB + 5 bytes) of files and adds 334 additional bytes at the end. While still in encrypted state, the audio data after byte 153605 can still be recovered.
This involves:
44 + (25594 * 6) = 153608
<total number of bytes> - 334
This mode should be activated by providing the following application parameter:
-a djvu
The current implementation assumes the audio data offsets of Apple Logic. However, there are cases where audio files have to be recovered from other applications, e.g. Ableton Live. There should be a possibility to provide a parameter that identifies the application in order to use different offsets during the restoration process.
Long parameter name: --application
Short parameter name: -a
Possible values for initial version:
logic
(Apple Logic, default)live
(Ableton Live)In general it is not possible to tell the bit depth and the number of channels by analyzing the audio bytes. However, under certain conditions it is possible to exclude some combinations of bit depth and number of channels.
Assuming all audio bytes are still present, the following assumptions can be made:
The problem is that some of those cases apply at the same time, e.g. if the number is divisible by 6 it is also divisible by 3 and 2. Worst case would be multiples of 12, for which all possibilities would apply.
When analyzing a restored file I noticed that the expected subchunk 2 size is wrong:
[WARNING] Data subchunk size does not match file size. Should be 59100458, but is: 59100450 (difference: 8)
After looking at the file (which has 59100494
bytes) I found that 59100450
is actually correct (<total size in bytes> - 44
).
Hi,
Could you provide sample refererenc & corrupted wave files?
Also i have made code automate repair wave file encrypted by stop/djvu ransomware here:
https://github.com/DRCRecoveryData/WAV-Repair-Tool-for-Stop-DJVU-Ransomware
This error occurred when analyzing a folder containing ~ 1300 AIFF files:
waverecovery.py: error('unpack requires a buffer of 4 bytes')
for help use --help
If an AIFF Header is destroyed completely, this is not detected correctly and data might be copied at the beginning that does not belong there. Instead, a completely new header should be written at the beginning of the destination file.
Sometimes the chunk sizes are not computed correctly.
The background is that these are computed based on the size of the source files (i.e. the damaged files). The computed chunk sizes are only correct if the restored file is exactly as big as the damaged file. While this is correct in most cases, it does not hold true if:
This is a bit tricky because at this point it is not yet clear which chunks will be written, so the write operation has to be delayed.
A good approach would probably be to analyze the input file completely, detect the chunks that are still intact (if any), compute a plan which chunks should be written (including their sizes) and then finally write the complete file with correct chunk sizes.
Support analyzing and restoring AIFF-C files as requested by @joekroese in #2.
Hi,
I used your waverecovery to wave encrypted files, i cut 153644 bytes from the header and it working without noise, but i wanna know how to get the data subchunk2size from offset 41-44
Sample:
https://drive.google.com/file/d/1D_MS6ko7zXVEGiM2K5m3TUasw9xpXPMO/view?usp=drivesdk
This sample using 41000 and 2 channel
Hi,
I have some encrypted mp3
https://drive.google.com/drive/folders/1oKg7Zvl2E-9GvWVHtTwHyhxADAx1HEc0
The encrypted data is 25805 bytes ( hex ) from the header
Could you made a repair for this case and error mp3 files?
In some cases the input files have to be cut off at the end. For this purpose, it should be possible to specify an end offset indicating the position of the last audio byte.
Long parameter name: --end-offset
Short parameter name: -e
Allowed values: integer values, including negative values. Negative values are interpreted as offset from the end of the file.
It should be possible to specify the offset of the first byte in the damaged file that is part of the raw audio data. This will allow to restore arbitrary audio files.
Long parameter name: --offset
Short parameter name: -o
Allowed values: integers (negative values are interpreted as offsets from the end of the file)
Add support to display AIFF header infos and to restore corrupted AIFF headers.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.