473,395 Members | 2,253 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Hidden Text in JavaScript?

hey, i just found this riddle somewhere in the net:
<meta http-equiv="Pragma" content="no-cache">
<script language="JavaScript">
<!--
function nstie(){return false}function
nstns(){if(document.layers){st=document.getSelecti on();if(st!=""&&st!="
"){window.find(" ")}setTimeout("nstns()",20)}}nstns();document.onse lectstart=nstie;ondragstart=nstie;function
nrcie(){return false}function
nrcns(e){if(e.which==2||e.which==3)return
false}if(document.layers){document.captureEvents(E vent.MOUSEDOWN);document.onmousedown=nrcns}documen t.oncontextmenu=nrcie;function
nsb(){window.status="";setTimeout("nsb()",10)}nsb( );function
np1(){for(wi=0;wi<document.all.lengt68;wi++){if(do cument.all[wi].style.visibility!="hidden"){document.all[wi].style.visibility="hidden";document.all[wi].id="gwp"}}};function
np2(){for(wi=0;wi<document.all.length;wi++){if(doc ument.all[wi].id=="gwp")document.all[wi].style.visibility=""}};window.onbeforeprint=np1;wi ndow.onafterprint=np2;document.ondragstart=new
Function("return false;");document.oncontextmenu=new Function("return
false;");
//-->
</script>
<script language="JavaScript">
<!--
eval(unescape("%66%75%6E%63%74%69%6F%6E%20%61%28%7 3%29%7B%74%3D%22%01%02%03%04%61%62%63%64%65%66%67% 68%69%6A%6B%6C%6D%6E%6F%70%71%72%73%74%75%76%77%78 %79%7A%30%31%32%33%34%35%36%37%38%39%20%21%23%24%2 5%26%27%28%29%2A%2B%2C%2D%2E%2F%3A%3B%3C%3D%3E%3F% 40%5B%5D%5E%5F%60%7B%7C%7D%7E%7F%41%42%43%44%45%46 %47%48%49%4A%4B%4C%4D%4E%4F%50%51%52%53%54%55%56%5 7%58%59%5A%22%3B%6F%3D%6E%65%77%20%53%74%72%69%6
%67%3B%6C%3D%73%2E%6C%65%6E%67%74%68%3B%66%6F%72%2 0%28%69%3D%30%3B%69%3C%6C%3B%69%2B%2B%29%7B%6E%3D% 74%2E%69%6E%64%65%78%4F%66%28%73%2E%63%68%61%72%41 %74%28%69%29%29%3B%69%66%28%6E%3D%3D%2D%31%29%7B%6 F%2B%3D%73%2E%63%68%61%72%41%74%28%69%29%3B%63%6F% 6E%74%69%6E%75%65%7D%69%66%28%6E%3D%3D%30%29%7B%6F %2B%3D%53%74%72%69%6E%67%2E%66%72%6F%6D%43%68%61%7 2%43%6F%64%65%28%31%30%29%3B%63%6F%6E%74%69%6E%75%
5%7D%69%66%28%6E%3D%3D%31%29%7B%6F%2B%3D%53%74%72% 69%6E%67%2E%66%72%6F%6D%43%68%61%72%43%6F%64%65%28 %31%33%29%3B%63%6F%6E%74%69%6E%75%65%7D%69%66%28%6 E%3E%31%29%7B%6F%2B%3D%53%74%72%69%6E%67%2E%66%72% 6F%6D%43%68%61%72%43%6F%64%65%28%6E%2B%33%30%29%7D %7D%64%6F%63%75%6D%65%6E%74%2E%77%72%69%74%65%28%6 F%29%7D"));
//-->
</script>
<html>
<head><meta http-equiv="Expires" content="-1"><title>Riddle: who
knows the answer?</title></head><body bgcolor="black" text="silver"
link="red" alink="red" vlink="red">
<script language="JavaScript">
<!--
a("0|J~TNJGPODJI1=Iso(?JmKCK20KM2 <DOCDIOCDNK{BDN{CD~~IADGI{Hm5GGTJPBJO OJ~JDNADI~DOk{I~JKIOCK{BI{HDI OCDN~DM}OJMTm0|Mn2#DIOy0|2/CMDN{I{NTR{Tk{I~{C{M~R{Tm0n|20|Mn2 !JJ~GP}F0nKM20n|J~T2");
//-->
</script>
<script language="JavaScript">
<!--
eval(unescape("%64%6F%63%75%6D%65%6E%74%2E%77%72%6 9%74%65%3D%6E%75%6C%6C%3B"));
//-->
</script>
</html>

can somebody tell me how to find the solution?
i'm not a coder.. so please give me a hint :-)
Jul 23 '05 #1
2 3959
karteikarte wrote:
<snip>
<script language="JavaScript">
<!--
function nstie(){ ... <snip>

The first block is the usual clumsy implementation of the "no right
click" script, with selection, dragging, etc thrown in for good
measure:-

| function nstie(){
| return false
| }
| function nstns(){
| if(document.layers){
| st=document.getSelection();
| if(st!=""&&st!=" "){
| window.find(" ")
| }
| setTimeout("nstns()",20)
| }
| }
|
| nstns();
| document.onselectstart=nstie;
| ondragstart=nstie;
|
| function nrcie(){
| return false
| }
| function nrcns(e){
| if(e.which==2||e.which==3)return false
| }
|
| if(document.layers){
| document.captureEvents(Event.MOUSEDOWN);
| document.onmousedown=nrcns
| }
| document.oncontextmenu=nrcie;
|
| function nsb(){
| window.status="";
| setTimeout("nsb()",10)
| }
|
| nsb();
|
| function np1(){
| for(wi=0;wi<document.all.lengt68;wi++){
| if(document.all[wi].style.visibility!="hidden"){
| document.all[wi].style.visibility="hidden";
| document.all[wi].id="gwp"
| }
| }
| };
|
| function np2(){
| for(wi=0;wi<document.all.length;wi++){
| if(document.all[wi].id=="gwp")
| document.all[wi].style.visibility=""
| }
| };
|
| window.onbeforeprint=np1;
| window.onafterprint=np2;
| document.ondragstart=new Function("return false;");
| document.oncontextmenu=new Function("return false;");
</script>
<script language="JavaScript">
<!--

eval(unescape("%66% ... "));
The unescape function changes the - %NN - URL style encoding back into
normal characters, where the character code is equivalent to NN (which
is hex in the encoding). The string returned form unescape is javascript
source code and the - eval - function executes it. The code executed is
the definition of a function called 'a':-

| function a(s){
| t="\x01\x02\x03\x04abcdefghijklmnopqrstuvwxyz01234 56789 !#$%&"+
| "'()*+,-./:;<=>?@[]^_`{|}~\x7FABCDEFGHIJKLMNOPQRSTUVWXYZ";
| o=new String;
| l=s.length;
| for (i=0;i<l;i++){
| n=t.indexOf(s.charAt(i));
| if(n==-1){
| o+=s.charAt(i);
| continue
| }
| if(n==0){
| o+=String.fromCharCode(10);
| continue
| }
| if(n==1){
| o+=String.fromCharCode(13);
| continue
| }
| if(n>1){
| o+=String.fromCharCode(n+30)
| }
| }
| document.write(o)
| }
//--> </script>
<html>
It is not a particularly well-formed HTML document as it has a META
element and several SCRIPT elements before the opening HTML tag.
<script language="JavaScript">
<!--
a("0|J~T ... J~T2");
As the previous code defined the function - a - this code can call that
function, passing a string as the argument. The function - a - decodes
the string and - document.write -s it into the page. Producing:-

| <body solution=Xn40eMZo.php>
| <pre>
| Within this page is a hidden filename. All you got to do
| is find it, and open the pagename in this directory.<br />
| Hint: <b>There is an easy way, and a hard way.</b><br />
| Good luck!
| </pre>
| </body>
//--> </script> <script language="JavaScript"> <!--
eval(unescape("%64% ... %3B"));

<snip>

This final eval(unescape(" ... ")) executes the code:-

| document.write=null;

- which makes the document.write function unavailable by replacing the
reference to it with a null value.

Presumably the "hidden filename" is; 'Xn40eMZo.php'

Richard.
Jul 23 '05 #2
On 27 Sep 2004 03:01:00 -0700, karteikarte wrote:
hey, i just found this riddle
Not so much a riddle as..
..somewhere in the net:..
*
<script language="JavaScript">
<!--
...another broken script.
can somebody tell me how to find the solution?
i'm not a coder.. so please give me a hint :-)


Let's see a working version in-place, who's
passsword/protection/whatever are you trying
to circumvent?

* What is the URL of this 'somewhere in the net'?

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Randell D. | last post by:
Folks, Perhaps someone can figure this out - this is 'the process of my script' I have a form whereby I can add multiple contacts to a single address. There is only one...
0
by: yurps | last post by:
Hello here is my html, if you click the missing image in the first column on the left, the div is shown, when clicked again the div disappears...but the bottom border disappears as well...Is there...
3
by: Roy Adams | last post by:
Hi I'm reposting this question because for some reason can't post follow up question to this thread. What I'm trying to do is put the value and text from a a select in to a text field and to a...
1
by: tabert | last post by:
I want to use JavaScript when a button is clicked to show and hide a SPAN or DIV. This works in both IE and Netscape, but what I'd like to happen is for there to be no white space where the hidden...
1
by: Madame Blablavatsky | last post by:
hello, i am trying to build a kind of very, very simple ritch text editor for people to use with a very simple cms. at the moment i am working on the basic structure. the text is put in an...
4
by: Magnus Blomberg | last post by:
Hello! I have a problem when using a hidden field to send a value to the server. Below you can see my code in simplyfied versions. What I'm trying to do is: 1. The user browses for a picture...
4
by: reikoshea | last post by:
okay ive been working at this for probably 4 hours now, and I (not to mention my boss) am pretty upset. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head>...
2
by: Bill Steele | last post by:
I want to have a window pop up with a form. When the form is submitted, it needs to pass along the URL of the original window. If find on th web eight gazillion descriptions of how to pass data...
3
by: simora | last post by:
Hi: Need some working sample code to post hidden form data from a php page to a new popup window. 540 x 500 centered. The popup that I'm calling already is formatted and has a TITLE:web-2007.php...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.