Frontpage JavaScript

  • Java
  • Thread starter DaveC426913
  • Start date
  • #1
DaveC426913
Gold Member
20,070
3,360
I'm looking at this site that I may need to modify. It was built in Frontpage.

I'm not familiar with FP. There's a block of code the top like this:

<SCRIPT type="text/javascript"><!--
document.write(unescape("%3C%53%43%52%49%50%54%20%74%79%70%65%3D%22%74%65%78%74%2F%6A%61%76%61%73%63%72%69%70%74%22%3E%3C%21%2D%2D%0D%0A%69%66%28%6E%61%76%69%67%61%74%6F%72%2E%75%73%65%72%41%67%65%6E%74%2E%69%6E%64%65%78%4F%66%28%22%4F%70%65%72%61%22%29%21%3D%2
etc etc etc
64%6F%77%2E%6F%6E%6D%6F%75%73%65%64%6F%77%6E%3D%6E%72%63%3B%66%75%6E%63%74%69%6F%6E%20%6F%6E%65%28%29%7B%72%65%74%75%72%6E%20%74%72%75%65%7D%6F%6E%65%72%72%6F%72%3D%6F%6E%65%3B%2F%2F%2D%2D%3E%3C%2F%53%43%52%49%50%54%3E"));//--></SCRIPT>


What is this block for/doing?
 

Answers and Replies

  • #2
39
0
http://scriptasylum.com/tutorials/encdec/encode-decode.html" [Broken]

This page will explain what is being done, although i'm not quite sure exactly what its "escaping" for your particular site. I'm sure you could find out though.

It turns out to be something like...

<SCRIPT type="text/javascript"><!--
if(navigator.userAgent.indexOf("Opera")!=. Î dow.onmousedown=nrc;function one(){return true}onerror=one;//--></SCRIPT>
 
Last edited by a moderator:
  • #3
DaveC426913
Gold Member
20,070
3,360
OK, thanks.

So that code does a couple of things:
1] it's a browser sniffer
2] it defeats right-clicking

Not really sure why these are hidden, but I think it's a built-in FP feature.
 
  • #4
-Job-
Science Advisor
1,151
2
You use escape to URL-Encode a string and unescape for the reverse operation. It's the first time i've seen it used to "hide" code. It's an interesting strategy.
 

Related Threads on Frontpage JavaScript

  • Last Post
Replies
4
Views
3K
  • Last Post
Replies
6
Views
2K
Replies
11
Views
2K
  • Last Post
Replies
11
Views
3K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
1
Views
1K
  • Last Post
2
Replies
25
Views
2K
  • Last Post
Replies
2
Views
1K
Replies
9
Views
1K
Top