Extract WAV from RAW database file - audio

I have a .raw file. The header seems XML and the included files .wav.
What I know is the filename, the offset and the filesize of the particular files.
What I've tried is extracting a .wav from the .raw file with:
dd bs=1 seek=1147710 count=455346 if=Data.raw of=output.wav
But the file was not playable. I added a .wav header from another .wav and all what I got was noise. Maybe I extracted the file wrong?
The beginning of the .raw file looks like this:
<FILE name="File 1.wav" offset="1147710" size="455346"/>
and after all those flags I get only data for a million lines:
ö•Æû^0å?w±lŽ{ÜA2ôy™^¼’rBõM,Ó¾ä¥x‹ƒº£Ö
Can anyone point me in the right direction? Do I need to add a header to it? Or did I extract it wrong?
Thank you
Extract with dd
Add .wav header from another file, but not sure if I got the header right
Played without header (didn't play)

Related

Image extraction(.tiff) from T.38 packets

Can anyone guide me in extracting images (recostructing .tiff files) from T.38 packet captures (.pcap) files? The input is the .pcap file and the .tiff file is the required output.
I am currently using fax2tiff tool, but I cannot understand which part of the pcap file should the input file of fax2tiff command contain.

python3 ZipFile.extractall extracts a empty file

Say I compress a .txt file as a .zip format with a password 123, the .txt file has a few characters like abcd. Then I make a new thread, using the zipfile lib in python3 to uncompress the .zip file. The core code in the thread is:
import zipfile as zf
zipf = zf.ZipFile(target)
zipf.extractall(path='./', pwd=password)
However, the .txt file extracted is empty, namely there is no character in it. Then I do the same experiment with a .jpeg image, this time, the image could be extracted perfectly.
I am so confuse about this, could anyone propose a reasonable explanation ?

AVFoundation cannot read wav file format

I'm trying to create a wav file from multiple other wav files.
I use AVAsset, AVAssestReader and AVAssetWriter.
The format setting used for the AVAssetWriterInput and AVAssetReaderAudioMixOutput is created like this:
AVAudioFormat(commonFormat: .pcmFormatInt16, sampleRate: 44100, channels: 2, interleaved: true)
And the AVAssetWriter is created like this: AVAssetWriter(url: outputURL, fileType: .wav)
Btw I noticed 2 weirds things:
1) When I create an AVAsset from a wav file I haven't any metadta.
The asset creation is:
let url = URL(fileURLWithPath: mWaveFilePath)
let asset = AVAsset(url: url)
I cannot do simpler, and when I look for metadata properties of this asset I get always empty array with wav file...
2) The most important is when I write a wave file I've the feelling that AVFoundation makes some errors in the wave header. Maybe it comes from me but I manage to create a wave file with audio, and followed some tutorial I've a bad time for finding where the error could come from.
Here is an example of good an and bad header:
The good header before importing the file.
We can see that the format tag is set to 1 which mean PCM. That's what we want.
Now the wrong header after the creation of my audio file:
-2... It's clearly wrong.
So did I miss something on using AVFoundation for creating a wav file, should I do something special?

About hydra, crunch and 7-zip

I want to create a password list using crunch. As you know the file will become more than 1 petabyte. I know that in 7-zip you can "archive" a file in the format of "7z" and compress it by a lot. If I create a text file then compress it to a "7z" format, then is it possible to get crunch to access the text file while it is compressed in the "7z" format and to add to the list.
Also is it possible to get hydra to read an archive in this format "7z", when you want to use a password list?

Tclsh convert base64 dump into zip file

I have written a Tclsh code that will fetch a zip file content in base64 format through xml-rpc method. I am dumping that base64 data into a file using the following snippet:
#!/usr/bin/tclsh
...
set mybase64Dump [myXmlRpcCallToReturnThisDump]
set zipFilePtr [open "xyz.zip" "w"]
puts $zipFilePtr $mybase64Dump
close $zipFilePte
Zip file was getting generated with XKbytes of size, but when trying to open using 7zip it says, Is not Archive. But I copy pasted the same base64 dump in a online converter. It was giving me a proper extractable zip file.
Is it something I am doing wrongly?
You probably need to configure the output file to be binary, not ascii. The default translation for a newly opened file is "auto", which does system-specific translation of the end-of-line characters, which is not what you want for a .zip file. Configure this using fconfigure on the handle after opening it or by adding the BINARY access flag to the open command.
See http://www.tcl.tk/man/tcl8.5/TclCmd/open.htm and http://www.tcl.tk/man/tcl8.5/TclCmd/fconfigure.htm for details on the syntax.

Resources