LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-03-2012, 12:20 PM   #1
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
odd javascript code, would like explanation as to its function if possible, please


i've been working on migrating a flat page into a CMS and found this script in the head of the HTML code
can anyone explain what this code does?
is it even legit?
Code:
<script language="javascript">
<!--
function gzsYzlENuqwmmtW()
{
var NAgbFSgxFCAdwze=["100","114","x70","x61","117","108","x40","x73","x6f","108","118","x65","x73","x70","x72","111","x62","x6c","101","109","x73","46","x63","x6f","x6d"];
var hxagpxROhfBQFlV=[" "];
var UXFJGfqKAAnYdck=["x64","114","112","97","117","108","x40","x73","x6f","108","x76","101","115","112","x72","x6f","98","x6c","101","109","x73","x2e","99","111","x6d"];
document.write("<a href=\"&#x6d;a&#x69;lto&#x3a;");
for (i=0; i<NAgbFSgxFCAdwze.length; i++) document.write("&#"+NAgbFSgxFCAdwze[i]+";");
for (i=0; i<hxagpxROhfBQFlV.length; i++) document.write(hxagpxROhfBQFlV[i]);
document.write("\">");
for (i=0; i<UXFJGfqKAAnYdck.length; i++) document.write("&#"+UXFJGfqKAAnYdck[i]+";");
document.write('</a>');
}
//-->
</script>
 
Old 07-03-2012, 12:47 PM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,223

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
I found out by executing it. It generates a mailto link.

This is (or was) a common technique for making your email address available to humans but not to spambots.

I would replace it with Recaptcha Email Protection.

Last edited by dugan; 07-03-2012 at 01:07 PM.
 
1 members found this post helpful.
Old 07-03-2012, 01:16 PM   #3
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Original Poster
Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
thanks, after having seen malicious code inserted into a php script using base64 encoding, i have understandably become a bit paranoid when it comes to apparent obfuscation of code.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Driver function explanation mustansar Linux - Software 2 11-14-2010 04:18 AM
javascript - class / function in function jchambers Programming 3 06-15-2009 10:33 PM
PHP code inside a javascript function fatrandy13 Programming 4 03-12-2008 05:57 PM
Explanation sought for a check in ip_finish_output2() function Pankaj Srivastava Linux - Networking 0 05-24-2007 08:52 PM
Code explanation ... ? dbee Linux - Software 1 12-17-2005 01:06 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration