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 19:57 |
lahoo
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>"
|
|
|
Goto Forum:
Current Time: Wed Nov 27 16:47:01 GMT 2024
Total time taken to generate the page: 0.03776 seconds