I'm a total newbie I was just wondering how do I create an Internet Eraser that deltes the Cookies, Cache, Index.dat files?.
_______________
Posted on 2002-10-31 14:29:45 by Alien
Wrong forum.


*moved*
Posted on 2002-10-31 14:35:20 by bazik
Hi Alien,

First welcome to the world of assembly. This post really should be in Main... maybe one of the mods will move it.

In order to do somthing like that you'll need to get familar with quite a few APIs. Try to get your hands on the PSDK (Platform Software Development Kit) from Microsoft - This has to be one of the most useful places to get info for win32 programming.

You also might want to get the Intel Manuals as these have the information you'll need to understand the opcodes used in masm. Do a search here and you should find some links to get them.

And finally, because I'm not sure how much programming you've done before, my guess is this will be a fairly difficult project for a newbie. I'm not going to say you can't do it because I jumped into asm with a difficult project too. Just make sure you do a little at a time and read a lot, the less stressed you are the faster you'll learn assembly and the sooner your project will come to life. Oh and I Icz tuts are a very easy fast way to start!

edit: Bazik moved just posted :)

Good luck and again welcome to the board!
James:alright:
Posted on 2002-10-31 14:42:23 by JamesE
Index.dat files?
Index.dat is a special file, which windows protects quite zealously, you cannot directly access it while windows is running. Its format is proprietry, and there are no official published APIs for handling it directly. And if you corrupt it, because of the ties between the OS, IE and the filesystem, you could be looking at a real mess to clean up.
Posted on 2002-10-31 18:26:29 by sluggy

Index.dat is a special file, which windows protects quite zealously, you cannot directly access it while windows is running. Its format is proprietry, and there are no official published APIs for handling it directly. And if you corrupt it, because of the ties between the OS, IE and the filesystem, you could be looking at a real mess to clean up.


LOL :grin:
Nah, dont scare him... you can't delete "index.dat" files, but you can just open them ("CreateFile") and empty the file (at least it worked on Win2k).
Posted on 2002-11-01 01:35:12 by bazik
.386

.model flat, stdcall
option casemap:none

;::::::::::::::::::::::::::::::::::::::::::::::

include \masm32\include\windows.inc

include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\wininet.inc

includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\wininet.lib

include \masm32\mProgs\Macros\Macros.mac
include \masm32\mProgs\Macros\Strings.mac

;::::::::::::::::::::::::::::::::::::::::::::::

.code

CleanIECache proc

LOCAL hCache:HANDLE
LOCAL dwBufferSize:DWORD
LOCAL hHeap:HANDLE
LOCAL pHeap:LPVOID

LOCAL CacheEntry[16]:INTERNET_CACHE_ENTRY_INFO
mov hCache, NULL
mov pHeap, NULL
mov dwBufferSize, sizeof CacheEntry
invoke FindFirstUrlCacheEntry, NULL, addr CacheEntry, addr dwBufferSize
.if eax != NULL
mov hCache, eax
.else
invoke GetLastError
.if eax == ERROR_INSUFFICIENT_BUFFER
mov hHeap, $invoke(GetProcessHeap)
mov pHeap, $invoke(HeapAlloc, hHeap, HEAP_ZERO_MEMORY, dwBufferSize)
; Try again with appropriate buffer size
invoke FindFirstUrlCacheEntry, NULL, addr CacheEntry, addr dwBufferSize
.if eax != NULL
mov hCache, eax
.else
invoke GetLastError
.if eax == ERROR_INSUFFICIENT_BUFFER
invoke MessageBox, NULL, $CTA0(,"Can't allocatebuffer of appropriate size.",), NULL, MB_ICONERROR
.else
invoke MessageBox, NULL, $CTA0(,"Fail to clear.",), NULL, MB_ICONERROR
.endif
.endif
.endif
.endif

.if hCache != NULL
.while TRUE
invoke FindNextUrlCacheEntry, hCache, addr CacheEntry, addr dwBufferSize
.if eax == FALSE
invoke GetLastError
.break .if eax == ERROR_NO_MORE_ITEMS
.endif
invoke DeleteUrlCacheEntry, CacheEntry.lpszSourceUrlName
.endw
invoke FindCloseUrlCache, hCache
.endif

.if pHeap != NULL
invoke HeapFree, hHeap, 0, pHeap
.endif

ret

CleanIECache endp

end CleanIECache



$invoke and $CTA0 are macros i use, but i hope you will be able to rewrite it common way.
And it doesn't deal with index.dat.
Posted on 2002-11-01 02:23:05 by Four-F