Und zwar hab ich mir mal ein kleinen Programm geschrieben, zum entschlüsseln von MD5 Hash Werten...
Jedoch ist mir aufgefallen, das die Hash werte manchmal doppelt vergeben sind...
So und nun zur Frage...
Mein Code sieht so aus:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139:
| type KeyArrayType = array [0..60] of char; TForm1 = class(TForm) Button1: TButton; Edit1: TEdit; Edit2: TEdit; Label1: TLabel; Label2: TLabel; Button2: TButton; Edit3: TEdit; Label3: TLabel; Edit4: TEdit; Label4: TLabel; Edit5: TEdit; Edit6: TEdit; procedure Button1Click(Sender: TObject); procedure ZeichenFestlegen; procedure Button2Click(Sender: TObject); private public end;
var Form1: TForm1; KeyArray : KeyArrayType; KeyStr :string;
implementation
uses md5;
{$R *.dfm}
procedure TForm1.ZeichenFestlegen; begin KeyArray[0] := 'A'; KeyArray[1] := 'B'; KeyArray[2] := 'C'; KeyArray[3] := 'D'; KeyArray[4] := 'E'; KeyArray[5] := 'F'; KeyArray[6] := 'G'; KeyArray[7] := 'H'; KeyArray[8] := 'I'; KeyArray[9] := 'J'; KeyArray[10] := 'K'; KeyArray[11] := 'L'; KeyArray[12] := 'M'; KeyArray[13] := 'N'; KeyArray[14] := 'O'; KeyArray[15] := 'P'; KeyArray[16] := 'Q'; KeyArray[17] := 'R'; KeyArray[18] := 'S'; KeyArray[19] := 'T'; KeyArray[20] := 'U'; KeyArray[21] := 'V'; KeyArray[22] := 'W'; KeyArray[23] := 'X'; KeyArray[24] := 'Y'; KeyArray[25] := 'Z'; KeyArray[26] := '1'; KeyArray[27] := '2'; KeyArray[28] := '3'; KeyArray[29] := '4'; KeyArray[30] := '5'; KeyArray[31] := '6'; KeyArray[32] := '7'; KeyArray[33] := '8'; KeyArray[34] := '9'; KeyArray[35] := '0'; KeyArray[36] := 'a'; KeyArray[37] := 'b'; KeyArray[38] := 'c'; KeyArray[39] := 'd'; KeyArray[40] := 'e'; KeyArray[41] := 'f'; KeyArray[42] := 'g'; KeyArray[43] := 'h'; KeyArray[44] := 'i'; KeyArray[45] := 'j'; KeyArray[46] := 'k'; KeyArray[47] := 'l'; KeyArray[48] := 'm'; KeyArray[49] := 'n'; KeyArray[50] := 'o'; KeyArray[51] := 'p'; KeyArray[52] := 'q'; KeyArray[53] := 'r'; KeyArray[54] := 's'; KeyArray[55] := 't'; KeyArray[56] := 'u'; KeyArray[57] := 'v'; KeyArray[58] := 'w'; KeyArray[59] := 'x'; KeyArray[60] := 'y';
end;
procedure TForm1.Button2Click(Sender: TObject); var A,B,C,D,E,F : integer; Hash : String ; KeyStr : String ; X,Count : Integer; begin ZeichenFestlegen; X:=1; Count:=10000; while not (Edit1.Text = Hash) do begin A:=Random(61); B:=Random(61); C:=Random(61); D:=Random(61); E:=Random(61); F:=Random(61); KeyStr:=KeyArray[A]+KeyArray[B]+KeyArray[C]+KeyArray[D]+KeyArray[E]+KeyArray[F]; Hash := MD5Print(MD5String(KeyStr)); Edit2.Text:=KeyArray[A]+KeyArray[B]+KeyArray[C]+KeyArray[D]+KeyArray[E]+KeyArray[F]; X := X+1; Edit5.Text:=inttostr(X); Edit6.Text:=Hash; Count:=Count-1; if (Count = 0 ) then begin refresh; Count:=10000; end;
end;
end; |
Gibt es eine möglichkeit, verschiedene Konfiguration der Arrays einfach in eine StringList, oder was auch immer zu speichern, um einer erneuten Prüfung zu überspringen?
Ich erstelle ja die Strings per zufall generator...
Und kann man irgendwie es so programmieren, das es mit einem Buchstaben anfängt, und nach oben hin max. 12 zeichen hat?
Zum Beispiel:
Lauf 1:
61 möglichkeiten bei 1 Zeichen
Lauf 2:
3721 möglichkeiten bei 2 Zeichen
Lauf 3:
226.981
Lauf 4:
13.845.841
Lauf 5:
844.596.301
Lauf 6:
51.520.374.361
usw......
Da ich das per Zufall generrrator mache, kommen natürlich die Buchstaben und konfiguration doppelt vor...
Teilweise macht das Programm bei einem Buchstaben über 200 durchläufe...
Wäre wichtig für mein nächstes Project...