Home »
General »
General Chit Chat »
**IX help - performing urldecode in /bin/sh
**IX help - performing urldecode in /bin/sh [message #17894 ]
Fri, 23 April 2004 15:57
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>"
Rate Topic
1 Worst
2
3
4
5 Best
Goto Forum:
- FUDforum FUDforum Documentation FUDforum Announcements FUDforum Installation Issues How To FUDforum Suggestions - FUDforum Development FUDforum 3.0+ Bug Reports Plugins and Code Hacks Converters Translations Forum Styles Icons & buttons Forum Showcase - General General Chit Chat FUDforum in eGroupWare PHP discussions Database discussions HTML, Javascript, jQuery & AJAX Test Forum Test subforum 1 Test subforum 2
Current Time: Fri May 24 06:27:29 EDT 2013
Total time taken to generate the page: 0.00900 seconds