A 'Dummy' File Generator
generates a 'dummy' file which can be any type and any number of kilobytes. 110% commented just like my code 'A+ Secure Delete'. purpose is to generate files, so not much of a purpose. i just saw it in a couple of hacking/security programs and thought i'd try it.
AI
Ringkasan AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Kode Sumber
Function GenerateDummyFile(Path As String, LengthInKB As Long) 'This function is used to Generate A "Dummy File" '(it's a file that's only purpose is to do absolutely 'nothing). On Error Resume Next 'If we get an error, keep going Dim GeneratedByte As Byte, Generate As Integer 'the variables Open Path For Binary Access Write As #1 'Open the "Dummy Path" so we can write to it For Generate = 1 To LengthInKB * 1024 'this is the loop to that does 2 things... '1) goes from 1 to the length in KiloBytes (to add to the file) '2) converts bytes to KiloBytes By Multiplying The Size in KB * 1024 (the size of on KB in bytes) Put #1, , GeneratedByte 'put the generated byte into the "Dummy File" Next Generate 'stop the loop MsgBox "Done!" End Function
Komentar Asli (3)
Dipulihkan dari Wayback Machine