לוגו אתר Fresh          
 
 
  אפשרות תפריט  ראשי     אפשרות תפריט  צ'אט     אפשרות תפריט  מבזקים     אפשרות תפריט  צור קשר     חץ שמאלה ‎print ‎"Hello World!"; if‎ ‎not rules.‎know ‎then rules.‎read(); חץ ימינה  

לך אחורה   לובי הפורומים > מחשבים > תכנות ובניית אתרים
שמור לעצמך קישור לדף זה באתרי שמירת קישורים חברתיים
תגובה
 
כלי אשכול חפש באשכול זה



  #1  
ישן 16-10-2005, 01:13
  cyu men cyu men אינו מחובר  
 
חבר מתאריך: 15.07.05
הודעות: 5
צריך עזרה בהסבר קוד Delphi

שלום אני מכתנת ב VB ויש לי קוד שהוא נכתב ב Delphi
אני צריך הסברים על הקוד מי שיכול לעזור,שיכתוב מה כל דבר עושה או אם הוא מבין VB שיכתוב
מה זה אומר ב VB כל עזרה תתקבל בשמחה..
הקוד
קוד:
program RecoverPwd; uses Windows, Messages; var hOutput: HWND; const ID_ABOUT = 1001; IDC_EDIT = 1000; AboutText: PChar = 'ICQ2003/Lite Password Recovery'#13#10' {$R ResFile.res} procedure DecryptPass(dwVolumeSerial: LongWord; lpszMainLocation: Pointer; dwMainLocationLen: LongWord; lpszUIN: PChar); stdcall; external 'ICQ2003Decrypt.dll'; const Key = 'SOFTWARE\Mirabilis\ICQ\NewOwners'; function OpenKey(SubKey: String; var Handle: HKEY): Boolean; begin Result := RegCreateKey(HKEY_CURRENT_USER, PChar(Key + SubKey), Handle) = ERROR_SUCCESS; end; function CloseKey(Handle: HKey): Boolean; begin Result := RegCloseKey(Handle) = ERROR_SUCCESS; end; const HexChars: array[0..$F] of Char = ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'); function ByteToHex(Int: Byte): String; begin Result := HexChars[(Int shr 4) and $F] + HexChars[Int and $F]; end; function PassToHex(const Value: String): String; var i: Word; begin Result := ''; for i := 1 to Length(Value) do Result := Result + ' ' + ByteToHex(Ord(Value[i])); end; function GetDriveSerial: LongWord; var lpRoot: String; lpVolume: String; Serial: LongWord; Max: LongWord; Flags: LongWord; NameBuffer: String; begin Result := 0; SetLength(lpRoot, MAX_PATH); if GetWindowsDirectory(@lpRoot[1], MAX_PATH) = 0 then Exit; SetLength(lpVolume, 40); SetLength(NameBuffer, 40); if not GetVolumeInformation(PChar(Copy(lpRoot, 0, 3)), @lpVolume[1], 40, @Serial, Max, Flags, @NameBuffer[1], 40) then Exit; Result := Serial; end; procedure SetText(Control: HWND; const Value: String); begin SendMessage(Control, WM_SETTEXT, Length(Value), Integer(@Value[1])); end; function AddPass(const SubKey: String): String; var Buffer: array[0..15] of Byte; DataType, BufSize: Integer; Handle: HKey; begin Result := ''; if not OpenKey('\' + SubKey, Handle) then Exit; BufSize := SizeOf(Buffer); if RegQueryValueEx(Handle, 'MainLocation', nil, @DataType, @Buffer, @BufSize) = ERROR_SUCCESS then begin DecryptPass(GetDriveSerial, @Buffer, BufSize, PChar(SubKey)); Result := PChar(@Buffer); end; CloseKey(Handle); end; procedure ShowMeThePasswords; var S: String; Pass: String; Handle: HKEY; lpName: PChar; lpNameLen: LongWord; KeyIndex: Integer; begin SetText(hOutput, 'Could not find any passwords'); if not OpenKey('', Handle) then Exit; S := ''; GetMem(lpName, 20); lpNameLen := 20; KeyIndex := 0; while RegEnumKeyEx(Handle, KeyIndex, lpName, lpNameLen, nil, nil, nil, nil) = ERROR_SUCCESS do begin Pass := AddPass(lpName); if Pass <> '' then begin if S = '' then S := 'Decrypted passwords:'#13#10; S := S + lpName + ': ' + Pass + ' (in hex:' + PassToHex(Pass) + ')'#13#10; end; lpNameLen := 20; Inc(KeyIndex); end; CloseKey(Handle); FreeMem(lpName); if S <> '' then SetText(hOutput, S); end; function WndProc(hwnd, wmsg, wParam, lParam: HWND): Integer; stdcall; begin case wmsg Of WM_INITDIALOG: begin hOutput := GetDlgItem(hwnd, IDC_EDIT); ShowMeThePasswords; end; WM_COMMAND: if wParam = ID_OK then EndDialog(hwnd, 0) else if wParam = ID_ABOUT then MessageBox(hwnd, AboutText, 'About', MB_ICONINFORMATION); WM_CLOSE: EndDialog(hwnd, 0); end; Result := 0; end; begin DialogBoxParam(hInstance, '#101', 0, @WndProc, 0); ShowMeThePasswords; end.
תגובה ללא ציטוט תגובה עם ציטוט חזרה לפורום
תגובה

כלי אשכול חפש באשכול זה
חפש באשכול זה:

חיפוש מתקדם
מצבי תצוגה דרג אשכול זה
דרג אשכול זה:

מזער את תיבת המידע אפשרויות משלוח הודעות
אתה לא יכול לפתוח אשכולות חדשים
אתה לא יכול להגיב לאשכולות
אתה לא יכול לצרף קבצים
אתה לא יכול לערוך את ההודעות שלך

קוד vB פעיל
קוד [IMG] פעיל
קוד HTML כבוי
מעבר לפורום



כל הזמנים המוצגים בדף זה הם לפי איזור זמן GMT +2. השעה כעת היא 04:39

הדף נוצר ב 0.04 שניות עם 12 שאילתות

הפורום מבוסס על vBulletin, גירסא 3.0.6
כל הזכויות לתוכנת הפורומים שמורות © 2024 - 2000 לחברת Jelsoft Enterprises.
כל הזכויות שמורות ל Fresh.co.il ©

צור קשר | תקנון האתר