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
Return to the default flat view 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:
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>"
[Message index]
 
Read Message
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: Wed Nov 27 16:47:01 GMT 2024

Total time taken to generate the page: 0.03776 seconds