...

View Full Version : javascript munged code - requires cleanup



iq938
03-14-2004, 01:44 AM
--------------------------------------------------------------------------------

I had the following code from before which was code munged basically jumbles up the script to avoid people stealing.

I have been trying to unmunge it but i am getting quite confused with the brackets and things.

The code is as follows:

<SCRIPT LANGUAGE ="Javascript">
ifwindow.parent.nameATDYHSGJHDUYFHKJHwindow.location/functionclicke
ifdocument.allifevent.button2window.closereturnfalseifdocument.layersife.which3window.closereturnfal se
ifdocument.layersdocument.captureEventsEvent.MOUSEDOWN

document.onmousedownclickset_timewindow.setTimeoutclearboard1000
ifdocument.layersdocument.captureEventsEvent.KEYPRESSdocument.onkeypressCloseMeifdocument.alldocumen t.onkeydownCloseMefunctionCloseMewindow.closefunctionclearboard
ifdocument.allwindow.clipboardData.setDataTextset_timewindow.setTimeoutclearboard1000/SCRIPT"));
//-->
</script>



Can someone possibly clear this up, would be of great help.
The main part i need is the clipboard bit.
If you paste this into a page, it all works but i only need the clipboard section code of it and the rest messes up the page.

Philip M
03-14-2004, 08:30 AM
.... code munged basically jumbles up the script to avoid people stealing.

I have been trying to unmunge it ........

Ah, yes. What was the word again?

iq938
03-14-2004, 11:05 AM
Please can you help me on this i thought there would be an unmunger available but i couldnt find it.

This script includes some window close thing which closes the window automatically-basically i just need the clipboard part which stop the suer from using prnt scrn on the keyboard.

Philip M
03-14-2004, 04:11 PM
As you say, the aim of the author is to discourage and/or prevent other people from stealing it. That includes you.

Garadon
03-14-2004, 04:57 PM
It goes something like this I believe.



if(window.parent.name=='ATDYHSGJHDUYFHKJH'){window.location;}
function click(e)
{
if(document.all)
{
if(event.button==2)
{
window.close();
return false;
}
}
if(document.layers)
{
if(e.which==3)
{
window.close();
return false;
}
}
}

if(document.layers){document.captureEvents=Event.MOUSEDOWN;}

document.onmousedown=click;
window.setTimeout(clearboard,1000);

if(document.layers){
document.captureEvents=Event.KEYPRESS;
document.onkeypress=CloseMe;
}
if(document.all)
{
document.onkeydown=CloseMe;
}
function CloseMe()
{
window.close;
}
function clearboard()
{
if(document.all)
{
window.clipboardData.setData('Text','set_time');
window.setTimeout(clearboard,'1000');
}
}

iq938
03-14-2004, 08:20 PM
It works, thanks alot for helping me out and taking the time.
Garadon is the man!

shlagish
03-15-2004, 02:37 AM
But the fact remains, you're stealing it while the author is trying to prevent you from doing so...

Philip M
03-15-2004, 08:09 AM
Originally posted by shlagish
But the fact remains, you're stealing it while the author is trying to prevent you from doing so...

<rant>
And Garadon is an accessory to the theft. And if I may say so he ought to be ashamed. If someone uses munging, no-right click or whatever they are giving a clear signal that they are not offering their material to all and sundry as a freebie. They do not want it to be stolen. They are saying "go write your own code and don't filch it from me". Just because it can be stolen by an expert that does not make it fair game.
</rant>

Garadon
03-15-2004, 12:03 PM
<rant>
A: I am not an expert.
B: If you don't want people to take your code you should copyrigth it not munged it.
C: In my opinion if you make munged code that code is free for all to try and make it work, if you don't want people to take your code do be don't mung it, copyrigthing munged code does not copyrigth the working code.
D:I don't believe in interlectual property.
E:If you read the above you really wasted ur time there.
</rant>

Philip M
03-15-2004, 08:16 PM
"D:I don't believe in interlectual property."

Nor in spelling either it seems. Sorry, I don't hold with theft or dishonesty, but please feel free to publicly proclaim your own lack of integrity as much as you wish.

shlagish
03-16-2004, 03:56 AM
<rant>
You don't beleive in intellectual property?
Well I do.
What property isn't intellectual? The guy/gal who created, let's say, the chair, for example, didn't invent wood. He just thought of a way to put the wood together. Similarily, the guy/gal who created that code didn't invent javascript. He just thought of a way to put in together. Does it make his invention less valuable?



If you read the above you really wasted ur time there.

Do you mean by that that others shouldn't take into consideration what you say? That I should just ignore you?
I don't get it.

And Philip M:


Nor in spelling either it seems

What was the use of that? What does spelling have to do with any of this?
</rant>

Garadon
03-16-2004, 08:20 AM
Yup I am of the firm opinion than rants more often than not is a complete waste of time to read.

shlagish
03-16-2004, 11:02 PM
I beleive they help you become a better person (not you, YOU, you as in everybody, lol). By thinking about what other people think, you can maybe see things that you hadn't thought of before, and therefore make a better outcoming opinion on the subject.

Willy Duitt
03-17-2004, 03:55 AM
I could care less what anyone thinks.
Right is Right
Wrong is Wrong
And if you can not understand that principle;

One Wrong and one Right;
Makes it even....

.....Willy :thumbsup:

shlagish
03-17-2004, 03:57 AM
lol, ok I guess that means "stop fighting kids".
Peace everyone!

whammy
03-17-2004, 04:10 AM
So... am I wrong or does "munging" equal a newbie attempt at encrypting javascript (as does any attempt at encrypting client-side code)?!?!

I'm not trying to offend anyone but this looks rather primitive - however the source code I saw would not be prone to reverse-engineering. Perhaps I didn't spend enough time looking at it?

I just don't see a clean way to decrypt:



ifwindow.parent.nameATDYHSGJHDUYFHKJHwindow.location/functionclicke


:p



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum