Neopets : Tyranu Evavu

By w35l3y Last update Nov 27, 2011 — Installed 6,588 times.

line cookie

in
Subscribe to line cookie 4 posts, 3 voices



Steinn Scriptwright

Hi...

Well, can you explain me this line:?

{
var cookies = document.cookie;
var pos = 1+p.length+cookies.lastIndexOf(p+"=");
return cookies.substring(pos,cookies.indexOf(";",pos));
}

on this link:
http://gm.wesley.eti.br/gm_default.js

Sorry, just worried about cookies grabber.

 
w35l3y Script's Author

Very good question! That code is dangerous in bad hands.
That code tries to find the value of an specific cookie.
In my case I use that code to retrieve the language used at neopets.com

Here's an example of that code being used by me:

'Language':(function()
{
	return xpath('string(//select[@name="lang"]/option[@selected]/@value)') || cookieValue('lang');
})(),

http://gm.wesley.eti.br/neopets/neopets_default.js

 
Steinn Scriptwright

Hmm ok.

Sorry, but, i´m ver very very worried about that..

You know...

 
jtaker User
Firefox

I've been using scripts for quite a long time and w35l3y is one of the only people I trust when it comes to them. :P If you take a look at everything he's created, it's all sound and safe. I've been using a lot of his stuff for quite awhile.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel