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.

guestbook javascript redirect?


ghost's Avatar
0 0

I find a guestbook vulnerable to javascript code. (like in the lesson)

it allows a javascript alert, but i tried to make it redirect to another website by writing "window.location = "http://thewebsite.com/"" but it wouldnt work. is there another way to do this?


ghost's Avatar
0 0

window.location.href


ghost's Avatar
0 0

what was the xss alert you used?

did it contain " in it?


ghost's Avatar
0 0

yes, instead of using "http://google.com", u can try tu make it without quotes. i though it was somethink like the CHAR(98)?


ghost's Avatar
0 0

location.replace("site.com");


spyware's Avatar
Banned
0 0

mr noob wrote: location.replace("site.com");

Actually, you need to use the http infront of the url, otherwise it just moves to a local file.

The correct code would be: location.replace("http://site.com");


ghost's Avatar
0 0

I got it, thanks for all your help :)