dict_gen 0.1beta - Suchen Hilfe

  • geschlossen
  • C

  • horiz0n
  • 1137 Aufrufe 0 Antworten

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • dict_gen 0.1beta - Suchen Hilfe

    Hi Leute,

    confusion und ich habe ein Programm Namens dict_gen geschrieben.
    Es erstellt "on the fly" Wortlisten die aircrack verwenden kann
    um WPA Handshakes zu cracken.

    Bei 2x3,1Ghz rund 500 Keys/Sekunde

    WIR SUCHEN DICH!

    Du kannst C oder C++ und hast Lust uns bei dict_gen zu unterstützen?
    Wir möchten folgendes einbauen.
    -Startstring (Um nicht bei jedem Vorgang von vorne anfangen zu müssen)
    -Konstanten im String (Zum Bsp. Stelle 3 ist immer eine "F")
    -Bereiche im String (Zum Bsp. Stelle 3 ist nur von "5" bis "7")

    Weitere Ideen sind erwünscht!

    Hier der Code, das Programm hat die GNU General Public License:

    C-Quellcode

    1. #include <stdio.h>
    2. #include <string.h>
    3. /*
    4. dict_gen ist ein Programm, welches eine Wortliste erstellt, die alle moeglichen Kombinationen mit den gewaehlten
    5. Zeichen in einer bestimmten Laenge generiert.
    6. Es arbeitet gut zusammen mit Aircrack-NG um WPA/WPA2 Handshakes zu cracken.
    7. Copyright (C) 2008 confusion & horiz0n
    8. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
    9. License as published by the Free Software Foundation; either version 3 of the License, or (at your opinion) any
    10. later version.
    11. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, without even the implied
    12. warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
    13. You should have received a copy of the GNU General Public License along with this program; if not, see
    14. http://www.gnu.org/licenses/
    15. Parameter:
    16. -i interaktiv benutzen zum Testen und um die richtigen Einstellungen zu finden mit -l und -t
    17. ---------------------------
    18. -l Laenge Laenge der zu testenden Passwoertes
    19. -t Worttyp zu verwendende Zeichen sind Klein- und Großbuchstaben, Zahlen und Sonderzeichen
    20. -f Datei bisher noch nicht integriert
    21. Benutzung mit Aricrack-NG:
    22. dict_gen -l <Laenge> -t <Worttyp> | aircrack-ng <CAP Datei> -w "-" -b <BSSID des AP>
    23. Beispiel: dict_gen -l 8 -t 1234 | aircrack-ng meinwpa-01.cap -w "-" -b 00:11:22:33:44:55
    24. */
    25. int pwlaenge, type, charslaenge = 92, c = 0, i = 1, j, k;
    26. int finished = 1; //used to determine if all combinations are gone through
    27. char chars[92]; //contains the allowed characters, the length is the highest amount of chars + \0
    28. char pw[2][65]; //contains the actual string (index 0 or c) and the coresponding index in chars (index 0 or i)
    29. void generate(); // controlling the rec_gen()
    30. void typetochars(); // used to create the characterlist by a given mode
    31. void rec_gen(int); // a recursive function to create the strings
    32. int main(int argc, char *argv[]){
    33. if(argc == 2 && strcmp(argv[1], "-i") == 0){
    34. printf("\nDictionary-Generator 0.1beta\n\n");
    35. printf("Benutzen sie dict_gen NICHT um Handshakes fremder Netzwerke zu cracken!\n\nBitte geben sie die Laenge des zu erzeugenden Passwortes ein:");
    36. scanf("%i", &pwlaenge);
    37. printf("\nWas soll alles versucht werden?\n\n");
    38. printf("\t[1]\tZahlen 0-9\n\t[2]\tKleinbuchstaben a-z\n\t[3]\tGrossbuchstaben A-Z\n\t[4]\tSonderzeichen 30 Stueck \n\n");
    39. printf("\tMoegliche Eingaben sind: [ 1, 2, 3, 4 | 12, 13, 14, 23, 24, 34 | 123, 234, 134, 1234 ]\n\t");
    40. scanf("%i", &type);
    41. typetochars(type);
    42. printf("Beginne Erstellung...\nJe nach Auswahl kann es einige Zeit dauern...\n");
    43. }else if(argc == 5){
    44. if((strcmp(argv[1], "-t") == 0 && strcmp(argv[3], "-l") == 0) || (strcmp(argv[1], "-l") == 0 && strcmp(argv[3], "-t") == 0)){
    45. if(strcmp(argv[1], "-t") == 0){
    46. type = atoi(argv[2]);
    47. pwlaenge = atoi(argv[4]);
    48. }else{
    49. type = atoi(argv[4]);
    50. pwlaenge = atoi(argv[2]);
    51. }
    52. typetochars(type);
    53. }else{
    54. printf("\nDictionary-Generator 0.1beta\n\n");
    55. printf("Falsche Parameter!\n");
    56. printf("Benutzung:\n\t-i\tInteraktiv\n\t-t\tWorttyp\n\t-l\tWortlaenge\n\n");
    57. return 1;
    58. }
    59. }else{
    60. printf("\nDictionary-Generator 0.1beta\n\n");
    61. printf("Falsche Parameter!\n");
    62. printf("Benutzung:\n\t-i\tInteraktiv\n\t-t\tWorttyp\n\t-l\tWortlaenge\n\n");
    63. return 1;
    64. }
    65. // initialize array
    66. for(j = 0; j < pwlaenge; j++){
    67. pw[c][j] = chars[0];
    68. pw[i][j] = 0;
    69. }
    70. pw[0][pwlaenge] = '\0';
    71. pw[1][pwlaenge] = 0;
    72. // start to generate strings
    73. generate();
    74. return 0;
    75. }
    76. void typetochars(){
    77. if(type == 1){
    78. strcpy(chars, "0123456789");
    79. charslaenge = 10;
    80. }else if(type == 12){
    81. strcpy(chars, "0123456789abcdefghijklmnopqrstuvxxyz");
    82. charslaenge = 36;
    83. }else if(type == 123){
    84. strcpy(chars, "0123456789abcdefghijklmnopqrstuvxxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
    85. charslaenge = 62;
    86. }else if(type == 2){
    87. strcpy(chars, "abcdefghijklmnopqrstuvxxyz");
    88. charslaenge = 26;
    89. }else if(type == 3){
    90. strcpy(chars, "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
    91. charslaenge = 26;
    92. }else if(type == 1234){
    93. strcpy(chars, "0123456789abcdefghijklmnopqrstuvxxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!§$%&/()=?+#-.,²³{~[]}@€^°:;'*");
    94. charslaenge = 92;
    95. }else if(type == 23){
    96. strcpy(chars, "abcdefghijklmnopqrstuvxxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
    97. charslaenge = 52;
    98. }else if(type == 234){
    99. strcpy(chars, "abcdefghijklmnopqrstuvxxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!§$%&/()=?+#-.,²³{~[]}@€^°:;'*");
    100. charslaenge = 82;
    101. }else if(type == 34){
    102. strcpy(chars, "ABCDEFGHIJKLMNOPQRSTUVWXYZ!§$%&/()=?+#-.,²³{~[]}@€^°:;'*");
    103. charslaenge = 34;
    104. }else if(type == 134){
    105. strcpy(chars, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!§$%&/()=?+#-.,²³{~[]}@€^°:;'*");
    106. charslaenge = 56;
    107. }else if(type == 14){
    108. strcpy(chars, "0123456789!§$%&/()=?+#-.,²³{~[]}@€^°:;'*");
    109. charslaenge = 40;
    110. }else if(type == 24){
    111. strcpy(chars, "abcdefghijklmnopqrstuvxxyz!§$%&/()=?+#-.,²³{~[]}@€^°:;'*");
    112. charslaenge = 56;
    113. }else if(type == 4){
    114. strcpy(chars, "!§$%&/()=?+#-.,²³{~[]}@€^°:;'*");
    115. charslaenge = 30;
    116. }else if(type == 13){
    117. strcpy(chars, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ");
    118. charslaenge = 36;
    119. }
    120. }
    121. void generate(){
    122. printf("%s\n", pw[c]);
    123. while(finished == 1){
    124. rec_gen(0);
    125. }
    126. }
    127. void rec_gen(int ws){
    128. if(finished == 1){
    129. // if the last character in the char-array is not yet reached...
    130. if(pw[i][ws] < charslaenge-1){
    131. pw[i][ws] = pw[i][ws] + 1;
    132. pw[c][ws] = chars[pw[i][ws]];
    133. // print the string on screen
    134. printf("%s\n", pw[c]);
    135. }else{
    136. // if we finished the last position in the string and are finished
    137. if(ws == pwlaenge-1){
    138. finished = 0;
    139. // otherwise continue in the next position
    140. }else{
    141. pw[i][ws] = 0;
    142. pw[c][ws] = chars[pw[i][ws]];
    143. rec_gen(ws+1);
    144. }
    145. }
    146. }
    147. }
    Alles anzeigen


    mfg
    horiz0n