Sexy Pictures, Sexy Mozilla :)

March 27th, 2008 by Sajith M.R

Sexy Mozilla

You like pictures ?

You like Mozilla ?

If so proceed reading this post. Else close this window and take rest :)

Mozilla on Boobs

Do you like google image search ? If so scroll down. Else click on the red cross button at the top right part of this window, and watch some movie :)

Mozilla Tattoo

Do you like flickr ? Do you like photobucket, or piccassa ? If you shake your head vertically, go on with this post

Lady mozilla

You like 3D ? You like animations ? Of course you must like this post :)

you like ME :) ??? you like sajithmr.com ? Be patient for a few seconds more :) and my thanks for not killing me :) .

Then what the whole post pointing to is A mozilla plugin for those who use google image search, flicker etc, and those you like mozilla; and its name is PicLens . I am not posting it’s uses and screenshots here as i am not willing to reveal the surprise ;)

So go to

https://addons.mozilla.org/en-US/firefox/addon/5579


and install this plugin. Click on the blue play button on the right side of your browser .

Comment me if you like this plugin

Regards

Sajith.M.R (91.6)

Want More Pics ?

subscribe via email:

Enter your email address: 
 

Gmail Architecture

March 26th, 2008 by Sajith M.R
This entry is part 1 of 3 in the series Gmail Architecture

Gmail Logo
Gmail is the best application website i ever seen. Simple implementation, Super Ajax, Cute Chatting, Status Messages, Fast Mail Checking, Live updating and its features are endless as my wordpress database wont withstand

when you type: www.gmail.com, the following action will happen. See it is very interesting.

Script1
It first load the javascript file : https://mail.google.com/mail?view=page&name=browser&ver=1k96igf4806cy

It checks the browser type, os etc

the function navigator.userAgent.toLowerCase() checks with opera, msie,mac,gecko,safari,palmsource,regking,windows ce,avantgo,stb,pda; sony/com2 etc browsers

that is script 1’s job.

Script 2 calculate the round trip time for a 1 pixel image. This is for finding the internet speed of the user

function GetRoundtripTimeFunction(start)
{
return function()
{
var end = (new Date()).getTime();
SetGmailCookie(”GMAIL_RTT”, (end - start));

}
}

Since gmail uses iframes , this script also make sure to load the actual home
top.location = self.location.href

It also set cookie to show which of the google service is using.

Then loads the login form and set focus on password field.

Gmail Login

Script 3 handles the https connection and cookie settings for secured login

Yet the web 2.0 concept is on the peak, gmail uses table layout design instad of div style designs :)

Gmail’s login form ’s action is pointing to “https://www.google.com/accounts/ServiceLoginAuth?service=mail”

This is the general url for google account login. Here service=mail parameter indicates , this is gmail logging

When the logging verification done, the page is redirected into corresponding service by javascript:

location.replace(”http://www.google.co.in/accounts/SetSID?……etc etc”);

After setting proper session and cookies for login, the non secured site http://mail.google.com/mail page automatically get refresh by this meta tag:
<meta content=”0;URL=http://mail.google.com/mail/” http-equiv=”Refresh”/>

When loading the mail page after setting proper login sessions, around 28 ajax web request begin to start, and load all the mails, labels, channels etc

The above mentioned all javascript is also here in this mail loading page

The first division (div) inside the body tag is that for loading. A while text “loading…” with red backgroud.
<div class=”msg”> Loading… </div>

This is the waiting symbol for all the ajax call to load

Loading

There is also a timer is working to check the loading time of ajax requests. If it takes more time than expected (or calculated), it show this error “This seems to be taking longer than usual”

Automatically they provide navigation links for basic html version.

The total page of gmail is created by a set of iframes
viz

HIST_IFRAME
SOUND_IFRAME
CANVAS_IFRAME
JS_IFRAME

The Sound_Iframe session loads a flash object (shock wave file) for playing the sound , when chat works. (Google chat indicator)

Chat window

<embed id=”flash_object” type=”application/x-shockwave-flash” pluginspage=”http://www.macromedia.com/go/getflashplayer” quality=”high” style=”position: absolute; top: 0px; left: 0px; height: 100px; width: 100px;” src=”im/sound.swf”/>

Gmail saves each sections- labels, inbox, mails etc in array with a unique id. This unique id is for checking the updations on the fly using ajax.

For example : http://mail.google.com/mail/?ui=2&ik=42e598c952&view=tl&start=50&num=70&auto=1&ari=120&rt=j&search=inbox

The above url pics all the data as javascript array format. Check this link after logging in gmail. You can see your labels, your from email accounts, your settings,
your last arrived 70 emails subject and from etc information in javascript array format.

This is the url which is to be called when you click older and newer mail (pagination below)

Gmail always call this url : http://mail.google.com/mail/channel/bind?at=xn3j2zpul6ptan694kr6javrldi43s&VER=6&it=93079&SID=584B451AB93DBDC&RID=16351&zx=lniy7w-6psisw&t=1

(leave the parameters value) for checking updatations. This is gmails rpc checking for new updations .

If there is any updation new rpc with post method automatically called to get new data. The calling url is same , the one above
http://mail.google.com/mail/?ui=2&ik=42e598c952&view=tl&start=0&num=70&auto=1&ari=120&rt=j&search=inbox

It results new data as javascript array format. The rest of the arrangements are handled by the script from client side.

Whenever you open a mail from inbox, the browser send another request for loading the sponsered links (advtisement) though this rpc
http://mail.google.com/mail/?ui=2&ik=42e598c952&view=ad&th=118e57dc03d67f16&search=inbox

The CANVAS_IFRAME is the main iframe contains all the layout of gmail

It contains the left side chat, main inbox or mails right side ads, and all the controls

The left side chat is created using table.

JS_IFRAME contains all the javascripts files for gmail full implementation. There are around 89 js files.

Chat

When you chat with somebody, the url calling is : http://mail.google.com/mail/channel/bind?at=xn3j2zpul6ptan694kr6javrldi43s&VER=6&it=891&SID=7D4E9A779225DC1&RID=50595&zx=hrsqkf-nwummu&t=1

as POST method with parameters:
req2_text <your chat>
req2_to <sender’s email address>
req0_type cf
req1_cmd a
req0_focused 1

Now,

http://mail.google.com/mail/channel/bind?at=xn3j2zpul6ptan694kr6javrldi43s&VER=6&it=531&RID=rpc&SID=48DD6BA8E1D3A326&CI=1&AID=176&TYPE=xmlhttp&zx=m0iiwn-ok5jqr&t=1

the above url return the chat friends and theire status messages

==========================================================

Same url is using for getting the chat messages.

For example when kenney.jacob@gmail chat with me , the message comes as an array like this:

[184,[”m”,”kenney.jacob@gmail.com”,”730DFDF6F013F640_161″,”active”,”hi da”,”hi da”,1206444193169,

,,0,0,0,0,[]

,”square”]

Foster says

Here active implies the chat is active or not (the window with orange color) and with a chat alert if the window is not active.

http://mail.google.com/mail/channel/test?at=xn3j2zpul6ptan694kr6javrldi43s&VER=6&it=24343&MODE=init&zx=1vyx51-ze670&t=1

The above url checks whether the chat is enable or not. which returns an array:
[”b”,”chatenabled”]

Gmails file uploading is another interesting thing. I already posted ajax file uploading : http://www.sajithmr.com/upload-files-like-gmail/

I will post more about gmail architecture soon .

Wordpress Theme - Sythoos

March 17th, 2008 by Sajith M.R

Wordpress Theme  -  Sythoos

Sythoos wordpress theme is now public . You can download the theme of this site from

Sythoos Theme

Wordpress Theme Download

Features >>

  1. Simply whitish theme
  2. Readable font type and size
  3. Comfortable colors
  4. SEO based theme
  5. Apt place for adding google advertisements
  6. Google Map Api showing current visitors locations and count
  7. Super commenting structure
  8. Fast Loading

See the screenshots:

Home Page >>

Home page view

Google Map >>

Google Map integrated

Simple Commenting >>

Simple Commenting and Related Posts

Wordpress Theme Download

Download sythoos.zip file and extract and place it in your wp-content/themes folder. Go to Presentation Tab in wordpress admin control panel and click on sythoos to activate. Enjoy Wordpress :)

Todo Reminder (http://remind.olph.in)

March 16th, 2008 by Sajith M.R

Todo Reminder Logo

Todo Reminder - Mozilla Plugin

Todo Reminder is a Mozilla Plugin, which can be used to set Reminder for Your Friends for a particular event on a particular date. Your Friend will get Email / SMS alert some days before (Called Heat) that event. So you never forgot a particular event / ToDo.

For example, when you composing an Email to your friends for your College Get together on March 21. While composing mail you can simple add a reminder to all of your friends by a single mouse Click, so that all of your friends get reminder emails / sms on that day.

You can Download the Plugin here

Here is the screen short of composing an Email in Gmail:

Composing a Mail

Before Sending this mail, Select all email addresses and right click :

Right Click for Todo Reminder

(You can select any set of emails from any web page and can add reminder like this)

Launching the TodoReminder Plugin:

Start Todo Reminder plugin

Here you can see all of your selected emails, you can put a Subject for your Reminder, Date of Event, and How many days before the alert to be provided (Lets call it HEAT). If Date is March 21 and 3 is the HEAT, then your friends will get alert email from 18th March to 21 March.

See the window after setting the Reminder

Todo Reminder Successfully Set

Enough, Your Friends automatically gets Reminder Emails along with your email. He can Accept or Reject your reminder.

The screen shot of the email your friend gets:

Your Reminder Email

When he clicks the Reminder Activation link, A Confirmation window will pop up , and he can Accept or Reject the reminder and also can Edit the HEAT (How many days before the alert to be started)

Screen shot of Confirmation Popup:

Todo Reminder Confirmation

Download the plugin Now

Todo Reminder - Mozilla Plugin


For more, go to TodoReminder Online Service : http://remind.olph.in

 

Mozilla Plugin for Gmail

March 14th, 2008 by Sajith M.R

Gmail logo

I personally like gmail than any other webmail service in this world. I was a regular yahoo mail user two years before, and i used yahoo messenger also. I am not blaming yahoo mail service, i don’t know the reason for this switching exactly, but i like gmail. Might be because of its simple chat, simple Ajax implementation, very simple look, etc . But the thing i want to disclose is not a mere comparison of gmail and yahoo, that is not my concern here.

Firefox logo

Some additional features i expected while using gmail are HTML signature, customizing the view, labellings, theme , removal of ads , i am not revealing the climax of the movie here :) but i got a mozilla plugin which does all the lagging features of gmail what i expected, and its name is Better Gmail (They could have put better name) .

You can download that plugin from here : Better Gmail

Screen shot:
Better Gmail Screen Shot

Download the plugin and install and refresh gmail page after making any changes in the option. Put a better html signature with images , links etc like yahoo, customize your gmail as you wish.

Google Mail Logo

(Tips: For 100% working of this plugin, you need to switch into older gmail version)

Forward this email… Earn Money !!! Fraud

March 9th, 2008 by Sajith M.R

email fraud

Sometimes you get some email forward contains:

1) Please forward this mail to your friends. 4.5 Month old child needs help. Don’t spend money - just forward this email to all your contacts - you will help her by contributing 10 cents for each email you send.

2) Do you want to know your girl friend’s name? Just forward this mail and press Shift + Ctrl + P (or some key combinations). Your girlfriend’s name will appear on screen.

3) Forward this mail to at least 10 people and you will hear good news you were waiting for with in a week!!

email fraud

4) Mail from Yahoo (or MSN etc): your account will be removed if you don’t forward this message to everyone.

5) Forward this email to maximum people. When it reaches 1000 , everybody will get 100$ each.

These all are email frauds. Never respond or forward such emails. Either delete to or mark it as Spam. Or at least do nothing !!!

This process is otherwise called Mail Chaining or Chain Letter.
Aim of the Sender(The one who started this mail thread first) will be one of below :

1) Advertisement: When you close watch each email (The Chain Letter), you can see some links, either it is ads or some fraud sites links. While forwarding among 100 people, at least 25 people will click on that link and visit their site.

email fraud

2) Email Spamming: Some mails contain some reply email address by mentioning it as “reply to this email if you want to know more”. Just look on your FORWARD, you can see more than 500 email addresses of knowns and unknowns.

What will happen if you reply the mail, all this mail address are simply forwarded to the email creator. Who will use these email collections for further spamming !!! TRAPPED right ?

email fraud

3) Signatures: Not only their email addresses, if you reply to the sender with this Forwarded Mail he can collect a lots of Email Signatures, which is created by each forward. Then not just your email even your personal info also gets back to the creator. TRAPPED Again ???

email fraud

4) Money Making : The mail such as forward 1000 people and get 100$ each is another mode of fraud. If you enquire or ask for money to the initial sender, he will say - “Okay, you will get money send us your credit card details etc.”
Or they will say, “for transacting this money, you have to give as $2 for transaction charges, so that we can transfer 1000$ to you”. You can only dream your 1000$, and it never will get. TRAPPED AT LAST ?

So Discard these fraud email forwards. Remember one thing, “There is no Free Lunch”.

The Tale of Tail (Unix Command)

March 6th, 2008 by Sajith M.R

Unix Tail Function

The most interesting and useful command i ever used is tail in unix. As the name indicate its duty is to show the last lines of a particular file. When take the case of log files such as error logs, always we have to know the last lines or last updations instead of reading from top to bottom or search a full text file.

for its option try this tail –help

tail -n 10 error.log

shows last 10 lines of error.log

The very interesting option is -f , means open the file and follow the last lines.

This is very useful for debugging purpose. For example if you want to check error.log lively, use this option

tail -f error.log

it displays last lines and also automatically updates when any changes happens in error.log file. So you can check other operation by tailing and following a particular file .

Try today itself. You will be very much interested, thats my guarantee :)

(There is also a similar function ‘head’, you can guess what its use, google it for more)

Regards

Sajith

I hate stumble spammers

March 4th, 2008 by Sajith M.R

I hate stumble spammers

The idea attracted me some months back is that of stumbleupon. There you can customize your likes and dislikes. You can categories your likes. After this you can view websites as per your interest. What you have to do is just press the stumble button in your browser’s stumble plug-in. This is like taking books from library. Every day as a course I used to stumble around 20 web pages. It is very wonder to see this, that all the sites getting will be exact on your interest. And if you like that site, you can click I like it button else I dislike button. If you have no opinion on that just leave it and stumble next pages. The backend of stumble upon automatically learns your likes and dislikes and it serves you next pages depending on this knowledge base.

But one thing I noticed some days that, now the websites getting from stumble is not that much suit to my interest. If I stumble 10 websites, I got only three best sites. (In old days it was around 9 :( ) This is happening just because of stumble spamming. There are some websites which doing stumble exchange. As the traffic through stumble increases, most of the websites managers use its loop hole. What is a stumble exchange is, if you add my website as you like it, then I will do same for yours. Thus what results is, improper, non valid, ad oriented, mere marketing based sites will get gather in this pure stumble.

So I hate stumble spammers, as it reduces stumbles real effect, and real mining capabilities. And one more thing also to remember is , the revenue model of this stumble site is also from custom injection of other sponsored sites with stumbleupon’s support . So there is a built in “spamming” in stumble’s revenue model. And these entire stumble exchanges are in addition to this. Then what will happen; normal users like me will get mislead. But still I stumble around 50 sites everyday.

Hack the Password !!!

March 3rd, 2008 by Sajith M.R

Hack the Password

Can you recheck your first php program which you have done with database backend support. Is there any password storing field in that ?.

If so you might saved your password as its plain text format without any encryption or hashing , right ? If not, you are very genius programmer by birth. What would happen if your database is leaked or somebody hacked your database, after you hosted your website and a lots of user registered or submitted their account with password. You are trapped. The hacker can access the user account by acquiring the password (saved without any encryption). The user can sue you for publishing his password open. So beware of this password saving while doing big project which is being hosted for a huge public usage.

Then what are the mechanism for saving password in database ?

One is you can save password after digesting or hashing , and and while rechecking the account or login you can compared the hash of password entered with the password stored in database. For that in php you can use this function:

<?php $hash_password = sha1($password); ?>

Is this method all enough for full security. No , Never. For example, if you already know somebody’s password, say Sanjay’s password is : access, and you got the database and you will get the hash encoded string of the password: access. Suppose “XYZ123#@!” is the hash password got from database. Then you can reverse compare whether there any other user having hash text with “XYZ123#@!”, and thus you can get the password of that particular user. Hacked Again !!!

How to avoid this. Yes solution is Salting. Add some salt(random string) to current password and hash the whole password and save in database. Remember to save the salt value too in another field of the table , for rechecking the account login. Then for same password say”accesss”, you will get different hash digests. Thus the reverse caparison from know password can be avoided.

<?php
$salt = rand(1000,99999);
$hash_password = sha1($password . $salt ); ?>

Is this all enough for full security. Need not to think about the same salt for same password while creating random salt value. The probability for that is .00000….followed by 1000000 zeros …1 . Means Never.

But we are not taking risk. Add some more information to the password before hashing it. Generate a global constant string that only know to the programmer say : &555$34E$ and call it Global pattern . Append this string also with password+salt string before hashing. This will create more secured digest for your password. Remember , never forgot or miss this Global pattern, otherwise you can never check the login password later. (And it is not like the salt, the value of salt is there in database table) .

<?php $hash_password = sha1($password . $salt . auth::GlobalPattern()); ?>

Enough … No one can hack your password now, even though he get your database. Okay .

(Saving encrypted password also helps to avoid sql injection)

Okay, enjoy programming.

Your’s Sajith