PCbanter

PCbanter (http://www.pcbanter.net/index.php)
-   General XP issues or comments (http://www.pcbanter.net/forumdisplay.php?f=18)
-   -   FireFox 52 - Omni.ja - How to read binary JS files ? (http://www.pcbanter.net/showthread.php?t=1105393)

R.Wieser August 6th 18 01:19 PM

FireFox 52 - Omni.ja - How to read binary JS files ?
 
Hello all,

I'm looking into the "omni.ja" files, to see if I can change a thing or two.
But I've run into a bit of a problem: While searching for a certain string I
got two files back, both named "nsSearchService.js".

The problem is that one is readable (a text file), while the other is not.
Can anyone tel me what the non-text version is for ?

And assuming its some kind of pre-compiled version of the text version, what
tool do I need to re-compile the text version into it ?

Regards,
Rudy Wieser

P.s.
I know news.mozilla.org exists. Alas, my previous posts there have been
met with dead silence. Hence my trying here.



Paul[_32_] August 6th 18 03:27 PM

FireFox 52 - Omni.ja - How to read binary JS files ?
 
R.Wieser wrote:
Hello all,

I'm looking into the "omni.ja" files, to see if I can change a thing or two.
But I've run into a bit of a problem: While searching for a certain string I
got two files back, both named "nsSearchService.js".

The problem is that one is readable (a text file), while the other is not.
Can anyone tel me what the non-text version is for ?

And assuming its some kind of pre-compiled version of the text version, what
tool do I need to re-compile the text version into it ?

Regards,
Rudy Wieser

P.s.
I know news.mozilla.org exists. Alas, my previous posts there have been
met with dead silence. Hence my trying here.



Google has an entry for omni.ja . Not sure how omni.ja is
going to help you. And contrary to the description here,
my copy of 7ZIP does open the file for reads.

https://developer.mozilla.org/en-US/...ly_omni.jar%29

The browser usually has a JIT compiler. I couldn't even tell
you what it compiles to... Or how such a file would be
sandboxed, to preventing it writing to arbitrary locations
in the file system. Emitting pure x86 code would be
a dangerous thing.

You should try feeding the files to a Linux "file" command,
and get a declaration of their "type".

It's also possible nsSearchService.js is deprecated. Perhaps
download the tarball for 52.9.0 ESR and have a look ? Do
you have the tarball yet ? I usually load it up on a
RAMDisk, if the plan is to search it more than once.
It still doesn't search very fast, but it's better
than beating the **** out of a hard drive.

The 204MB file.

http://releases.mozilla.org/pub/fire...9.0esr/source/

Paul

JJ[_11_] August 6th 18 05:17 PM

FireFox 52 - Omni.ja - How to read binary JS files ?
 
On Mon, 06 Aug 2018 10:27:11 -0400, Paul wrote:

Google has an entry for omni.ja . Not sure how omni.ja is
going to help you. And contrary to the description here,
my copy of 7ZIP does open the file for reads.

https://developer.mozilla.org/en-US/...ly_omni.jar%29


That article is outdated.

The current JA format has additional data and different of ZIP headers
layout.

The file starts with an offset to one of Local File Header, before the first
"PK" signature. The ZIP data starts with Central Directory Headers, then the
Local File Headers (and their data), then finally the End of Central
Directory Header.

i.e. Offset,FileInfo...,FileData...,EOF

In common ZIP file...

The file starts with the first "PK" signature. The ZIP data starts with
Local File Headers (and their data), then the Central Directory Headers,
then finally the End of Central Directory Record.

i.e. FileData...,FileInfo...,EOF

R.Wieser August 6th 18 05:58 PM

FireFox 52 - Omni.ja - How to read binary JS files ?
 
Hey Paul,

Google has an entry for omni.ja


Yeah, I probably found the same. Being able to use existing "unzip" and
"zip" programs to un- and repack the .JA(R) file beats having to write it
myself.

The browser usually has a JIT compiler.


I thought about that too, but could not imagine why the file would than be
in the .JA file. But if I can't find anything about it I wil probably just
delete the binary .JS file and see what happens.

It's also possible nsSearchService.js is deprecated.


Its too early into my "diving in" to be able to say anything about that, but
as those two where returned when I looked for "browser.search.geoip.url" its
not likely.

Perhaps download the tarball for 52.9.0 ESR and have a look ?


Hmmm. My aim was figuring out the meaning of that second nsSearchService.js
file, and did not even think if it. The fun is that I did download the
sourcefile (you mentioned related to a previous question) and unpacked it,
just so I could do quick peeks in there when needed. :-|

The 204MB file.


Yup. The .tar.xz one.

I just renamed the "binary" nsSearchService.js file, and repacked the
omni.ja . Nothing seems to have changed ...

Regards,
Rudy Wieser



R.Wieser August 6th 18 06:48 PM

FireFox 52 - Omni.ja - How to read binary JS files ?
 
JJ,

That article is outdated.


That might be, but a newer one is nowhere to be found ... :-(

Also, the suggestions mentioned there still seem to work.

The file starts with an offset to one of Local File Header


Yeah, I noticed that too. No idea what its good for. Do you have any ?

Also, after repacking that offset is gone, but FF 52 does not seem to mind.

Regards,
Rudy Wieser





All times are GMT +1. The time now is 05:10 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2004 - 2006 PCbanter
Comments are property of their posters