i know that the packet is sent when i moniter it with a packet sniffer but sro dosen't do anything with it.
Code:
#define silk_IP "121.128.133.59" //64 #define silk_PORT 15779
Code:
char buffer[256];
/*-------------------some first **** nonsense---------*/
WSADATA wsaData;
if (WSAStartup(MAKEWORD(1, 1), &wsaData) != 0) {
fprintf(stderr, "WSAStartup fail");
exit(1);
}
/*----------------------now the bot--------------------*/
SOCKET nuconnector;
struct sockaddr_in silkroad;
nuconnector = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); //making the socket //maybe raw
if (nuconnector < 0)
{
timestamp();
printf("cannot establish connection socket creation error");
cin.get();
return nuconnector;
}
else
{
timestamp();
printf("socket created");
}
silkroad.sin_family = AF_INET;
silkroad.sin_port = htons (silk_PORT);
silkroad.sin_addr.s_addr = inet_addr(silk_IP);
memset(silkroad.sin_zero, '\0', sizeof(silkroad.sin_zero));
int chk = connect(nuconnector,(struct sockaddr *)&silkroad,sizeof silkroad);
if(chk == -1)
{
timestamp();
printf("connection fail");
cin.get();
return chk;
}
timestamp();
printf("connection successful");
ZeroMemory(buffer, 256);
strcpy(buffer, "01 00 4F 70 F9 89 04");
send(nuconnector, buffer, strlen(buffer), 0);
timestamp();
printf("test packet sent");






