Kamis, 30 Juni 2011

belajar javascript dengan hacker test

Lagi iseng cari-cari dim bah google, dapat link yg menarik buat belajar javascript dengan semulasi hacker berupa hacker test..


Pada kesempatan kali ini kita akan coba bahas untuk bagaimana cara menyelesaikan level-levelnya..okay langsung aj yo…

Ni tampilan home-nya



Dan ini tampilan untuk level 1



Pada level 1 ini kita harus cari password untuk dapat login dan masuk ke level selanjutnya..

Pertama kita klik kanan pada halaman tersebut, kemudian pilih View Page Source. Maka akan tampil seperti dibawah ini:

<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Hacker Test:  A site to test and learn about web hacking</title>
<META NAME="Keywords" CONTENT="Hacker Test, hacking game, Test your Hack Skills, Security, Hacking, Cracking, Web Security, how to hack, learn to hack, hacking for fun, fun hacking, hack me, hack, hacker, blackhat, how to be a blackhat, hack game">
<META NAME="Description" CONTENT="Can you hack web sites? Do you want to test your hacking skills? Bring it on and check out this Hacker Test of 20 levels!">
<LINK REL="stylesheet" HREF="style.css" TYPE="text/css">

<script language="Javascript"><!--
// Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/
var tl=new Array(
"\nHackerTest.net is your own online hacker simulation. ",
"\nWith 20 levels that require different skills to get to another step of the game, this new real-life imitation will help you advance your security knowledge.",
"\nHackerTest.net will help you improve your JavaScript, PHP, HTML and graphic thinking in a fun way that will entertain any visitor!",
"\nHave a spare minute? Log on! Each level will provide you with a new, harder clue to find a way to get to another level.",
"\nWill you crack HackerTest.net?" // Do not add a comma (,) at the end of the last row of text.
);
var speed=1;
var index=0; text_pos=0;
var str_length=tl[0].length;
var contents, row;
function password()
{
  contents='';
  row=Math.max(0,index-9);
  while(row<index)
    contents += tl[row++] + '\r\n';
  document.forms[0].elements[0].value = contents + tl[index].substring(0,text_pos) + "_";
  if(text_pos++==str_length)
  {
    text_pos=0;
    index++;
    if(index!=tl.length)
    {
      str_length=tl[index].length;
      setTimeout("password()",2000);
    }
  } else
    setTimeout("password()",speed);
}
//-->
</script>


</head>
<body onLoad=password()>

<script language=JavaScript>
{
var a="null";
function check()
{
if (document.a.c.value == a)
{
document.location.href="http://www.hackertest.net/"+document.a.c.value+".htm";
}
else
{
alert ("Try again");
}
}
}
</script>

<h1>Hacker Test</h1>

<p>Test your hacking skills</p>



<form style="margin-top:-10px;"><textarea rows=15 cols=155 STYLE="width: 600px;height:300px;background: #000;padding:30px;font-size: 9pt;font-family: fixedsys, LucidaTerminal, monospace;color: #909090;text-align: left;overflow:auto;border: 1px"></textarea></form>

<!-- Google AdSense below -->
<script type="text/javascript"><!--
google_ad_client = "pub-3865159942975184";
/* 728x15, created 8/8/10 */
google_ad_slot = "7820629648";
google_ad_width = 728;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
</script>

<br><br>
<br><br>
<br><br>

<h1>Level 1</h1>

<br><br>

Hackers solve problems and build things, and they believe in freedom and voluntary mutual help. To be accepted as a hacker, you have to behave as though you have this kind of attitude yourself. And to behave as though you have the attitude, you have to really believe the attitude.
<br><br>

<div align="center">
<center>
<table border="1" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="15%" id="AutoNumber4">
<tr>
<td width="100%">
<p align="center"><font size="1" face="Tahoma"><br>
</font><font size="2" face="Tahoma">Password:</font><form name="a" action="javascript:check()">
<p align="center">
<input type="login" name="c" maxlength="25" size="16"><br>
<br>
<input type="submit" value=" Log In "></p>
</form></p>
</td>
</tr>
</center>
</table>
</div>
</font></b></p>

</script>

<!-- Google Search below -->
<br><br>
<br><br>
<center>
<style type="text/css">
@import url(http://www.google.com/cse/api/branding.css);
</style>
<div class="cse-branding-center" style="background-color:#000000;color:#FFFFFF">
  <div class="cse-branding-form">
    <form action="http://www.google.com/cse" id="cse-search-box">
      <div>
        <input type="hidden" name="cx" value="partner-pub-3865159942975184:nildhe7wevw" />
        <input type="hidden" name="ie" value="ISO-8859-1" />
        <input type="text" name="q" size="31" />
        <input type="submit" name="sa" value="Search" />
</center>
      </div>
    </form>
  </div>
  <div class="cse-branding-logo">
  </div>
  <div class="cse-branding-text">
    Custom Search
  </div>
</div>


<br><br>
<center><a href="mailto:info@hackertest.net">info@hackertest.net</a></center>
<br><br>

<br><br>

Disclaimer: Neither this site nor the author is endorsing the unethical use of hacking, cracking or any such activities. This site is only for educational purposes. The correct word for this site is actually not hacking, but cracking.

<center><a href="http://catb.org/~esr/faqs/hacker-howto.html">How To Become A Hacker</a></center>
<br><br>

<center>
<script type="text/javascript"><!--
google_ad_client = "pub-3865159942975184";
/* 120x90, hackertest */
google_ad_slot = "9241876488";
google_ad_width = 120;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
</script>
</center>

<br><br>

<br><br>
<br><br>

HackerTest.net is your own online hacker simulation.
With 20 levels that require different skills to get to another step of the game, this new real-life imitation will help you advance your security knowledge.
HackerTest.net will help you improve your JavaScript, PHP, HTML and graphic thinking in a fun way that will entertain any visitor!
Have a spare minute? Log on! Each level will provide you with a new, harder clue to find a way to get to another level.
Will you crack HackerTest.net?

<br><br>
<br><br>

<!-- Start of StatCounter Code -->
<script type="text/javascript" language="javascript">
var sc_project=2497325;
var sc_invisible=0;
var sc_partition=23;
var sc_security="66a93703";
var sc_remove_link=1;
</script>

<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><img  src="http://c24.statcounter.com/counter.php?sc_project=2497325&java=0&security=66a93703&invisible=0" alt="web metrics" border="0"> </noscript>
<!-- End of StatCounter Code -->

</body>
</html>
<!-- http://www.google.com/search?q=llun+sdrawkcba -->

Kalo dilihat sekilas membingungkan memang..:D
Tapi coba kita perhatikan script pada bagian dibawah ini.
<script language=JavaScript>
{
var a="null";
function check()
{
if (document.a.c.value == a)
{
document.location.href="http://www.hackertest.net/"+document.a.c.value+".htm";
}
else
{
alert ("Try again");
}
}
}
</script>

Kita dapati “a” didefinisikan sebagai variable dan bernilai “null”..
Kemudian ada kondisi  jika (document.a.c.value == a) maka akan dijalankan atau membuka document.location.href="http://www.hackertest.net/"+document.a.c.value+".htm"
Sebelumnya sudah kita ketahui bahwa nilai dari variable a = null
Selain dari nilai itu maka akan ditampilkan pesan “Try again"..

Nah skrng kita coba masukkan password dengan “null” (tanpa tanda petik)..

Dan tada…kita masuk ke level2..



untuk level 2 akan kita bahas pada kesempatan berikutnya..:D

Senin, 13 Juni 2011

belajar

Belajar merupakan suatu kata kerja, yang merupakan suatu proses seperti program komputer memproses data menjadi informasi dan informasi menjadi ilmu pengetahuan..ilmu pengetahuan itu bak lentera di kegelapan malam, yang menerangi kita dalam kehidupan kita hidup di dunia ini..

Bayangkan bila kita berjalan dikegelapan tanpa cahaya sedikitpun, kita akan berjalan tanpa arah tujuan dan tidak tahu apa yang ada dihadapan kita, disamping, atau pun dibelakang kita..oleh karena itu kita memerlukan cahaya untuk bisa terus maju ke depan..

Proses belajar dapat dilakukan secara formal (sekolah, kursus) atau secara informal (bersosialisai,otodidak,dll)..banyak jalan menuju Roma..begitu kata pepatah..selama kita punya keinginan yang kuat kita pasti bisa menggapai apa yang kita inginkan..
======================================================
oleh karena itu penulis ingin sekali berbagi untuk belajar dengan semua, untuk mendapatkan suatu cahaya berupa ilmu pengetahuan...

mari kita songsong esok hari yang lebih baik...