Follow us on Twitter!
Understanding is the answer, hatred is the problem, and hackers are the slaves abused and destroyed in the process of peace online - Deshouleres
Thursday, April 24, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 20
Guests Online: 19
Members Online: 1

Registered Members: 82889
Newest Member: Geriztul
Latest Articles
View Thread

HellBound Hackers | HellBound Hackers | Questions

Author

Need some help with Javascript mission!


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 31-01-07 20:28
Okay, so here is my problem:

I just scripted my very first "mission" in javascript (and html duhuh!)
It's a mission where you need to use a certain user-agent to get the update and pass.
I never scripted something like this before so I was quite happy when I noticed It worked! But when I asked a friend to solve my "mission" I wasn't really happy with the method he used to pass it; He just downloaded the script and he raped all my javascript to get to the next level :(
So this is the code of the first page:

Code
<html>
<head>
</head>
<script type="text/javascript">



function checkbrowser()

{
   var browsername=navigator.appName;
   if (browsername!="FeatherFox" )
   {
      alert ("This page only contains updates for FeatherFox" )
   }
   else
   {
      window.location.href="passed.htm"
   }
}
</script>   




and below that a link with and "onclick" to "checkbrowser()"

And here is passed.htm:

Code
<html>
<head>
<script type="text/javascript">

   var browsername=navigator.appName;
   if (browsername!="FeatherFox" )
   {
      alert ("Piss of! Do you think I'm stupid?!" +'\n'+ " It's not that easy!" )
      window.location.href="mission.htm"
   }
   </script>   




with the check again so just replacing "mission" with "passed" in the URL bar won't make you pass the mission.

Now my question is pretty obvious:
How to I prevent people from just stripping out the javascript?
Or is the only way using PHP?
(well I hope not because PHP seems to be just a little bit to difficult for me right now)

Thanks in advance!

S-H




Edited by on 31-01-07 20:37
Author

RE: Need some help with Javascript mission!


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 31-01-07 21:44
I'm not good on security or PHP but I think it has to be php like this:

Code

<?php
if($HTTP_REFERER != "mission.php") {
echo "Trying to cheat sucka?";
} else {<script type="text/javascript">

var browsername=navigator.appName;
if (browsername!="FeatherFox" )
{
alert ("Piss of! Do you think I'm stupid?!" +'\n'+ " It's not that easy!" )
window.location.href="mission.htm"
}
</script>
}
?>








Edited by on 31-01-07 21:49