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.

how chars are replaced


ghost's Avatar
0 0

Often when you view a sorce code you see the text full of stuff like %20 %23 %3D and so on, these are all placeholders for different chars for instance the most common one is %20 which stands for [space]. If you copy an url that contains spaces into the browser it will replace all the spaces with %20. So why do i bring this up, well mostly becuz im too lazy to each and every time i want to view a sorce code have to eighter try to read the mess as it is or manually replace each of the placesholders one by one, so here is a list of what they stand for (the ones you need to view the sorce of javascript challange 3)

%3A - :
%3B - ;
%3C - <
%3D - =
%3E - >
%3F - ?
%7B - {
%7C - |
%7D - }
%20 - [space]
%21 - !
%22 - "
%26 - &
%27 - '
%28 - (
%29 - )```

well i would be most delighted if you know more of these and filled out the list or even better got a link to a webpage that showed all of these.

and now for all of you programmers with a little too much time, could you make a program that imported a *.txt (or other format) text file and then replaced all the placeholders with their *real* char?

Anyways im sure that you already know of these but the main reason i post it is so that you like me can be a little more lazy next time you view a sorce ^^

**Edit** - oh well as always some1 has done it before :P anyways heres the [link](http://www.yellowpipe.com/yis/tools/encrypter/index.php) to a page which will replace all the placeholders with their *real* chars (plus it has capacity of much much more, damn why didnt i look at [nights_shadow thread](http://www.hellboundhackers.org/readarticle.php?article_id=41) two years ago :P). **Thx to [nights_shadow](http://www.hellboundhackers.org/profile.php?lookup=170) for the link**

Uber0n's Avatar
Member
0 0

Well in fact when using the % sign in JS you enter a hex code afterwards… Meaning %3C is < and %41 is A. The hexadecimal table ffs!

Check http://www.lookuptables.com/ if you don't know what I'm talking about. Smumg has also written an application for converting this into ASCII, it's available at http://www.freewebs.com/smumg/downloads.htm

Peace B)


ghost's Avatar
0 0

why need to unescape it yourself, when the Javascript code already unescapes it?

you can just have Javascript print out the string directly, making sure to escape the special HTML characters:

V0=V0.replace(/&lt;/g, &#39;&amp;lt;&#39;);
V0=V0.replace(/&gt;/g, &#39;&amp;gt;&#39;);
document.write(&#39;&lt;pre&gt;&#39;);
document.write(V0);
document.write(&#39;&lt;/pre&gt;&#39;);```