Identify old dos system file type and decode it into text file - bin

I have pick up an old dos system from my friend, and I need to import the data into SQL, but before importing the data, i need to decode it into a readable text file, but I failed to do so. I have try several stuff:
file command in ubuntu terminal, it said "data"
Use online trid and it said macbin(MacBinary 1)
Tried bin2hex, but couldn't unhex it
Tried some online macbin to hex, no luck as well
Tried to open in macOS, but it keep extracting files
bin2hex said, nothing here
stuffitexpander.... Doesn't recognize...
This is the file that i need to decode
https://gofile.io/?c=wdbs6A
Please let me know if you need the original program.

I think they are just some database files.
Use this site for explanations. they even have a file analyzer - showing you the data inside.
You will need to rename the files to .db extension instead of .ocm.

Related

How do I add files to my app and find their path to access them

I have some txt files that store some important data for my app. Due to its nature I want them to be in external text files. Currently i plan on reading them using a streamreader that reads the txt line by line. However, i don't know where to put my txt files, so i can access them in my streamreader which requires their path. Ive seen examples of using NSBundle.mainBundlepathforResource. However, I'm not really sure what a Bundle is or how to place my files there in the first place.
You can use NSBundle. Here's another answer that shows how to create and use bundles: https://stackoverflow.com/a/23884501/1228075

xlsx to plist in Spanish - accented characters being lost

I have been using "Plist Converter" to get my data from csv files (excel spreadsheets saved as csv files) into plists up to now and have never had any issues with it.
However, I am currently working on an app where the data I need to convert is in Spanish.
The conversion obviously still works but I lose all of the accented characters during the process. It looks like maybe some are just lost, some are changed to other accents/characters, and the majority are replaced with an upside down question mark that does not appear on the screen but I can see it in the source code.
Anyone help me get around this with plist converter, or recommend another utility?
iMac, Excel for mac, plist converter, xcode... that is what I'm using.
Thanks
Look at libxls on SouceForge - it comes with a utility to take a .xls file and create a .csv one that you can further process using command line tools. But it has no support for .xlsx.

Read fm file in netCobol Fujitsu

I have multiple *.fm files. if I open some file in notepad, in the header I can see "rmkf"
I only want open this file.
I tried to connect with the jdbc driver but it says HXTT need the file data structure (FD) have also tested with an application developed in Delphy that extracts some data but not all
I do not know what else to investigate
thanks!
Looking at the extension, is this a framemaker file?
http://www.fileinfo.com/extension/fm

(rails) how to validate whether an uploaded .txt file is not, say, an image file?

I have a upload text file field, and with it I plan to save the file somewhere and then store the location of the file in a database. However, I want to make sure the file they uploaded is a .txt file, and not, say, an image file. I imagine this happens in the validation step. How does one validate such a thing? Also, how do you get the filename of the uploaded file? I could always just check if it said '.txt' but for future reference knowing how to validate without just the filename would be helpful.
Trying to validate the contents of a file based on the filename extension is opening the door for major hackerdom. It's trivial to change the extension and upload the file.
If you are on a Mac/Linux/Unix-based system the OS "file" command is the standard because it looks inside the file for key bytes that flag file types. http://en.wikipedia.org/wiki/File_(Unix) I'm not sure what's available for Windows, but this might help: Determine file type in Ruby
One way of doing it, the simple way really, would be to pass the file through an image loader, preferably one that handles multiple common formats, and see if it throws an error.
The other way is to manually check the file header for common image format headers. For example, .bmp files start with BM. Other formats have their own specific markings you can use.

Upload file type verification with Rails and Javascript

I'm currently working on a project where users can upload datasets in CSV format.
Is there a good way with Ruby other than checking file extension to determine if they're really uploading a CSV and not some executable or some other file type?
You can't do this in javascript that's for sure. If you're in a UNIX environment, you can check the documentation about this.
I don't think there is any SURE way of checking this. Usually checking the file extension is fine. Plus you said you're getting CSVs, couldn't you try to parse them? If it fails, then either the document is not at the right format or it's not a csv.
Anyways, make sure that you're storing your files in a directory that has no execute access right.

Resources