Read omni.jar archive file with MiniZip library - c

Firefox store its default configuration information in omni.jar (older version) or omni.ja (later versions). Both omni.jar and omni.ja just are zip file format. So we can use many programs/libraries to compress or decompress them.
I want to get some default information of Firefox. So I must read some file in those omni file. I have used 7zip program to see the content of omni or MiniZip/Zlib library to read omni in my program.
With later version, omni.ja, it is read well. But with older versions, MiniZip cannot open the omni.jar file. Then I use 7zip to open those file: omni.ja was ok, omni.jar was fail. But with some other program, ex: WinRar, WinZip, ... both omni file is opened well.
I was google and get some information: with older version, Firefox has created the omni.jar file (a zip file format) with no zip standard. blah blah. But why WinRar or WinZip can read.
Anyone can help me to get MiniZip read omni.jar file with no error?
Thank you very much.

The solution is pretty simple: Your "old" omni.jar is broken. My omni.jar starts with PK.
I suggest to download Firefox from the official archive once more.
[EDIT] It seems that different builds of Firefox use different tools to built the ZIP archive. The en-US version uses a ZIP-like format which doesn't start with PK. While in theory the file format is valid (it contains data followed by the list of entries), almost no tool really supports this format (so WinZIP and WinRAR are the exceptions).
This intention is reflected by the rename of omni.jar to omni.ja: It's not encrypted, it's just a ZIP format that isn't widely supported and the US Firefox developers don't want to change this.
The other developers (for example for the de version) use official tools to build the omni archive so those versions can be modified with any tool.
You will need to find a way to update the archive using WinZIP / WinRAR or you need to download the original firefox sources and add your patches to the build process.

Related

My Java zipped file not supported in Junzip C program

I have written a Java program to zip files and to unzip them in an unzipping C program called Junzip.
https://github.com/jokkebk/JUnzip. I'm able to unzip the file using 7zip file extractor. But when using C Junzip, its not unzipping.
But when I'm unzipping the file, which was zipped using normal file compressor, I'm able to unzip it using the same jUnzip library.
Author of the JUnzip library here, just came across this question. Did I understand correctly that .zip files made by your program unzip correctly with 7zip, but not with JUnzip, whereas JUnzip seems to be able to uncompress .zip files made by others?
Without further info, it's hard to say if there's a .zip feature you are using that JUnzip does not support, or if there's a bug in JUnzip. One possible reason is that the library and junzip.exe only supports a limited set of compression methods, namely Deflate that is supported by zlib library it uses. The code base is rather small so you could probably add a few debug statements to see where it goes wrong.
You can check out https://codeandlife.com/2014/01/01/unzip-library-for-c/ for some details regarding JUnzip.

What format is the database dump from the Georeferenzierung project?

I am searching for a way to access the data contained in a dump file of Wikipedia's georeferencing project offered on this site at the bottom of the righthand box. download link
After unpacking the .gz archive, a 4.7GB file named new_red0 remains without any file extension.
Can anyone help me open this file using Windows 10?

Decompressing .lz file

Curiosity is one of my personal keys. I got a folder of an executable c application, this folder include many files some are files.so , files.ini and other files.lz and I decided to try do some kind of reverse engineering, so I have used a reverse engineering online tool for the files.so and files.ini are already opened via notepad as we all know, but now my problem is about opening files.lz, which i already know that it contains libraries to be used for functions on files.so
This is what i want to know and to have some help in it how can I decompress it via a desktop tool or even an online tool?
Should be Lzip.
When you are in the linux-world, one very usefull commands is file:
$ file myFile.lz
myFile.lz: lzip compressed data, version: 1

How do I set the file version and product version properties for a self-extracting zip file?

I have an EXE file which is a self-extracting zip file. How do I set the product version and file version on the EXE file? Windows lists them in the file properties, but they are all blank. The Description field available in Winzip seems to have no impact on file properties.
I am using Winzip Self-Extractor 4.0 Personal Edition, but other solutions/workarounds would be appreciated.
You can use a resource editor to manually change the product and file versions of an executable. There are many available on the internet such as ResEdit, Resource Hacker, XN Resource Editor, etc.
If you are programmatically producing this self-extracting zip, you can use DotNetZip to do it. There's a programmatic interface to specify all that stuff.

File extension .DB - What kind of database is it exactly?

I have a database file with .DB file extension. I have been googling and it looks like SQLite. I tried to connect to it using SQLite and SQLite3 drivers and I am getting an error "File is encrypted or not a database".
So I dont know if file is encrypted or it is not an SQLite database. Are there any other options what should the .DB extension should be? How do I find out that file is encrypted?
I tried to open it in the text editor and it is mostly a mess of charaters and some times there are words visible. I have uploaded the file here: http://cl.ly/3k0E01373r3v182a3p1o for the closer look.
Thank you for your hints and ideas what to do and how to work with this file.
Marco Pontello's TrID is a great way to determine the type of any file.
TrID is simple to use. Just run TrID and point it to the file to be analyzed. The file will be read and compared with the definitions in the database. Results are presented in order of highest probability.
Just download the executable and the latest definitions file into the same directory and then run TrID:
trid.exe "path/to/file.xyz"
It will output a list of possible file types for the file with a confidence rating. Here's a screenshot of using TrID to analyze a SQLite database file:
There's also a GUI version called TrIDNet:
If you're on a Unix-like platform (Mac OS X, Linux, etc), you could try running file myfile.db to see if that can figure out what type of file it is. The file utility will inspect the beginning of the file, looking for any clues like magic numbers, headers, and so on to determine the type of the file.
Look at the first 30 bytes of the file (open it in Notepad, Notepad++ or another simple text viewer). There's usually some kind of tag or extension name in there.
Both SQLite 2 and SQLite 3 have a very clear message: SQLite format 3 for SQLite 3 (obviously) and This file contains an SQLite 2.1 database for SQLite 2.
Note that encrypted SQLite databases don't have a header like that since the entire file is encrypted. See siyw's comment below.
On a Unix-like system (or Cygwin under Windows), the strings utility will search a file for strings, and print them to stdout. Might help you narrow the field.
There are a lot of programs besides database programs that use a "db" extension, including
ArcView Object Database File (ESRI)
MultiEdit
Netscape
Palm
and so on. Google "file extensions" for some sites that catalog file extensions and the programs that use them.
There's no conclusive way to know, because SQLite encrypts the entire database file, including the header.
Further, there's not a lot of difference to you, except for possible error text to a user if you're prompting them for a password.

Resources