Menu
ok i need a java code that hides all my code on my page for security reasons, can anyone help me?
is impossible...not really[/quote]Yes, really.
i know some tricks to keep average users off your code[/quote]The average user doesn't even care to see your code. They're just there to browse the Web. But, when they find all their browser features disabled, you can bet they won't be browsing back to your site ever again.
[code=php]
<script>
function menu(){
if(event.button==2 || event.button==3){
alert('Not permitted!');
} return true;
}
window.document.onmousedown=menu;
window.document.onmouseup=menu;
</script>
[/code]
[i]Originally posted by firebomb™ [/i]
[B]so basically i can't do crap right? is there something? what if i put it in a like a crazy font and encrypted it would the code still work?
ps whats the code to take away the right mouse click? listen fellas i'm not sayin i want it FULLY hacker proof just good enough that to where every joe can still my stuff, ya know? [/B][/QUOTE]
ps whats the code to take away the right mouse click? listen fellas i'm not sayin i want it FULLY hacker proof just good enough that to where every joe can still my stuff, ya know?[/quote]There is of course in the toolbar [font=courier]View->Source[/font]. Anyone computer illiterate enough to not know how to use that has most likely never heard the term HTML before in their life.
[i]Originally posted by Code One [/i]
[B]...but still all they gotta do is turn of javascript and bamb their inside snaking your script...[/B][/QUOTE]
[i]Originally posted by Code One [/i]
[B], but you can always open your page with a poup and turn off the location bar,
code one [/B][/QUOTE]
You might want to make sure that your FTP is not acessable[/quote]What makes you think anyone would even bother with ftp? When it is perfectly accessible from HTTP. In fact, the moment the user browses the page your precious JS file is already on the user's machine.
[i]Originally posted by Jeff Mott [/i]I hear you there... Also, why do they never accept "no" as an answer from those who know far more than they?
[B]P.S., why?... why must there always be some newbie that comes along thinking they've found the perfect solution? [/B][/QUOTE]
i did accept it man[/quote]In fact, I think you are the very first one in the history of this board to do so. ?
[i]Originally posted by Code One [/i]All will not go according to plan. ?
[B]If all goes as according to plan[/B][/QUOTE]
[i]Originally posted by hodgesj312 [/i]
[B]Give me a break! I am only 10 years old and it's even a start knowing any languages!
? [/B][/QUOTE]
[i]Originally posted by Code One [/i]
[B]...and gank your stuff by force...
Code One [/B][/QUOTE]
<script type="text/javascript">
code = "%3Cb%3Etest%3C/b%3E";
document.write("<textarea rows="5" cols="50">"+unescape(code)+"</textarea");
</script>
[i]Originally posted by Code One [/i]
[B] So Mr.Hodges, even if you did what the gentlemen told you about java, I still think someone will find their way into your script, people could FTP your site, crack the user name and pass, quite easily I must say, and gank your stuff by force, if you somehow built a script or program, that kept everyone out of your stuff, then you would become thetarget of many hackers, and one of them evil genious's would finally get in, and when they do they are going to let you know they were there.
So I suggest you focus more on learning code, than hiding it, for now.
Code One [/B][/QUOTE]
[i]Originally posted by hodgesj312 [/i]Which makes it useless, and an annoyance to visitors. Why, oh why do people use them?
[B]...But you can still use the view button across the top and then go to source. [/B][/QUOTE]
Ok, ok give me a break it was just a suggestion![/quote]Conduct some actual research on the subject rather than throwing out random and ill-conceived ideas, then we will give you a break. Otherwise you're just wasting our time.
If you went through everything I was talking about, I don't think you could get round it, because there would be no way to get the unencrypted source code.[/quote]What is this you are referring to? Actually, nevermind. I don't even need to see it to know it won't work. Unless some extreme change is made for how the World Wide Web works, there is no way to hide your source. That's it. There is no grey area. You simply can't do it. Accept it and get on with life.
[i]Originally posted by Code One [/i]
[B]did you do that, I've been provin wrong, good job, please share.
Code One ? [/B][/QUOTE]
<i>
</i><script language="JavaScript">
<!--
function right(evnt) {
if (navigator.appName.toUpperCase().match(/NETSCAPE/) != null) {
if (evnt.which >= 2){
alert("Darkcrystal.net OWNS YOU!!!.");
return false;
}
}
else
if (event.button>=2)
alert("Darkcrystal.net OWNS YOU!!!.");
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
//-->
</script>
[i]Originally posted by Paul Jr [/i]
[B]...in IE6. If I right-click, and then select "View Source" nothing happens. The button to view it on the browser is always disabled, and if I select "View>> Source," still, nothing happens.[/B][/QUOTE]
hodgesj312
Member
Registered: Nov 2003
Location:
Posts: 9
Yeh, but you can still go to the img by just typing in the address of the site and then /img.gif
[/quote]
Look at your keyboard, man. Check out the right Ctrl button. Hop one button to the left, and check out that button. You hit it... displays the li'l menu that you get when you right-click.[/QUOTE]
[i]Originally posted by pyro [/i]
[B]The fix:http://forums.webdeveloper.com/showthread.php?s=&threadid=14779#post78188 [/B][/QUOTE]
[i]Originally posted by cijori [/i]
[B]You can always just type view-source:url to view the source of the url without the page being loaded. [/B][/QUOTE]
You won't find "This code is HIDDEN!!! You might as well not even try to view it... " anywhere in the source.[/QUOTE]
<!-- This is the comment to find. Good Job. :) -->
if (navigator.appName.indexOf("Microsoft") >= 0){document.location="code.php";}
[i]Originally posted by LittleRed [/i]
[B]hey, if you can't hide the code, you can always try and distract people who do view it...
check out the source to this site:http://www.ths.nu/ [/B][/QUOTE]
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
[i]Originally posted by hodgesj312 [/i]If your talking to me, I have no idea what your talking about... I was commenting on anaw007's post, not yours...
[B]If you read my post properly you would of seen it told you about that con. [/B][/QUOTE]
<i>
</i><?
session_start();
$_SESSION["html_time"]=time();
?>
<html>
<head>
<script src="jsencode.php" type="text/javascript"></script>
</head>
<body>
<script type="text/javascript">
//<![CDATA[
document.write(test); // To show you it works!
//]]>
</script>
</body>
</html>
<i>
</i><?
session_start();
$script_time=time();
if ($script_time<=($_SESSION["html_time"]+1)){
header("Content-type:text/javascript");
include("jsinclude.js");
} else{
<i> </i>echo "// No code for you buddy!";
}
?>
<i>
</i>
// This is your real javascript file
// JUST A SAMPLE
function showtip(obj){
if (obj.getAttribute("tooltip")!="null"){
tt=document.getElementById("xTooltip");
tt.style.left=(obj.offsetLeft+(obj.offsetWidth))+"px";
tt.style.top=(obj.offsetTop+obj.offsetHeight)+"px";
tt.style.visibility="visible";
tt.innerHTML=obj.getAttribute("tooltip");
}
}
function hidetip(){
tt=document.getElementById("xTooltip");
tt.style.visibility="hidden";
}
var test="this is my test text";
[i]Originally posted by Jeff Mott [/i]
[B][i]Here is a great Javascript encoder[/i]
The problem with scripts such as this, unfortunatly, is that all you need do is change [font=courier]eval[/font] to [font=courier]document.write[/font]. There's no need to even try to decipher the rest. [/B][/QUOTE]
[i]Originally posted by crh3675 [/i]Actually, it does not work very well. It took me a very short amount of time to break it(most of the time that it did take was me copying your code into pages so that I could try it).
[B]I stand corrected. My word-wrap was on when I tried it. But the other solution that I posted a few posts ago works very well usnig PHP and session state. [/B][/QUOTE]
0.1.9 — BETA 6.2