Jump to content

sunless

Members
  • Posts

    12
  • Joined

  • Last visited

sunless's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I wan't find the url in IE cache . and I found func FindFirstUrlCacheEntryEx and FindNextUrlCacheEntryEx in wininet.dll can do it . So I wan't use Dllcall to use that func. but my script is worng. my script $d = DllStructCreate("dword;byte") $t = DllStructCreate("dword;byte") $m = DllStructCreate("dword;byte") $tt = DllCall("wininet.dll","int","FindFirstUrlCacheEntryEx", _ "str","", _ "ptr", 0, _ "ptr","NORMAL_CACHE_ENTRY", _ "ptr", 0, _ "ptr", DllStructGetPtr($res), _ "ptr",DllStructGetPtr($d), _ "ptr", DllStructGetPtr($t), _ "ptr", DllStructGetPtr($m), _ "ptr",0) and this is the func in msdn HANDLE FindFirstUrlCacheEntryEx( __in LPCTSTR lpszUrlSearchPattern, __in DWORD dwFlags, __in DWORD dwFilter, __in GROUPID GroupId, __out LPINTERNET_CACHE_ENTRY_INFO lpFirstCacheEntryInfo, __inout LPDWORD lpdwEntryInfo, __out LPVOID lpGroupAttributes, __inout LPDWORD lpcbGroupAttributes, __in LPVOID lpReserved ); and msdn url http://msdn2.microsoft.com/en-us/library/a...034(VS.85).aspx BOOL FindNextUrlCacheEntryEx( __in HANDLE hEnumHandle, __inout LPINTERNET_CACHE_ENTRY_INFO lpNextCacheEntryInfo, __inout LPDWORD lpcbEntryInfo, LPVOID lpGroupAttributes, LPDWORD lpcbGroupAttributes, LPVOID lpReserved ); and http://msdn2.microsoft.com/en-us/library/a...057(VS.85).aspx and a code of delphi unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, Wininet, StdCtrls; type TForm1 = class(TForm) Button1: TButton; ListBox1: TListBox; ListBox2: TListBox; Button2: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private function FindNextEntrys(Handle:Integer):Boolean; { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.DFM} function TForm1.FindNextEntrys(Handle:Integer):Boolean; var T: PInternetCacheEntryInfo; D: DWORD; begin D := 0; FindnextUrlCacheEntryEx(Handle, nil, @D, nil, nil, nil); GetMem(T, D); try if FindNextUrlCacheEntryEx(Handle, T, @D, nil, nil, nil) then begin ListBox1.Items.Add(T.lpszSourceUrlName); ListBox2.Items.Add(T.lpszLocalFileName); Result := True; end else Result := False; finally FreeMem(T, D) end; end; procedure TForm1.Button1Click(Sender: TObject); var H:Integer; T: PInternetCacheEntryInfo; D: DWORD; begin D := 0; FindFirstUrlCacheEntryEx(nil, 0, NORMAL_CACHE_ENTRY, 0,nil,@D, nil, nil, nil); GetMem(T, D); try H := FindFirstUrlCacheEntryEx(nil,0, NORMAL_CACHE_ENTRY, 0, T, @D, nil, nil, nil); if (H = 0) then else begin repeat until not FindNextEntrys(H); FindCloseUrlCache(H); end finally FreeMem(T, D) end; end; procedure TForm1.Button2Click(Sender: TObject); var URL:String; begin If ListBox1.ItemIndex >=0 then begin URL:=ListBox1.Items.Strings[ListBox1.ItemIndex]; Self.Caption := URL; if DeleteUrlCacheEntry(PChar(URL))then ListBox1.Items.Delete(ListBox1.ItemIndex); end; end; end. and type of PInternetCacheEntryInfo PInternetCacheEntryInfoA = ^INTERNET_CACHE_ENTRY_INFOA; INTERNET_CACHE_ENTRY_INFOA = record dwStructSize: DWORD; { version of cache system. ?? do we need this for all entries? } lpszSourceUrlName: PAnsiChar; { embedded pointer to the URL name string. } lpszLocalFileName: PAnsiChar; { embedded pointer to the local file name. } CacheEntryType: DWORD; { cache type bit mask. } dwUseCount: DWORD; { current users count of the cache entry. } dwHitRate: DWORD; { num of times the cache entry was retrieved. } dwSizeLow: DWORD; { low DWORD of the file size. } dwSizeHigh: DWORD; { high DWORD of the file size. } LastModifiedTime: TFileTime; { last modified time of the file in GMT format. } ExpireTime: TFileTime; { expire time of the file in GMT format } LastAccessTime: TFileTime; { last accessed time in GMT format } LastSyncTime: TFileTime; { last time the URL was synchronized } { with the source } lpHeaderInfo: PBYTE; { embedded pointer to the header info. } dwHeaderInfoSize: DWORD; { size of the above header. } lpszFileExtension: PAnsiChar; { File extension used to retrive the urldata as a file. } dwReserved: DWORD; { reserved for future use. } end; {$EXTERNALSYM INTERNET_CACHE_ENTRY_INFOA} PInternetCacheEntryInfoW = ^INTERNET_CACHE_ENTRY_INFOW; INTERNET_CACHE_ENTRY_INFOW = record dwStructSize: DWORD; { version of cache system. ?? do we need this for all entries? } lpszSourceUrlName: PAnsiChar; { embedded pointer to the URL name string. } lpszLocalFileName: PWideChar; { embedded pointer to the local file name. } CacheEntryType: DWORD; { cache type bit mask. } dwUseCount: DWORD; { current users count of the cache entry. } dwHitRate: DWORD; { num of times the cache entry was retrieved. } dwSizeLow: DWORD; { low DWORD of the file size. } dwSizeHigh: DWORD; { high DWORD of the file size. } LastModifiedTime: TFileTime; { last modified time of the file in GMT format. } ExpireTime: TFileTime; { expire time of the file in GMT format } LastAccessTime: TFileTime; { last accessed time in GMT format } LastSyncTime: TFileTime; { last time the URL was synchronized } { with the source } lpHeaderInfo: PBYTE; { embedded pointer to the header info. } dwHeaderInfoSize: DWORD; { size of the above header. } lpszFileExtension: PWideChar; { File extension used to retrive the urldata as a file. } dwReserved: DWORD; { reserved for future use. } end; {$EXTERNALSYM INTERNET_CACHE_ENTRY_INFOW} PInternetCacheEntryInfo = PInternetCacheEntryInfoA; TInternetCacheEntryInfoA = INTERNET_CACHE_ENTRY_INFOA; LPINTERNET_CACHE_ENTRY_INFOA = PInternetCacheEntryInfoA; {$EXTERNALSYM LPINTERNET_CACHE_ENTRY_INFOA} TInternetCacheEntryInfoW = INTERNET_CACHE_ENTRY_INFOW; LPINTERNET_CACHE_ENTRY_INFOW = PInternetCacheEntryInfoW; {$EXTERNALSYM LPINTERNET_CACHE_ENTRY_INFOW} TInternetCacheEntryInfo = TInternetCacheEntryInfoA;help me thanks
  2. The link of the func CryptRDPPassword .http://www.remkoweijnen.nl/blog/2007/10/18/how-rdp-passwords-are-encrypted/ and the link of the func CryptProtectData in msdn. http://msdn2.microsoft.com/en-us/library/aa380261.aspx
  3. this function is encrypt RDP password with crypt32.dll. I wan't to convert it to au3 ,but I can't.Can anybody help me.thanks. function CryptRDPPassword(sPassword: string): string; var DataIn: DATA_BLOB; DataOut: DATA_BLOB; pwDescription: PWideChar; PwdHash: string; begin PwdHash := ; DataOut.cbData := 0; DataOut.pbData := nil; // RDP uses UniCode DataIn.pbData := Pointer(WideString(sPassword)); DataIn.cbData := Length(sPassword) * SizeOf(WChar); // RDP always sets description to psw pwDescription := WideString(psw); if CryptProtectData(@DataIn, pwDescription, nil, nil, nil, CRYPTPROTECT_UI_FORBIDDEN, // Never show interface @DataOut) then begin PwdHash := BlobDataToHexStr(DataOut.pbData, DataOut.cbData); end; Result := PwdHash; // Cleanup LocalFree(Cardinal(DataOut.pbData)); LocalFree(Cardinal(DataIn.pbData)); end; The link of the func CryptRDPPassword .http://www.remkoweijnen.nl/blog/2007/10/18/how-rdp-passwords-are-encrypted/ and the link of the func CryptProtectData in msdn. http://msdn2.microsoft.com/en-us/library/aa380261.aspx
  4. i want use a delphi fucn Function GetVolume(strVolumeMountPoint, strVolumeName:String; intBufferLength:Longword):integer; stdcall; external 'DiskVolume.dll'; but i convert it au3 ,it not work Func _GetVolume($diskname) $str = "char[128]" $a = DllStructCreate($str) $rc= DllCall("DiskVolume.dll","ubyte","GetVolume","str",$diskname,"ptr",DllStructGetPtr ($a)) $dd = DllStructGetData($a,1) Return $dd EndFunc
  5. How can i get internet time and set to local computer?
×
×
  • Create New...