Tagged: internet exploder

How To Add Your Favourite Applications To The IE Toolbar

As usual, the quick and dirty way

Notepad, IrfanView and WordWeb added to IE toolbar

If your work requires that you spend a long time on Internet Explorer (IE), you may have felt the need for quick access to some of your favourite programs like Notepad, IrfanView, etc.

In this article, you will learn about a simple way to customize your IE toolbar. This involves adding a few keys to the Windows registry. Windows registry is the main storehouse of vital information about your Windows installation. Be careful or you may have to install Windows again.

Anyway, here we go. In the first example, I will tell you about how I added a toolbar button for the Notepad application. Select the Start menu button and click on the Run option. Type regedit and click the OK button. The Registry Editor will be displayed. Navigate to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Extensions key. Here, you might see keys with names like {A5D12C4E-7B4F-11D3-F5C9-0050045C3C96}. The names of these keys are called globally unique identifiers or GUIDs. In my machine, the A5D12C4E-7B4F-11D3-F5C9-0050045C3C96 GUID uniquely represents the toolbar button for Yahoo! Messenger. For every button you try to add to the IE toolbar, you must come up with a new unique GUID.

For Notepad, I created a key at Extensions branch with a brand-new GUID. (Select Extensions, right click, and select New » Key.) The professional way of generating a unique GUID is to use a tool like guidgen.exe or uuidgen.exe. The MSDN says, “Guidgen.exe never produces the same number twice, no matter how many times it is run or how many different machines it runs on.” Because I decided did not have this tool, I decided to take a risk by generating a new GUID myself. I made some random changes to the alphabets and the numbers in GUID used by Yahoo Messenger.

{A5D12C4E-7B4F-11D3-F5C9-0050045C3C96 – Yahoo Messenger key
{A6D12D4E-7B4F-11D3-F5C9-0060046C3E96} – Notepad key

The GUID is in hexadecimal format, which means that it is made up of numbers from 0 to 9 and the alphabets A to F. In other words, the ID cannot have alphabets from G to Z or fancy characters like *,#,/,%,^,&,* and @.

In the right-side pane of the registry editor, I created the following string values: ButtonText, clsid, Default Visible, Exec, HotIcon, Icon, MenuStartBar, and MenuText. (Right click, select New » String Value.) I set ButtonText and MenuText to Notepad. This value was to be displayed as the label below the toolbar button. The value used by MenuStatusBar was to be displayed in the IE status bar when the mouse pointer or the cursor hovers over the corresponding Tools menu option. The clsid value was set to {1FBA04EE-3024-11d2-8F1F-0000F87ABD16}. This value is a set standard and you should include this as is for any toolbar buttons you may create for your browser. The Exec value was set to the path to the Notepad application file (c:\winnt\notepad.exe). The Default Visible value was set to Yes.

IE_toolbar_demo2

In the Icon and HotIcon values, the number after the comma identifies icon group inside the Notepad application file (notepad.exe). An icon from this icon group was to be displayed on the IE toolbar button. To identify the number for the icon group used by notepad.exe, I used a program called Resource Hacker. If you don’t have Resource Hacker, you can use an icon (ICO) file for the toolbar button application and then then set its path as the Icon and HotIcon values. To create an icon file for your toolbar button application, open its exe file in IrfanView. A number of icons inside the application file will be displayed. You can select an icon from that and save it as a 16×16 24bpp icon file.

UPDATE (14/11/05): Apart from adding ordinary applications to the IE toolbar, you can also add useful script-based applets that will work inside the IE window. For this, you need to create a Script string value instead of an Exec value. The Script will point to a HTML file containing Javascript. In this example, I have created buttons that will scroll up and down a page. If you don’t have relevant icon files, make a bitmap file in Paint and then convert it to an ICO (icon) file using IrfanView.

c:\scrollu.htm

 // IE toolbar script for "Scroll Up"
 // By V. Subhash (10 Nov 2005)
 // http://www.vsubhash.com/

 // identify window object
 var pwin = external.menuArguments;

 // identify window height

 var pwin_ht = pwin.document.body.clientHeight;

 // calculate length to scroll
 var scroll_ht = pwin_ht - (pwin_ht/20);

 // scroll up command
 pwin.scrollBy(0,-scroll_ht);

c:\scrolld.htm

// IE toolbar script for "Scroll Down"
// By V. Subhash (10 Nov 2005)
// http://www.vsubhash.com/

// identify window object
var pwin = external.menuArguments;

// identify window height
var pwin_ht = pwin.document.body.clientHeight;

// calculate length to scroll
var scroll_ht = pwin_ht - (pwin_ht/20);

// scroll down command
pwin.scrollBy(0,scroll_ht);      

Reference

Internet Explorer _search Exploit

Today, I discovered an Internet Explorer exploit that can be used to circumwent popup-blocking software. This exploit can be used by websites and online ad agencies to serve popup advertisements.

Popup blockers target the window.open statement to prevent the opening of new windows. The first parameter for the open statement contains the URL of the advertisement. The second parameter contains the user-defined name for the window. The _search exploit involves the use of the second parameter.

When you use _search, Internet Explorer allows you to open URLs inside the search pane rather than in a new window. For this, the second parameter has to be _search. Popup blockers do not block URLs opened in the search pane of Internet Explorer.

To test the exploit, copy* the following code to a HTML page on a site. Open the page in Internet Explorer. Keep the popup-blocking feature of Google Toolbar or Altavista Toolbar or MSN Toolbar on. None of these toolbars block the test site Yahoo.com from being opened in the search pane.

<html>
 <head>
 <body onload="window.open('http://www.example.com', '_search')">
  <p>Website Content</p>
 </body>
</html> 

When you use some other target window, the second parameter becomes a user-defined name for the window. The toolbars then kick into action and block the test site Yahoo.com from being opened.

<html>
 <head>
 <body onload="window.open('http://www.example.com', 'search')">
  <p>Website Content</p>
 </body>
</html> 

Popup killer utilties including IE toolbars don’t check web pages loaded in the search pane. So, advertisers can load web pages in the search pane and make them launch popups.

UPDATE: Microsoft has eliminated the _search hole in an update.