Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

Timed 6


ghost's Avatar
0 0

Hi so up until this point I've used grease monkey to complete all of the timed 1-5 challenges. However I'm running into difficultly with this one. I done research and around the forums and google and found the grease monkey function for xmlhttprequest. Below . The function works fine but I can't seem to find a way to get the responseDetails.responseText variable outside the GM function in the main javascript part of the function. So my first question is, is there a way to do this? Since I seem to have found the GM functions allow only local variables.

/* GM_xmlhttpRequest({ method: 'GET', url: querry, //censored to prevent spoiler headers: { 'User-agent': 'Mozilla/4.0 (compatible) Greasemonkey', 'Accept': 'application/atom+xml,application/xml,text/xml', }, onload: function(responseDetails) { alert(responseDetails.responseText); } })

My next question is after failing at this method I tried using the normal xmlhttp Request function but could not get it to load. I tried a basic load function I found on a website. But I never received the alert. Why would this be?

var req = new XMLHttpRequest(); req.open('GET', 'https://developer.mozilla.org/En/Using_XMLHttpRequest', false); req.send(null); if(req.status == 200){ alert(req.responseText); }

Any help would be appreciated. Nighthunter33


spyware's Avatar
Banned
0 0

Same origin policy.


ghost's Avatar
0 0

I actually solved this by just coding the rest of the challenge within the GM function where I had the alert. While I'm sure this is not the correct way to do it. I could not find a way to store the variable. I even tried saving the variable to a text file and reloading it, but that didn't work.

Thanks for the reply of the origin policy, it was actually looking that up that gave me the idea to stay within GM

-nighthunter33