2022-11-04 13:25:09 +01:00
|
|
|
#include "Connection.h"
|
2022-11-07 18:53:11 +01:00
|
|
|
#include "Payload.h"
|
|
|
|
#include <iostream>
|
2022-11-04 13:25:09 +01:00
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2022-11-07 18:53:11 +01:00
|
|
|
Connection* c;
|
|
|
|
if(argc == 1){
|
|
|
|
c = new Connection("145.239.73.162", 25565);
|
|
|
|
}else{
|
|
|
|
c = new Connection(argv[1], atoi(argv[2]));
|
|
|
|
}
|
|
|
|
Payload p;
|
|
|
|
p.push_char(0xFE);
|
|
|
|
p.push_char(0x01);
|
|
|
|
p.push_char(0xFA);
|
|
|
|
c->send(p, true);
|
|
|
|
Payload response = c->recv();
|
|
|
|
std::cout << response.getData() << std::endl;
|
2022-11-04 13:25:09 +01:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|