Jump to content

Recommended Posts

Posted

Is there a way to get this to write files over 2gb or ram?

I really like this one ;), but some points came to my mind. Better use _Winapi_FileGetSizeEx to pass the 2 GB limit. Also I would recommend to process larger files in a loop, as the files are mapped to the process address space and thus large files are likely to consume too much RAM (up to crashing the script). My post on " should contain all required details for that.

  • 2 years later...
Posted

Only your test version works for me:

Is it considered safe, so the files can't be recovered with such software as recuva?

Func FileWipe($sFileName, $nByte = 0x0)
    If Not FileExists($sFileName) Then Return
    $iSize = FileGetSize($sFileName)
    $tBuffer = DLLStructCreate("byte[" & $iSize & "]")
    MemSet(DLLStructGetPtr($tBuffer), $nByte, $iSize)
    $hFile = _WinAPI_CreateFile($sFileName, 2, 6)
    _WinAPI_WriteFile($hFile, DLLStructGetPtr($tBuffer), $iSize, $iSize)
    _WinAPI_CloseHandle($hFile)
    FileDelete($sFileName)
EndFunc

 

Posted

Try it!

Wipe it with this function and then use some recover tools to see if content of recovered files will be original or zeros.

​I tried with recuva, and the result was zeroes :D

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...