Bypass flash player version check or override the existing version number? - linux

Is it possible to bypass a flash player version check?
I'm using an old embedded Linux device with FF 2.0 and Flash Player 10. Unfortunately we cannot upgrade the existing version any further. YouTube and many other video sites are working fine when modifying the User Agent string of the browser. We only have problems with a few sites that check the Flash player version.
E.g. Flash player check in JavaScript:
if($('.video-player-container').length > 0){
if (swfobject.hasFlashPlayerVersion("10.2.0")) {
else { flashWarning.... }
Or is there a way to override the existing version number without upgrading the player?

You may use a little hack to change the displayed version number. Short indication to do it is to change the shared library file by replacing every occurrence of your old version number with the new one:
sudo sed -i -e 's/your_current_version/desired_version/g' /usr/lib/flashplugin-installer/libflashplayer.so
After this, restart your browser and go to Adobe flash "about" page to see if it worked.
Longer indications may be found in this blog post.
edit: I should add a word of caution here: it is a very dirty method, which will likely work only until the next update of your flash player. And it will likely work only as long as the original and desired versions number have the same number of digits ! So, please do a backup of the original file before attempting it, i.e.
sudo cp /usr/lib/flashplugin-installer/libflashplayer.so /usr/lib/flashplugin-installer/libflashplayer.so.backup
and to restore the original unaltered file, type:
sudo mv /usr/lib/flashplugin-installer/libflashplayer.so.backup /usr/lib/flashplugin-installer/libflashplayer.so

Related

Will --vout=dummy option work with --video-filter=scene?

I am trying to create snapshots from a video stream using the "scene" video filter. I'm on Windows for now, but this will run on Linux I don't want the video output window to display. I can get the scenes to generate if I don't use the --vout=dummy option. When I include that option, it does not generate the scenes.
This example on the Wiki indicates that it's possible. What am I doing wrong?
Here is the line of code from the LibVLCSharp code:
LibVLC libVLC = new LibVLC("--no-audio", "--no-spu", "--vout=dummy", "--video-filter=scene", "--scene-format=jpeg", "--scene-prefix=snap", "--scene-path=C:\\temp\\", "--scene-ratio=100", $"--rtsp-user={rtspUser}", $"--rtsp-pwd={rtspPassword}");
For VLC 3, you will need to disable hardware acceleration which seems incompatible with the dummy vout.
In my tests, it was needed to do that on the media rather than globally:
media.AddOption(":avcodec-hw=none");
I still have mainy "Too high level or recursion" errors, and for that, I guess you'd better open an issue on videolan's trac.

lock preferences in firefox 45.5 on RHEL

I am required to make a custom FireFox profile on a RHEL based system.
most of the configuration are changed inside the FireFox inside the about:config menu.
When I try and lock parameter values using the "mozilla.cfg" file and the "lockPref("", )" function the browser doesn't seem to read those files, I place the file both in: "~/.mozilla/firefox/" and "/usr/lib64/firefox/". I used the http://kb.mozillazine.org/Lock_Prefs guide and some more and still I have no one answer about where those function should be written and how do I check that those functions were loaded.
I would like some clear instructions or a definitive guide that I just couldn't manage to find.
Thanks!
This came up fairly high in a Google search when I was asking the same question, but did not have an answer at the time.
I found the following reference:
https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment
On RHEL7, the files needed to be added to the following locations:
/usr/lib64/firefox/defaults/preferences/autoconfig.js (root:root, 644)
/usr/lib64/firefox/mozilla.cfg (root:root, 644)

Get latest release version number for chrome browser

I am trying to figure out a rather stable way to programmatically determine the latest release version number of the chrome browser.
It doesn't have to be failproof as it's only a nice-to-have-feature I can blend out whenever the result looks "suspicious".
There seems to be no API (is there?).
I dont want to rely on third parties handling that stuff manually.
I dont want to parse any website output.
So I ended up fetching git files.
My first approach was to fetch this file:
https://chromium.googlesource.com/chromium/src.git/+/master/chrome/VERSION?format=TEXT
Which gives the latest version number.
From there on the solution is just a preg_match_all away ...
Unfortunately its not the latest release version but the latest dev version.
There seems to be no "release" branch nor a "release" tag or something else I can think of neither.
You might answer "why?"... I know about feature detection, I know browser sniffing can be fooled and I am aware of the fact that (every) browser will notify their users when it's time to update. Still makes sense in my case. On the other hand its solely for display purposes. Nothing is going to depend on it later on – promise :-)
Any – even the faintest – ideas are highly appreciated!
The Chrome team uses the OmahaProxy dashboard to keep track of current versions in stable/beta/dev/canary. If you can scrape that you can get whatever version number you're looking for.
I've found the following endpoints from OmahaProxy that give the latest stable versions of the respective OS.
Windows: https://omahaproxy.appspot.com/win
Linux: https://omahaproxy.appspot.com/linux
Mac: https://omahaproxy.appspot.com/mac
Feel free to use my online service vergrabber to get latest versions of different kind of software in json format.
It's available at http://vergrabber.kingu.pl/vergrabber.json
If you're on debian based linux, you could install and update your chrome once a day, and somehow parse the version number, but this is not realtime.
For example:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -i google-chrome-stable_current_amd64.deb
Which will give a log like this:
(Reading database ... 113338 files and directories currently installed.)
Preparing to unpack google-chrome-stable_current_amd64.deb ...
Unpacking google-chrome-stable (48.0.2564.97-1) over (47.0.2526.111-1) ...
Setting up google-chrome-stable (48.0.2564.97-1) ...
Processing triggers for menu (2.1.47) ...
Then just parse it.
The ChromiumDash also makes the data available via an API. You can use that to fetch the latest tag for a platform and a channel.
Eg: https://chromiumdash.appspot.com/fetch_releases?channel=Stable&platform=Windows&num=1
Returns
[
{
"channel": "Stable",
"chromium_main_branch_position": 950365,
"hashes": {
"angle": "343b7bb57268e1cb47da26fcb0ed40fe47e8ff5d",
"chromium": "cab11adacc41ee856c79e669c2fd38d8864e52c4",
"dawn": "1b1b658d365591b6a8d4bfb0c3524832c89afc99",
"devtools": "b6f648d8921ea8be8f2b32c2061fec7503b56610",
"pdfium": "27cabf3dae38d0634a53316da0ad069bf0413495",
"skia": "a6986cd7224f104044fd5bc29cb5f80796d76f5a",
"v8": "db77a493a5595b835655b243202ac0c2fb1898a6",
"webrtc": "a6b138d6b4ef3a5b2c87f899b67f3b5c8dd3c002"
},
"milestone": 98,
"platform": "Windows",
"previous_version": "98.0.4758.81",
"time": 1643754840000,
"version": "98.0.4758.82"
}
]

Node-Webkit read MP3 files

I use the audio class to read MP3 file thanks to a little trick : replacing the ffmpegsumo.so of Node-Webkit with the chromium one. This enable the reading of MP3 on Windows but doesn't works on Mac OS. Does anyone know why ?
Here's the code :
player = new Audio()
player.src = '/path/to/the/audio.mp3';
player.play();
This seems to be dependant upon the dll/so being a 32 bit version. I am guessing that is why copying the file from Chrome doesn't work correctly for most people ( my 3 year old phone is the only 32-bit device I have left ).
I keep seeing this link --
https://github.com/rogerwang/node-webkit/wiki/Support-mp3-and-h264-in-video-and-audio-tag
.. but it is a blank page. I am guessing it was deleted since the info was likely not current or correct.
This issue thread has links to some rebuilt ffmpegsumo libraries for both Mac and Windows --
https://github.com/rogerwang/node-webkit/issues/1423
The alternative appears to be rebuilding ffmpegsumo, this thread has some config for doing that -- https://github.com/rogerwang/node-webkit/issues/1208
I am still confused about the licensing on it after you build the library, so that is probably worth some research. Everything about mpeg4-part10 is copyrighted and heavily patent encumbered. I think we all need to get smart enough to stop using mp4/h.264. Before I got this working correctly on node-webkit, it was easier to use ffmpeg to transcode the video to an ogv container using Theora and Vorbis codecs. At this point it seems like iOS is keeping h.264 alive, when it should probably die the horrible death it has earned.

Single-file app with xulrunner - possible?

I have tried to mess with xulrunner before, and now I'm trying once again :)
The "real" tutorial (Getting started with XULRunner - MDN) does, in fact, show that one is supposed to have application.ini and other files (possibly zipped as .xpi, which then requires --install-app ...), and then the call should be like:
xulrunner `pwd`/application.ini
... however, I'd like an easier way to start up - and hence, my hope for single-file XUL application approach :) (A good note here is that one also cannot use the zipped .xpi as an argument to xulrunner, see XULRunner question - DonationCoder.com)
The thing is, I am almost 100% certain that at some point in the past, I have used a simple single-file XUL application, as in (pseudocode):
xulrunner my-xul-app.extension
... but I cannot remember how it went :) So, was that possible with xulrunner, or only with firefox?
As far as I can remember, I used something like a 'my-xul-app.xul' file (as the single-file application), which would specify only, say, a window with a single button (that couldn't really do anything due to lack of javascript) - and I'd like to repeat the same thing now, to refresh my memory (unless I confused something from back then :))
First of all, I found HOWTO: Getting Started with Linux Standalone Apps using XUL - Ubuntu Forums (2007), and I modified the example.xul file used there as:
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id = "myapp"
title = "SQLite Example"
height = "420"
minHeight = "420"
width = "640"
minWidth = "640"
screenX = "10"
screenY = "10"
sizemode = "normal"
xmlns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
<spacer style = "height: 4px; cursor: default;" />
</window>
and I'm trying to "run" this as recommended in link, with:
firefox -no-remote -chrome file:$PWD/example.xul
... and what happens is that Firefox opens, with window size being like 1x1 pixels; if you can find the handle, you can stretch the window, and read:
Remote XUL
This page uses an unsupported technology that is no longer available by default in Firefox.
Ouch :( Answers to this (like How do I fix the Remote XUL error I get when using Firefox 4.x and the Webmail Advanced Interface?) seem to be related to actual remote xul (and recommend a plugin to handle that); but what I want is simply to run a file locally?! Where did the "remote" part come from?
Also, seeing the firefox switch '-app' (Using Firefox 3 as a XUL runtime environment); although it refers to an application.ini, I tried this:
firefox -no-remote -app $PWD/example.xul
... and Firefox just started as usual.
Btw, I cannot see neither -app nor -chrome command line options in firefox --help ;)
But actually, I do not really want to use firefox as an engine - just the xulrunner; and I tried the Firefox approach because I thought it is more-less the same as xulrunner; turns out it isn't (even if you use application.ini: Why does 'firefox -App application.ini' and 'xulrunner application.ini' behave differentely? | Firefox Support Forum):
In any case, if I run just xulrunner (as I wanted to), I get:
$ xulrunner example.xul
Error: App:Name not specified in application.ini
So, I can see everything points to "single source file" app not being possible with xulrunner - but I just wanted to make sure (in case I missed some obscure tutorial :) ). And if it isn't - does anyone remember if it was possible at a previous point in time?
PS:
$ firefox --version
Mozilla Firefox 7.0.1
$ xulrunner --version
Mozilla XULRunner 2.0 - 20110402003021
$ uname -r
2.6.38-11-generic
$ cat /etc/issue
Ubuntu 11.04 \n \l
I don't believe you could ever create single-file XULRunner applications. The -chrome <...> parameter probably used to work, I guess the "Remote XUL" error comes from the fact that the URL is file://, not chrome://.
You could use something like the Live XUL Editor in the Developer Assistant (formerly Extension Developer's extension) to test XUL quickly.
The general idea I hear these days is that you should write HTML5 instead, whenever you can, since it is more actively developed, more well-known technology with less incompatible changes and better tooling...
Here is the answer I wrote for another related question, reproduced here because it may help someone who want to know how to package their XUL application.
It is too bad that xulrunner can not run a zipped .xpi or .xulapp directly, but it is possible to package most of your .js, .xul, .css and .png files into a jar and wrap everything up with a private copy of xulrunner, without having to run --install-app
These are the steps I went through to package our XUL application.
The first step is to put all your files (except application.ini, chrome.manifest, and prefs.js) into a .jar file like this (all of this was carried out under Windows, make appropriate adjustments for Linux and OSX)
zip -r d:\download\space\akenispace.jar * -i *.js *.css *.png *.xul *.dtd
Then in d:\download\space, layout your files as follows:
D:\download\space\akenispace.jar
D:\download\space\application.ini
D:\download\space\chrome.manifest
D:\download\space\defaults
D:\download\space\defaults\preferences
D:\download\space\defaults\preferences\prefs.js
The content of the files are as follows
application.ini
[App]
Vendor=Akeni.Technologies
Name=Akeni.Space
Version=1.2.3
BuildID=20150125
Copyright=Copyright (c) 2015
ID=space#akeni.com
[Gecko]
MinVersion=1.8
MaxVersion=35
chrome.manifest
content akenispace jar:akenispace.jar!/chrome/content/
skin akenispace default jar:akenispace.jar!/chrome/skin/
locale akenispace en-US jar:akenispace.jar!/chrome/locale/en-US/
resource akenispace jar:akenispace.jar!/chrome/resource/
prefs.js
pref("toolkit.defaultChromeURI", "chrome://akenispace/content/space.xul");
Now you can put these files into your .wxs for WiX and produce an MSI file for Wndows.
Of course you need to include all the files for XULRunner as well.

Resources