Follow us on Twitter!
Society leans ever heavily on computers, if you have the power to take out computers you can take out society. - cubeman372
Friday, April 25, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 20
Guests Online: 18
Members Online: 2

Registered Members: 82906
Newest Member: ilija
Latest Articles
View Thread

HellBound Hackers | Challenges | Javascript

Author

how chars are replaced


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 21-08-06 18:53
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)

Code
%0D%0A - [return] (not 100% sure but seems to be true for all cases ive found so far)
%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 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 two years ago :P). Thx to nights_shadow for the link




Edited by on 21-08-06 19:35
Author

RE: how chars are replaced

Uber0n
Member



Posts: 1963
Location: Sweden‭‮
Joined: 13.06.06
Rank:
Hacker Level 3
Posted on 23-08-06 07:51
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)


img230.imageshack.us/img230/724/uber0nsig3hj6.gif
http://uber0n.web. . .
Nope http://uber0n.webs.com/
Author

RE: how chars are replaced


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 06-09-06 04:51
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:

Code
V0=V0.replace(/&/g, '&amp;');
V0=V0.replace(/</g, '&lt;');
V0=V0.replace(/>/g, '&gt;');
document.write('<pre>');
document.write(V0);
document.write('</pre>');