Message
Message
h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <curl/curl.h>
#define CODE_LENGTH 16
#define MAX_CODES 100
void clearScreen() {
#ifdef _WIN32
system("cls");
#else
system("clear");
#endif
}
curl = curl_easy_init();
if (!curl) {
fprintf(stderr, "Error initializing CURL.\n");
return -1;
}
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writeCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, response);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10L);
res = curl_easy_perform(curl);
if (res != CURLE_OK) {
fprintf(stderr, "CURL request failed: %s\n", curl_easy_strerror(res));
curl_easy_cleanup(curl);
return -1;
}
long httpCode = 0;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &httpCode);
curl_easy_cleanup(curl);
int main() {
srand((unsigned int)time(NULL));
printf("%s", LICENSE);
sleep(3);
clearScreen();
int num;
if (scanf("%d", &num) != 1 || num <= 0 || num > MAX_CODES) {
printf("Invalid input. Please enter a positive number up to %d.\n",
MAX_CODES);
return 1;
}
int validCount = 0;
if (checkCode(codes[i])) {
fprintf(file, "Valid: https://discord.gift/%s\n", codes[i]);
printf("Valid Code: %s\n", codes[i]);
validCount++;
} else {
printf("Invalid Code: %s\n", codes[i]);
}
}
fclose(file);
printf("\nResults:\n");
printf("Valid: %d\n", validCount);
printf("Invalid: %d\n", num - validCount);
printf("Valid Codes saved in 'Nitro_Codes.txt'.\n");
return 0;
}