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.

Real 2 with javascript i need help


ghost's Avatar
0 0

i do it : </HEAD> <script type="text/javascript"> function larika() { i = 0 j = 0 var day = new Array("01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31") var hour = new Array("00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24") url = "http://hellboundhackers.org/challenges/real2/backups/backup_2004-09-"+(day.valueOf[i]))+"_"+(hour.valueOf[j])+"00.sql"

while (i <= 31) { while (j <= 24) { window.location(url) j = j+1} i = i+1} }

</script> <TITLE>Larica src</TITLE> </HEAD> <BODY> <input type="button" value="Check" onclick="larika()" /></BODY> </HTML>

Can anyone help me to understand what i'm wrong? Thanks


ghost's Avatar
0 0

whoa,

So it seems to me that you are trying to make a keygen for finding the file?

I dont see where it's going to tell you where the file is. Ok; you have a submit but where is it going to show you?

SwiftNomad


ghost's Avatar
0 0

Cute but isn't this a little on the 'too much info' side? And no offence, but seems weird that you wrote that script and yet can't see the obvious bug as to why it's not working.


ghost's Avatar
0 0

Sorry guy and thanks for replyes!

My intenction was to see if my "first" script was capable to open almoust a page (url)!!! Now i'm working to correct the errors and the i'm thinking to a output that write a message whit the right url. To do this i'm thinking to controll the server response but still i dont know how do it.

Thank you very much for attention


ghost's Avatar
0 0

i've seen that my array is undefined. I have to correct this….


ghost's Avatar
0 0

Ho can i controll the server response?

i correct my script to this :

</HEAD> <script type="text/javascript"> function larika() { i = 0 j = 0

var day = new Array("01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31"); var hour = new Array("00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24"); var url = "http://hellboundhackers.org/challenges/real2/backups/backup_2004-09-"+day[i]+"_"+hour[j]+"00.sql";

while (i <= 31) { while (j <= 24) { j = j+1} i = i+1} }

</script> <TITLE>Larica src</TITLE> </HEAD> <BODY> <input type="button" value="Check" onclick="larika()" /></BODY> </HTML>

Now i wont to controll the server response for each url and open a new page whit the right url. Anyone can help me with this? Thanks


AldarHawk's Avatar
The Manager
0 0

good question…I would like to know the answer to this question as well.

What I want to see is the output be placed on the page when it finds a file saying the URL "<urlpath here>" has been found.

Now how to do that I know not for I suck at programming…any help would be cool


AldarHawk's Avatar
The Manager
0 0

I got it with a somewhat bruteforce way….made a calendar and made each hour of each day link to the appropriate part. No fun all that damn "Tab, Enter, Backspace, repeat!!!" but I got it ;)


ghost's Avatar
0 0

I dont think that the script needs to be too complicated, I did it with just two simple functions.

I liked this challenge

THX

Dantronix :D


ghost's Avatar
0 0

javascript is client side.


ghost's Avatar
0 0

i suck at programming theres no way i can make the program on my own


ghost's Avatar
0 0

you should learn then. javascript isnt a hard language


ghost's Avatar
0 0

Idk what i would call this but i upgraded the script a lil <html> <head> <script type="text/javascript"> function larika(i,j) { var day = new Array("0","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31"); var hour = new Array("00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24"); document.getElementById("frm").src="http://hellboundhackers.org/challenges/real2/backups/backup_2004-09-"+(day[i])+""+(hour[j])+"00.sql"; document.getElementById("txt").innerHTML="The Current number it is on is I: "+i+", and J: "+j+" that means that the file is <br />backup_2004-09-"+(day[i])+""+(hour[j])+"00.sql"; if(j<=23) { j = j+1; t = setTimeout("larika("+i+","+j+")", 1000); } else { if(i<=30) { i = i+1; t = setTimeout("larika("+i+", 0)", 1000); } } } function stopCount() { clearTimeout(t) } </script> <TITLE>Larika moded</TITLE> </HEAD> <BODY onload="larika(1,0);"><table align="center"><tr><td> <iframe width="500px" height="200px" id="frm" src="http://hellboundhackers.org/challenges/real2/backups/backup_2004-09-00_0000.sql" ></iframe> </td></tr><tr><td align="center"><input type="button" onclick="stopCount();" value="stop" /></td></tr><tr><td align="center"><p id="txt">Run Script :-)</p></td></tr></table> </BODY> </HTML>


ghost's Avatar
0 0

Hmmm i think i might have a vulun for that script. alert(day[i])+"_"+(hour[j]) Im not quite sure i have diferent variations but that was my first guess.