AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Password hash in RDP files

Ein Thema von Remko · begonnen am 20. Mär 2007 · letzter Beitrag vom 22. Okt 2007
 
shmia

Registriert seit: 2. Mär 2004
5.508 Beiträge
 
Delphi 5 Professional
 
#2

Re: Password hash in RDP files

  Alt 20. Mär 2007, 09:38
The *.RDP file is stored using UNICODE.
The file starts with the BOM (Byte Order Mark): $FF$FE to indicate that the file is using UNICODE.
You could easily view and edit the content the file with the Wordpad application; just draw & drop the file on Wordpad.

Sorry, but your code looks a bit like spaghetti.
Why don't you use a function to calculate the hash for the password ?
function CalcPasswordHash(const PlainPW:string):string; Then compare the output of this function with the content of a RDP file to make shure that your
hash function is fine.

To save your stringlist as UNICODE:
Delphi-Quellcode:
procedure SaveWideStringToFile(const filename:string; const ws:WideString);
const
   BOM_UTF16 = $FEFF; // BOM = Byte Order Mark
var
   fs : TFileStream;
   BOM : WideString;
begin
   BOM := Widechar(BOM_UTF16);
   fs := TFileStream.Create(filename, fmCreate);
   try
      fs.WriteBuffer(BOM[1], Length(BOM)*sizeof(Widechar));
      fs.WriteBuffer(ws[1], Length(ws)*sizeof(Widechar));
   finally
      fs.Free;
   end;
end;

....
    RDPFile.Add('bitmapcachepersistenable:i:1');
// RDPFile.SaveToFile(sRDPFileName); // wrong
    SaveWideStringToFile(RDPFile.Text); // correct
    RDPFile.Free;
Andreas
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 08:21 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz