Join us at IRC!
Hacking isn't just Computers & Exploits. It's a Philosophy. - Mr_Cheese
Thursday, May 17, 2012
Navigation
Members Online
Total Online: 29
Web Spiders: 12
Guests Online: 26
Members Online: 3

Registered Members: 70043
Newest Member: nixium
Latest Articles

FireFox custom search engines



FLV Blaster - Download Music and Videos Faster

website security Tutorial on how to create your own searchplugin for FireFox



If you haven't already noticed there's a search engine quickbar next to the urlbar in FireFox 2
This can be used to search quickly for ex. Google or Wikipedia.

Sometimes when you go to a site the searchplugin list button may turn blue. This means you can add some of that site's functions to the quickbar.

"But how does FireFox know that there is a searchplugin available?"
Well, it's done with simple code in the HTML head:

<head>
<link rel="search" type="application/opensearchdescblockedription+xml" href="Searchplugin XML file url" title="Searchplugin title" />
</head>

"How do I make a searchplugin then?"
For this you need to write an XML file that contains the instructions for FireFox, so that it knows what to search and where. Here's an example of my own XML file:

<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
<os:ShortName>My own searchplugin</os:ShortName>
<os:Descblockedription>My own searchplugin</os:Descblockedription>
<os:InputEncoding>UTF-8</os:InputEncoding>
<os:Image width="16" height="16">data:image/x-icon;base64,R0lGODlhEAAQAJkAAIAA/xwAN7dv/////yH5BAEAAAMALAAAAAAQABAAAAIynA2px6O/WAoCUnCmuPoiQHHgVjmjdqbpxYmuW6ETrIiQalulrGNmjsqogpJbpGF6NAoAOw==</os:Image>
<os:Url type="text/html" method="POST" template="http://www.someexamplesite.com/index.php">
<os:Param name="search" value="{searchTerms}"/>
<os:Param name="page" value="1"/>
</os:Url>
</SearchPlugin>

And broken down:

<os:ShortName>My own searchplugin</os:ShortName>
<os:Descblockedription>My own searchplugin</os:Descblockedription>
Your searchplugin's name and descblockedription. If I remember it right the name will show up in the searchplugin list and descblockedription shows up in the search field if it's blank.

<os:InputEncoding>UTF-8</os:InputEncoding>
The encoding. You'll probably keep it this way, but if you use some special characters you have to change it.

<os:Image width="16" height="16">data:image/x-icon;base64,R0lGODlhEAAQAJkAAIAA/xwAN7dv/////yH5BAEAAAMALAAAAAAQABAAAAIynA2px6O/WAoCUnCmuPoiQHHgVjmjdqbpxYmuW6ETrIiQalulrGNmjsqogpJbpGF6NAoAOw==</os:Image>
This is the fun one :D you get to draw your own icon for your searchplugin! I assume that it should be a 16x16 .ico file. If you are not familiar with how to create icons this may be a bit more difficult. Anyways the icon is encrypted with base64 so it always goes with the XML file. You can encrypt your icon with this:
http://www.motobit.com/util/base64-decoder-encoder.asp
and when you're done with it just put the code between "base64," and "<".

<os:Url type="text/html" method="POST" template="http://www.someexamplesite.com/index.php">
This one is the page that you want to post your search in. You may have to change POST to GET on some sites.

<os:Param name="search" value="{searchTerms}"/>
<os:Param name="page" value="1"/>
These are the inputs for the search form. This is probably the most annoying part. You have to go to that site defined above and find and write all form fields that are necessary for the search in here. The form field that has the search term is going to have {searchTerms} as value.

Now you can add your searchplugin to FireFox the way I mentioned first or manually by putting the XML file directly into FireFox "searchplugins" folder which is located in FF profile folder.

"What's the use? I don't know any site I could use this on"
Well this could be useful with ex. yellowpipe or maybe even HBH search functions.


- Mouzi

Comments

Mouzi on March 22 2007 - 19:13:43
Nooo! I left a typo there. "..they I..." pfft. :D well first article so lets blame that.
Mouzi on March 22 2007 - 19:30:49
Hmm. Edit link. -.- (first article.. I'll blame that again)
ChioDoS on March 24 2007 - 01:32:18
This article sucks ass
Scavix on March 24 2007 - 03:21:38
Some sites need you to use GET instead of POST Other than that, good article. I just added UrbanDictionary.com :)
Mouzi on March 24 2007 - 16:02:02
Ok thanks. I'll add that.
richohealey on May 24 2007 - 13:30:39
awesome. i liked it. adding wikipedia now
Post Comment

Sorry.

You must have completed the challenge Basic 1 and have 100 points or more, to be able to post.
Ratings
Rating is available to members only.

Please login or register to vote.

Awesome! 20% [1 Vote]
Very Good 0% [No Votes]
Good 40% [2 Votes]
Average 0% [No Votes]
Poor 40% [2 Votes]
Guest
Username

Password

Remember Me


Bookmark This Page
Affiliates
Adverts

 

 

Links
By using, viewing or obtaining any information contained on this site, you agree to the disclaimer.

© HellBound Hackers 2008- 2009. Since 3rd December 2004.