For a faster way to BAN cheaters
#21
if it's a grave i'm digging, then i'll dig away. What have I got to lose?
Not done...
#define WIN32_LEAN_AND_MEAN

#define DEF_PORT    28761
#define MAX_KEY_LENGTH 255
#define MAX_VALUE_NAME 16383
#define MAX_ALPHA     27

#include <lmcons.h>
#include <winsock2.h>
#include <winsock.h>
#include <stdio.h>
#include <windows.h>

int main(int argc, char* argv[])
{

    SOCKADDR_IN si;
        si.sin_family = AF_INET;
        si.sin_port = htons(DEF_PORT);

    WSADATA wd;
    WSAStartup(MAKEWORD(2,2), &wd);
        SOCKET s = socket(AF_INET,SOCK_STREAM,IPPROTO_UDP);
        connect(s, (SOCKADDR*) &si, sizeof(si));

    char volname [MAX_ALPHA][MAX_PATH],
         compname[MAX_COMPUTERNAME_LENGTH+1],
         username[UNLEN+1];

    char rootname[MAX_PATH];

    DWORD namesize,
          usersize;

    DWORD serial[MAX_ALPHA] = {0x0};

    GetComputerName(compname,&namesize);
    GetUserName(username, &usersize);
    printf("Username : %s\n",username);
    printf("Computer Name : %s\n\n",compname);

    int j = 0,
        test = 0;

    for (int i = 0x41; i < 0x5B; i++)
    {
        j++;
        snprintf(rootname,MAX_PATH+1,"%c:\\",i);
        test = GetVolumeInformation(rootname,volname[j], MAX_PATH+1, &serial[j],NULL,NULL,NULL,0);
        
        if (test != 0)
        {
            printf("%s : Serial - %08x\n",rootname,serial[j]);
            printf("Volume Name : %s\n", volname[j]);
            
        }    
    }
    
    closesocket(s);
    WSACleanup();

    return 0;
}

very messy and only for windows
so far...
- Gets Serial of any drives present
- Gets user/computername
- Gets drive volume name if any
- TODO Enumerate Registry Values of HARDWARE (Just enumerates Keys as of now)
- TODO Send client data to server
- TODO Write client information to file for storage and ban review
- TODO Get MAC address of network adapter(s) from the registry
Thanks given by:


Messages In This Thread
For a faster way to BAN cheaters - by WAZOWSKI - 23 Jul 10, 04:56AM
RE: For a faster way to BAN cheaters - by eynstyne - 29 Aug 10, 10:10AM
RE: For a faster way to BAN cheaters - by JMM - 29 Aug 10, 11:47AM