Загрузка...

Url:log:pass in C

Thread in C/C++ created by KirtVik Apr 15, 2023. 422 views

  1. KirtVik
    KirtVik Topic starter Apr 15, 2023 12 Sep 3, 2019
    я не знаю что писать(
    прога для вытаскивания url:log:pas с большого кол-во *****, отрабам может пригодится

    скорость маленькая ведь питон

    что бы юзать, кидаем exe в папку с логами и запускаем на выходе получаем base.txt в которой и будут наши строки(антидубли)
    C
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <dirent.h>
    #include <sys/stat.h>
    #define PASSWORDS_FILENAME "Passwords.txt"
    #define MAX_LINE_LEN 1024
    int main() {
    FILE *output_file = fopen("base.txt", "a");
    if (output_file == NULL) {
    fprintf(stderr, "Error: failed to open output file\n");
    return 1;
    }
    DIR *dir = opendir(".");
    if (dir == NULL) {
    fprintf(stderr, "Error: failed to open directory\n");
    return 1;
    }
    struct dirent *ent;
    while ((ent = readdir(dir)) != NULL) {
    if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) {
    continue;
    }
    char path[MAX_LINE_LEN];
    snprintf(path, sizeof(path), "%s/%s", ".", ent->d_name);
    struct stat st;
    if (stat(path, &st) == -1) {
    continue;
    }
    if (S_ISDIR(st.st_mode)) {
    DIR *subdir = opendir(path);
    if (subdir == NULL) {
    continue;
    }
    struct dirent *subent;
    while ((subent = readdir(subdir)) != NULL) {
    if (strcmp(subent->d_name, PASSWORDS_FILENAME) == 0) {
    char filepath[MAX_LINE_LEN];
    snprintf(filepath, sizeof(filepath), "%s/%s", path, subent->d_name);

    FILE *passwords_file = fopen(filepath, "r");
    if (passwords_file == NULL) {
    continue;
    }
    char url[MAX_LINE_LEN], log[MAX_LINE_LEN], pass[MAX_LINE_LEN];
    char line[MAX_LINE_LEN];
    while (fgets(line, sizeof(line), passwords_file) != NULL) {
    if (strstr(line, "URL: ") != NULL) {
    sscanf(line, "URL: %[^\n]", url);
    } else if (strstr(line, "Username: ") != NULL) {
    sscanf(line, "Username: %[^\n]", log);
    } else if (strstr(line, "Password: ") != NULL) {
    sscanf(line, "Password: %[^\n]", pass);
    } else if (strcmp(line, "===============\n") == 0) {
    fprintf(output_file, "%s:%s:%s\n", url, log, pass);
    url[0] = log[0] = pass[0] = '\0';
    }
    }
    fclose(passwords_file);
    }
    }
    closedir(subdir);
    }
    }
    closedir(dir);
    fclose(output_file);
    return 0;
    }


    кому лень компилить:
    1. добавил время(за сколько спарсил строки)
    2. добавил вывод папок и .txt
    3. теперь он работает и с racoon логами, он почти универсальный
    C
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <dirent.h>
    #include <sys/stat.h>
    #include <time.h>
    #define MAX_LINE_LEN 1024

    int main() {
    FILE *output_file = fopen("base.txt", "a");
    if (output_file == NULL) {
    fprintf(stderr, "Error: failed to open output file\n");
    return 1;
    }

    DIR *dir = opendir(".");
    if (dir == NULL) {
    fprintf(stderr, "Error: failed to open directory\n");
    return 1;
    }

    struct dirent *ent;
    int num_folders = 0, num_password_files = 0;
    clock_t start_time = clock();
    while ((ent = readdir(dir)) != NULL) {
    if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) {
    continue;
    }

    char path[MAX_LINE_LEN];
    snprintf(path, sizeof(path), "%s/%s", ".", ent->d_name);

    struct stat st;
    if (stat(path, &st) == -1) {
    continue;
    }

    if (S_ISDIR(st.st_mode)) {
    DIR *subdir = opendir(path);
    if (subdir == NULL) {
    continue;
    }

    num_folders++;

    struct dirent *subent;
    while ((subent = readdir(subdir)) != NULL) {
    if (strcmp(subent->d_name, "passwords.txt") == 0 || strcmp(subent->d_name, "Passwords.txt") == 0) {

    char filepath[MAX_LINE_LEN];
    snprintf(filepath, sizeof(filepath), "%s/%s", path, subent->d_name);

    FILE *passwords_file = fopen(filepath, "r");
    if (passwords_file == NULL) {
    continue;
    }

    num_password_files++;

    char url[MAX_LINE_LEN], log[MAX_LINE_LEN], pass[MAX_LINE_LEN];
    char line[MAX_LINE_LEN];
    while (fgets(line, sizeof(line), passwords_file) != NULL) {
    if (strstr(line, "URL: ") != NULL) {
    sscanf(line, "URL: %[^\n]", url);
    } else if (strstr(line, "Username: ") != NULL || strstr(line, "login: ") != NULL || strstr(line, "USER: ") != NULL) {
    sscanf(line, "%*[^:]: %[^\n]", log);
    } else if (strstr(line, "PASS: ") != NULL || strstr(line, "Password: ") != NULL || strstr(line, "password: ") != NULL) {
    sscanf(line, "%*[^:]: %[^\n]", pass);

    fprintf(output_file, "%s:%s:%s\n", url, log, pass);
    url[0] = log[0] = pass[0] = '\0';
    }
    }
    fclose(passwords_file);
    }
    }
    closedir(subdir);
    }
    }
    closedir(dir);
    fclose(output_file);

    clock_t end_time = clock();
    double elapsed_time = (double) (end_time - start_time) / CLOCKS_PER_SEC;
    printf("Finished in %f seconds.\n", elapsed_time);
    printf("Found %d folders and %d password files.\n", num_folders, num_password_files);

    system("pause");
    return 0;
    }

    кому лень компилить v2:

    redline: [IMG][IMG]
    racoon: [IMG][IMG]
     
  2. ChatGPT
    ChatGPT Apr 15, 2023 2250 Mar 14, 2023
    KirtVik, Sorry I couldn't contact the ChatGPT think tank :(
     
  3. HeartlessReborn
    HeartlessReborn Apr 15, 2023 Banned 724 Aug 8, 2021
    За сколько по времени может отработать примерно гигабайт *****?
     
    1. View previous comments (2)
    2. HeartlessReborn
      KirtVik, это печально( анти дубли это тема
    3. KirtVik Topic starter
  4. sympathy
    sympathy Apr 15, 2023 https://lolz.live/threads/8502180/ - орхив стайл 5223 Dec 10, 2019
    можно юзать кристаллсортер
     
    1. KirtVik Topic starter
  5. ZAPE
    ZAPE Apr 15, 2023 Скупка токенов Twitch - https://lolz.live/threads/8683122/ 1834 Jun 26, 2018
    а зачем, если тоже самое через кристалсортер можно сделать
     
    1. View previous comments (7)
    2. Daemon
      KirtVik, меньше кликов мышкой делать
    3. KirtVik Topic starter
      Daemon, у моего и скорость побольше будет
    4. Daemon
      KirtVik, я говорю про проводник
  6. PREFIRE
    Челики, говорящие про кристалл: вы нахуя воду пьете, если моча тоже утоляет жажду? :wut:
     
    1. KirtVik Topic starter
  7. KirtVik
    KirtVik Topic starter Apr 15, 2023 12 Sep 3, 2019
    может скину вам кодик с такой же фигней, но работай с зипкой(если выйдет нормально и без багов)
     
  8. srrerrerer
    srrerrerer Apr 15, 2023 Нраицаа 268 Mar 15, 2021
    Не плохо, хороший товар
     
    1. KirtVik Topic starter
      srrerrerer, есть ещё бот для тг которому отправляешь архив с логами и он высылает файлик с url:log:pass, я вот думаю за сколько его впаривать можно
    2. 1234567_inactive5780070
      KirtVik, -1500 рублей (сам заплатишь)
    3. srrerrerer
      KirtVik, можешь по рублей 300 в месяц
  9. KalinkaLZ
    KalinkaLZ Apr 17, 2023 Banned 13 Aug 5, 2018
    Hey can you update V2 for iterate through every file/directory recursively ?
    In some **** password.txt is in subfolders.
    Thanks
     
Loading...
Top