Trying to convert a .dat file to usable text - file

I'm looking for where to begin with this conversion. I have very limited coding experience (FLL parent) and virtually no support from the software company generating the files.
I am trying to take a data file generated by aircraft avionics that stores GPS waypoint information and read / write new information into it from a PC. The company I work for uses hundreds of waypoints and right now the only way we can create new ones is to do so through the avionics software, which is incredibly time-consuming. I can upload and download the file from the avionics onto a thumb drive but I have no idea how to read it. I opened it in a hex editor and can read the waypoint names, but the GPS coordinates are just garbled text characters.
Where do I start looking for answers? is this something I could convert in C++ or something similar without an overwhelming learning curve?
Thanks in advance.

Related

Decoding audio from non-file source with Microsoft Media Foundation

My question is basically that I am new to this framework and I am looking at pointers to how to work with non-file sources in media foundation since the documentation in this front seems lacking in my mind. Below is some info on what I am doing and what approach I am working with right now but I have no idea if it is the correct way to use the framework.
I am currently trying to use Microsoft Media Foundation to decode audio that I'm getting over Bluetooth and then send it along as PCM audio. When looking at the documentation for ms media foundation it seems that almost all examples assume the source is a file.
Looking at the tutorial for decoding audio for example they use MFCreateSourceReaderFromURL, which I cannot use since my source is not a file.
As I wanted to follow the tutorial and change as little as possible Im thinking that I need only change how I create the source reader and the rest of the process would be the same. I looked at the other SourceReaders available and MFCreateSourceReaderFromByteStream sounds about right for my purposes.
Is there a chance that I only need to create a bytestream and continuously fill it with data that I get over the air as we go and the media source created by MFCreateSourceReaderFromByteStream handle this well? Or do I need to create a custom media source and do more manual work at the lower parts of the API to get something like this to work?
Or maybe a source reader is the wrong approach altogether when the source is not a file? In the main page about Source Reader here they have the following picture:
And this picture shows the media source within the source reader pointing to a source file only, is this a real limitation or simply and example?
Im writing this in plain c, but pointing to c++ documentation or examples is fine as its usually pretty straightforward to translate c++ to c and there seems to be no documentation for c anyways.
Edit:
Im adding a image on what kind of data Im getting, the red area being the chunks of data I refer to in comments below Source.
Non-file source is not a accurate description. Does it have a file structure, just not a file? Structured differently? Raw stream?
If you look at samples with source reader, they assume presence and usage of stream handler capable to parse incoming stream into elementary streams with known type and properties. Then you or Media Foundation could apply decoder or otherwise transform the data.
As you specified that the data come "in chunks", most likely that you are interested in an alternate option to use AAC Decoder explicitly. You can create an instance of it, initialize input and output types, then feed it with compressed audio and pull decoded PCM on the output. The decoder has MFT interface.

storing array values(from microcontroller) shown on hyperterminal to an excel sheet in PC

I want to save the array values(from microcontroller) shown on hyperterminal to an excel sheet in PC and the same question posted here but has no conlcusions
How to retrieve data from PC's Hyperterminal
Can anyone please guide me about this.
Thanks in advance
You should be able to tell hyperterminal to log the session to a file. It may help to use an extension of .csv or rename it later.
Open the file in a text editor and trim out any extraneous beginning/end data. You might have to run a find/replace or two to fix up delimiters
Open the .csv file in Excel and play with the field delimiter settings until you have your data in something approaching the needed columns.
A command line utility called sed can help you a lot with automating delimiter modifications; it's standard on unix-like operating systems, but available for windows (even in a stand alone form). It has a learning curve, but it is very good at this type of thing.

extract .bin files

So I have an old dictionary on my pc, pretty old that I cannot find
any track of it's developer or the website (I guess it hasnt even been released
as an official software). I have a personal project of mine and I might need some
of this words translated (about 200-300) and I see that inside the data folder that
contains the database/list of files but Im unable to extract or read this files.
Is there any way to extract or convert these .bin files to a text format or something
readable. I've used some tools like (alcohol 120%, isobuster, magiciso, Izarc) but with
no luck. I keep getting and error message saying it is not a valid cd image file.
So I'm thinking maybe this type of .bin files are not like .bin or .iso cd files that
you can mount and read and something else might be in this case.
If you have any information kindly reply with
your suggestions.
Thank you alot.
You can try using the strings utility to extract the strings out of the file. It comes with any Linux distribution and if you are on Windows, you can get it from Windows Sysinternals.
If you are lucky and the words are not encoded, you may be able to get at the data you are looking for.
.bin is one of those extensions that has been way overused, and could be anything... What did the file come from originally? Do you need to convert these words and store them back in the original file (in their transformed form), and then expect the original app to work correctly?

Upload and encrypt any file from google app engine

I am making a small project for college in GAE (using Java) in which I implement a form of "messaging service" where when a user sends a message to another user, the message is encrypted by 128-bit AES using Java crypto libraries and then stored on the server. The resulting key then has to be entered by the recipient to be able to read the message.
I now want to incorporate file upload (attachment) capability in this. So that when a user attaches a file (which can be ANY file, jpg,gif,txt,pdf,doc,exe,etc...), it is first encrypted and then stored. I want to interpret any file like a txt file (a sequence of characters), so that encryption/decryption can be done by existing code. (Does this even make sense? I am thinking of this because you can open any file in notepad and see the file as a sequence of characters). I would like to keep a limit on size of attachment as something like 5-10 Mb, but if for some reason this can only be done for even smaller sizes (<1Mb) even then its fine with me.
So if a user attaches a file, say abc.exe, I interpret it as a txt file, abc.txt and encrypt it along with the message. Then when recipient enters the correct key, I decrypt the message and file abc.txt, but serve as abc.exe. (I can ask the user to first convert any file to .txt, but that would be awkward)
Can this be done? And I am a novice to web development, servlets and GAE (my first project using any of these), so please bear with me.
Thank You !!
Well, the simple asnwer is yes: it can be done. The normal operation is to read the file as binary, encrypt the data, then base 64 encode it. Then the receiving side base 64 decodes it, decrypts it and probably writes the data. Base 64 will grow the data though, using 4 characters for every 3 bytes (+ maybe one or two padding bytes at the end).
If you need more information with it, such as the file name, you need to create some kind of container for the data and encrypt that. One solution is to use ASN.1 although that has a relatively large learning curve.
To view an example of this, take a look at the SMIME specifications and the CMS (cryptographic message syntax) which defines mail with encrypted attachments. CMS is broadly used. CMS is available in the bcmail (or subsequent) package of Bouncy Castle.
Note that you need some kind of authentication/integrity protection if you are creating an online protocol with encryption. A good PKI infrastructure may also be needed. This is a pretty large project to undertake.

Legacy dos system with flat file data store (ISAM-Files)

I have a legacy system which used to run on dos. It is an ERP system for retail stores (fashion). It think it stores it's data in flat files.
I have files ending with *.KEY and other files ending with *.D00 (counting up).
I think the key files hold the key informationen and the D-Files hold some data ... there are alot D77 files...
As far as my investigation concerns this is not dfb or foxpro it could proprietary...
The company who wrote it is out of business of course so no chance for support or any hints.
When I open these files in vim or other editors I get some binary signs and some text... I tryed it in hex mode but still nothing to use...
Is there any chance I can dump out the data... in csv, ascii, xml?
I am pretty sure that this is not a standard format. Can someone point me in a direction how those data were stored back in the days and how could I make them read-able...
Any tools, tips or tricks?
// EDIT
After some time I made some progress and can now post some details which I did not now of back then and made a good answer impossible.
I asume that the dos system was written in visual cobol and that the files could be b-tree files stored in ISAM format. I assume the closet thing I could provide is, that there is a possibility that the format is C-ISAM.
How can I access / view or modify these files... C#, JAVA, ruby.... everything new age language would be cool... I am not sure if I can handle cobol... It would be great to have a converter or a viewer tool preferable opensource...
Hope this clearifies more my question =)
OpenCOBOL has a very active user group. The language itself is free and runs on Linux and Windows and perhaps MacOSX. Have a chat to the user group there; they may be able to help.
Peachtree Accounting Software used those file extensions back in 1992.

Resources