FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » General Chit Chat » **IX help - performing urldecode in /bin/sh
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
**IX help - performing urldecode in /bin/sh [message #17894] Fri, 23 April 2004 15:57
lahoo is currently offline  lahoo   Sweden
Messages: 62
Registered: April 2004
Karma: 0
Member
add to buddy list
ignore all messages by this user
I don't have shell access to my web providers **IX-servers so I'm bypassing this with a small CGI hack.

However I need help on how to decode the charcters of the data sent via the GET method that get url encoded. Substituting + with space is done but how do I for instance decode %2F back to the character / ?

#!/bin/sh
echo Content-type: text/html
echo
echo "<html><body onload='form.run.focus();'>"
RUN=`echo $QUERY_STRING|cut -c5-|[B]tr + ' '[/B]`
echo "<form name=form method=GET action=/cgi-bin/_test/shell.cgi><input id=run type=text name=run size=40 value='"
echo $RUN
echo "'><input type=submit value=run></form>"
echo "<hr><pre>"
exec $RUN
echo "</pre>"
echo "</body></html>"
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: What are the cookie settings for this forum?
Next Topic: Amazing! Everyone seems to love it!
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Oct 24 19:47:32 EDT 2014

Total time taken to generate the page: 0.00649 seconds