Tuesday, March 25, 2014

Privoxy RegExs and OpenWRT

Do not assume that just because your Privoxy filters are working on regular Windows/Linux they will keep working on Privoxy for OpenWrt. Limited memory resources can cause certain involved/long RegEx patterns to exhaust it and cause Privoxy and/or OpenWrt crashes. Also, is you are using the "@" character instead of the usual "|" as delimiter in Perl style text substitution regexs do revert back to "|" as "@" is not supported and will also cause Privoxy and even OpenWrt to crash.

If you are doing script injection prefer to inject it through a secondary minimal boot-strap script (that creates a SCRIPT element in the document's DOM and adds the main script as SRC - the script source being served by some URL) rather than injecting it directly through your Privoxy filter configuration file.

Sunday, March 23, 2014

Ghost Javascript syntax error

Something like this will break javascript compilers although it is theoretically valid code:

function lala()
    var o;
    {}if(o) return;

I simplified it to get to the crux of the problem; putting a semicolon or a new line right before the "if" fixes it.

Thursday, March 20, 2014

Transcoding from unknown/undocumented Chinese H.264 DVR streaming protocol to RTMP

These are a couple of videos that I put together in order to inform on project progress a Brazilian client who wanted to transcode streaming H.264 video from a surveillance DVR brand to a media server accepting RTMP (Red5). I eventually got it to work perfectly of course! :)

Sunday, March 16, 2014

Red5 and Java installation

Red5 requires Java to work. Proper Java installation can give you a headache though. Yes, decades after Java was introduced its installation is still an issue quite often!

Here's my way to get it right (on Windows) without delving too much into the reasons of Sun/Oracle's inability to sort this out in so many years:
  • Find and uninstall all Java related entries in "Uninstall a Program" (Control Panel)
  • Remove any related environment variables like CLASSPATH, JAVA_HOME, JRE_HOME and QT_JAVA
  • Also uninstall Red5 if it is already installed
  • Download the latest 32-bit JDK from the Oracle site and install it - make sure you install the JRE version that comes with it (the 64-bit version of the JDK is rarely needed and is mostly incompatible with software that requires Java, including Red5; therefore only install it if ABSOLUTELY needed or you may run into complications and trouble)
  • Now install Red5 and input "" and "5080" in the two dialog popups that come up at the end of the installation.
  • You should now be able to start the Red5 windows service without problem
  • In case it still does not start, set both JAVA_HOME and JRE_HOME to "C:\Program Files (x86)\Java\jre7" and try again.

Tuesday, March 11, 2014

Monday, March 10, 2014

End of Windows XP era

Microsoft is ending support for the Windows XP operating system and Office 2003 product line on April 8, 2014. After this date, these products will no longer receive:
  • Security patches which help protect PCs from harmful viruses, spyware, and other malicious software
  • Assisted technical support from Microsoft
  • Software and content updates
Good bye Win XP! You have been a good OS.

Sunday, March 9, 2014

Amazon & eBay reselling

There is a lot of demand for automatically scraping Amazon listed items, re-listing them on eBay (and vice versa) and making a customizable profit in-between.

Amazon's terms of service (ToS) prohibit this so currently re-sellers are focusing on hiring people who can defeat their detection methods. It is an on-going struggle of course which is good for us IT Security specializing contractors.

Quite interesting to contemplate and execute.

Monday, March 3, 2014

Mini-dump vs full-dump

The difference between a mini-dump and a full-dump is more related to the format of the file than the amount of content/information in it. In fact, with the right configuration, a mini-dump will contain more information than a full-dump ever could and that is why properly configured mini-dumps are recommended in all cases.


Chrome v.33 and extensions installation

As of Chrome v.33 (introduced 2014-02-20) extension installations through Windows registry entries pointing to local crx files are not supported any more. The crx file has to reside on the Chrome web store.

The Chrome security updates just implemented were foreshadowed in this communication: http://blog.chromium.org/2013/11/protecting-windows-users-from-malicious.html

Sunday, March 2, 2014

Barcode scanners and LAMP

It seems that today many inventory control barcode scanners are simply WiFi connected devices accessing a LAMP stack managing the inventory database