Code:
void steam_challange_response(sockaddr_in client)
{
char cmd[] = {
0xff, 0xff, 0xff, 0xff, 'A' , 0x30, 0x30, 0x30,
0x30, 0x30, 0x30, 0x30, 0x30, 0x20, 0x31, 0x30,
0x37, 0x31, 0x37, 0x32, 0x37, 0x38, 0x31, 0x39,
0x20, 0x33, 0x20, 0x39, 0x30, 0x30, 0x38, 0x36,
0x39, 0x33, 0x31, 0x39, 0x31, 0x39, 0x36, 0x33,
0x38, 0x35, 0x33, 0x32, 0x6d, 0x20, 0x31, 0x0a,
0x00
};
cout<<cyan<<"["<<ip<<"] -> ["<<inet_ntoa(client.sin_addr)<<"] "<<alb<<cmd;
sendto(sock,cmd,sizeof(cmd),0,(struct sockaddr *)&client,(unsigned int)sizeof(sockaddr));
}
void connect1(sockaddr_in client)
{
char cmd[] = { '˙', '˙', '˙', '˙' , 0x42 };
sendto(sock,cmd,sizeof(cmd),0,(struct sockaddr *)&client,(unsigned int)sizeof(sockaddr));
cout<<cyan<<"["<<ip<<"] -> ["<<inet_ntoa(client.sin_addr)<<"] "<<alb<<cmd<<endl;
}
void connect2(sockaddr_in client)
{
/*cs.pgl.ro*/
char peer1_2[] = {
0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x80,
0x5a, 0x18, 0x01, 0x00, 0x00, 0x00, 0x10, 0x41,
0x23, 0x19, 0x40, 0x01, 0x7d, 0x2e, 0x7f, 0x22,
0x63, 0x64, 0x33, 0x24, 0x61, 0x7e, 0x33, 0x62,
0x21, 0x6e, 0x7c, 0x66, 0x76, 0x22 ,0x3a, 0x6e,
0x1b, 0x3d, 0x21, 0x31, 0x00
};
/*109.163.228.220 (cs.pgl.ro)
char peer1_2[] = {
0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x80,
0x5a, 0x18, 0x01, 0x00, 0x3a, 0x00, 0x10, 0x41,
0x23, 0x19, 0x40, 0x01, 0x7d, 0x2e, 0x7f, 0x22,
0x63, 0x64, 0x33, 0x24, 0x3f, 0x69, 0x70, 0x30,
0x7d, 0x73, 0x26, 0x30, 0x6f, 0x28, 0x32, 0x33,
0x2b, 0x38, 0x22, 0x33, 0x3a, 0x28, 0x27, 0x73,
0x35, 0x0a, 0x00
};
*/
sendto(sock,peer1_2,sizeof(peer1_2),0,(struct sockaddr *)&client,(unsigned int)sizeof(sockaddr));