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 :: Polls :: Message Navigator
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 19:57
lahoo is currently offline  lahoo   Sweden
Messages: 62
Registered: April 2004
Karma: 0
Member
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>"
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Sun Nov 24 13:13:29 GMT 2024

Total time taken to generate the page: 0.02157 seconds