Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

realistic 2 - js coding


ghost's Avatar
0 0

ok. so i know that i need to loop through january to december with all the possible dates, and visit the web page for each date. i have three problems:

  1. where do i write the js into?
  2. in js, how do i make the browser go to a webpage
  3. what do i write in js to make it check to see if its the right page?

ghost's Avatar
0 0

LOL! :)

1: do you actually know any javascript?since you stated, you don't know where to put it? 2: you probably don't,you stated you don't know how to direct a browser to a website. 3: i suggest you read up on some basic javascript tutorials. since you stated you don't know what to write… i have the weirdest feeling you'll learn a lot from it.

peace.:happy:


Uber0n's Avatar
Member
0 0

carrico wrote:

  1. in js, how do i make the browser go to a webpage

Just set the 'location' variable to the page you want to visit, but you should probably read up some more on JS first ;)


ghost's Avatar
0 0

heres a script i wrote…what do you people think? it goes through every page with every date/month combination

<script type="text/javascript">

var month = 1

var day = 1

var x = 0

while ( month != 12 && day != 31)

{

//adding dates/months

if (day = 31)

{
day = 1
month += 1
}

else

{
day += 1
}

//check for double digit months

if (month &gt;= 10)

{
x += 1
}

//check for double digit days

if (day &gt;= 10)

{
x += 2
}

//get the right format

if (x = 0)

{
window.location.href=&quot;http://hellboundhackers.org/challenges/real2/backups/backup_2004-0&quot;+month+&quot;-0&quot;+day+&quot;_1000.sql&quot;
}

else if (x = 1)

{
window.location.href=&quot;http://hellboundhackers.org/challenges/real2/backups/backup_2004-&quot;+month+&quot;-0&quot;+day+&quot;_1000.sql&quot;
}

else if (x = 2)
{
window.location.href=&quot;http://hellboundhackers.org/challenges/real2/backups/backup_2004-0&quot;+month+&quot;-&quot;+day+&quot;_1000.sql&quot;
}

else
{
window.location.href=&quot;http://hellboundhackers.org/challenges/real2/backups/backup_2004-&quot;+month+&quot;-&quot;+day+&quot;_1000.sql&quot;
}

}

</script>