1712517875

Fuzzing HTTP URLs


This post complements a post about fuzzing urls with javascript. [See here](https://chat-to.dev/post?id=116). It’s possible to fuzz HTTP URLs too but instead of using the protocol you can use the hostname to know if it was successful. You create a for loop as before to loop through the unicode code points and inject the character into the “href” and then check that the hostname matches the expected value. ```js a=document.createElement('a'); log=[]; for(let i=0; i<=0x10ffff; i++) { a.href= `${String.fromCodePoint(i)}https://garethheyes.co.uk`; if(a.hostname === 'garethheyes.co.uk') { log.push(i) } } input.value=log //9,10,13,47,92 ``` As you can see you can place whitespace characters between the slashes and in addition the backslash character can be used just like a forward slash. if you like it, register and join our community. With you we can build a great community of programmers and developers.

To comment this publication you need to be logged in.