daily pastebin goal
6%
SHARE
TWEET

Untitled

a guest May 16th, 2018 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.EnigmaDroid.EnigmaCentral;
  2.  
  3. import java.io.BufferedReader;
  4. import java.io.IOException;
  5. import java.io.InputStreamReader;
  6. import java.io.PrintWriter;
  7. import java.net.Socket;
  8. import java.net.UnknownHostException;
  9.  
  10. import android.os.AsyncTask;
  11. import android.widget.EditText;
  12. import android.widget.TextView;
  13.  
  14. public class SocketSetup extends AsyncTask<Void, Void, Integer>{
  15.     private Socket sock;
  16.     private BufferedReader in;
  17.     private PrintWriter out;
  18.     private TextView txtv;
  19.     EditText et;
  20.     boolean ck;
  21.     public SocketSetup(){
  22.        
  23.     }
  24.     protected Integer doInBackground(Void...voids){
  25.         try {
  26.             sock = new Socket("irc.enigmagroup.org", 6667);
  27.             in = new BufferedReader(new InputStreamReader(sock.getInputStream()));
  28.             out = new PrintWriter(sock.getOutputStream(), true);
  29.             out.println("NICK St3althdroid");
  30.             out.println("USER st3alth st3alth st3alth st3alth");
  31.             out.println("JOIN #bots"); 
  32.         } catch (UnknownHostException e) {
  33.         // TODO Auto-generated catch block
  34.             e.printStackTrace();
  35.         } catch (IOException e) {
  36.         // TODO Auto-generated catch block
  37.             e.printStackTrace();
  38.         }
  39.         return 0;
  40.     }
  41.     public Socket getSock(){
  42.         return this.sock;
  43.     }
  44. }
RAW Paste Data
Top