Wednesday, June 12, 2013

Canada's naïveté leading to greater hosting of cyber criminals, malware, Wordpress break-ins - CIRA .CA issuer needs to step-up

































The number of Canadian websites falling victim to malware – most of them completely legitimate, like the content management platform WordPress – also increased by 25 per cent this year, slotting Canada into the 10th position of all countries hosting malware.

Tuesday, May 21, 2013

Chrome : This page wants to install a service handler


When accessing Google Mail or Google Calendar from Chrome, a protocol handler icon Protocol Handler may appear in the in address bar (omnibox in Google parlance) to indicate to a custom service handler for handling the opening of certain links that can open programs, such as mailto: links. These links are described by URI scheme and most commons ones are (:mailto and webcal:).
The tooltip for the protocol handler icon is: This page wants to install a service handler.

If you Use Gmail option, it will allow mailto: links in page while in Chrome to be opened in GMail. Similarly, you can enable  webcal: links to be opened in Google Calendar, visit the Google Calendar page to enable.
There is no penalty for performance using this handler service.

To disable site handler requests

Type this in address bar to get to current handlers in Chrome.

 Chrome://settings/handlers 

Or to disable or re-enable these messages in Chrome, follow the steps below.
  1. Click the Chrome menu Chrome menu on the browser toolbar.
  2. Select Settings > Show advanced settings.
  3. In the "Privacy" section, click Content settings.
  4. In the dialog that appears, find the “Handlers” section:
    • To allow requests, select “Allow sites to ask to become default handlers for protocols.”
    • To disable requests, select “Do not allow any site to handle protocols.”

You can create your own service handlers !

For Chrome (13+), Firefox (3.0+) and Opera (11.60+) it is possible to register web application as service handler for custom URI scheme using JavaScript API:
window.navigator.registerProtocolHandler(protocol, uri, title);
  • protocol is the protocol the site wishes to handle, specified as a string.
  • uri is the URI to the handler as a string. You can include "%s" to indicate where to insert the escaped URI of the document to be handled.
  • title is the title of the handler presented to the user as a string.
Specifically for Chrome there is a limitation that does not allow to use custom schemes that don't start with web+ prefix (except standard ones: mailtommsnntprtsp and webcal). So if you want to register your web app as service handler as GMail do, you should write something like this:
navigator.registerProtocolHandler("mailto", "https://www.example.com/?uri=%s", "Example Mail");
OR 
navigator.registerProtocolHandler("web+myscheme", "https://www.example.com/?uri=%s", "My Cool App");

Pay attention at URI pattern, it have to contain %s which will be replaced with actual URI of the link user clicks. For example:
 href="web+myscheme:some+data">Open in "My Cool App"
will trigger GET request to http://www.example.com/?uri=web%2Bmyscheme%3Asome%20data


Tuesday, May 14, 2013

Oracle SQL Developer 3.2 Supports MySQL Community Server 5.6.11


Just installed new version of Oracle SQL Developer 3.2 and confirming that it connects to MySQL Community Server 5.1+ by using MySQL Connector/J is version mysql-connector-java-5.1.25.(JDBC driver for MySQL).

You can get Connector/J here http://dev.mysql.com/downloads/connector/j/

Follow these instructions (still valid) to connect to MySQL.



Friday, May 10, 2013

The Best Way to Obscure an Email Address on a Website

It still happens, you see websites listing full contact email address on their site.


E.g.
 bender@futurama.com

As a general rule of thumb, if you can plainly read your email address on a site it can be spammed!

Spamming bots can scrap your webpage/HTML quite easily.

To prove the point, here's a 1 liner you can execute from Linux/Mac OS Bash shell to just that.

The best solution is not to list your email address at all. Use a contact form. However, some users don't like filling out poorly designed forms that have too many useless fields. Moreover, user's are never sure if the form delivers and that form post or email address is active. So sometimes, the immediacy of a really email address can't be beat. 

The following Javascript code is a great way to hide your email address from being spammed on your webpage.

How to use: 
  1. Cut and paste the Javsacript below into your page where you want your clickable obscured email to appear. 
  2. Open a tab in your browser to http://www.rot13.com/index.php. Cut and paste your email address (bender@futurama.com) into the textarea. Click button to encode. Cut and replace the string add your ROT13 encrypted email address here in the Javascript file. You must keep the single quotes. 
  3. Replace xxxx with a name of user, such as Bender-The Robot that will be active email link, which will read on your site as Bender-The Robot's Mail. 
  4. You can change the text after </script> tag, but you need the closing </a> tag.

I DON’T THINK SO!


I DON’T THINK SO!



The
wp-login.php page has been disabled!







Continued failed log-in attempts, will be reported to 
the Federal Trade Commission at spam@uce.gov


Wednesday, May 8, 2013

The Best PHP Regular Expression Tester


The best PHP Regular Expression Tester http://www.lumadis.be/regex/test_regex.php 






Regex Humor - Please add to this list 

// # What's up, dude?
/.*/        # Whatever!  (#)
! /./       # Not!
/[#!%$&*]+/ # Screw you!