class SocketMaster private BotEnv m_BE private Socket m_sock private B

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
class SocketMaster
{
private BotEnv m_BE;
private Socket m_sock;
private BufferedInputStream m_in;
private PrintWriter m_out;
public SocketMaster (BotEnv _bptr, String _host, int _port) {
m_BE = _bptr;
try {
m_sock = new Socket(_host, _port);
//m_in = new Scanner(m_sock.getInputStream());
m_in = new BufferedInputStream ( m_sock.getInputStream());
m_out = new PrintWriter(m_sock.getOutputStream());
} catch (Exception _e) {
_e.printStackTrace();
}
}
public void run() {
m_out.println(INIT_STRING);
m_out.flush();
int idx;
boolean started = false;
String startLex = "PID";
// Here we going to get all fucking shit, from task details to input stream...
String get, cmd = "", put;
String fromServer;
int readBytes = 0;
while ((readBytes = m_in.read()) != -1) {
System.out.println("Server: " + readBytes);
}
/*
while (m_in.hasNext()) {
get = m_in.next();
if (!started) {
idx = get.indexOf(startLex);
if (idx != -1) {
cmd = get.substring(idx);
started = true;
}
}
else {
idx = get.indexOf(';');
if (idx != -1) {
cmd += get.substring(0, idx);
System.out.println(cmd);
// IMPORTANT! Here we will instantly give out solution response!!!
m_out.print(m_BE.proccessComand(cmd) + ";");
m_out.flush();
cmd = get.substring(idx+1) + " ";
}
else cmd += get + " ";
}
}*/
}
final String INIT_STRING = "launch heratorz CFGSrUPQPKgtmDcKuOhgCSy#CFGwjQJiWQQUViJiymrQoGY#CFGUfimkSUQhcMgGMqlWQYs#CFGWYiZmCiYpYaYWZuBspkg#CFGAEeaubIIRkDOlIxGmyPM#CFGYLEQYicsFWmjwKmXaOmC#CFGufAMuyIOhKxKaSOxoxUN#CFGowmRWjWSWxcZiqlGeYkF#CFGUpogIViMtiOkulA@IYoZ#CFGQOwAkDwyVAZCoKTqFuyJ#CFGMSYfClQgVEaUuinytily#CFGyNQRgQmanQxKmUAXEepm;";
}