VB icon

A+ Secure Delete Program

Email
Submitted on: 1/5/2015 5:32:00 AM
By: Im_[B]0ReD (from psc cd)  
Level: Intermediate
User Rating: By 2 Users
Compatibility: VB 5.0, VB 6.0
Views: 676
 
     this code takes a file in which you specify, overwrites it 21 times, then deletes it all in about 1-2 seconds depending on the size of the file, i have seen other secure delete programs here but i think that this is for the most part more efficient, it overwrites it 20 times with a bunch of random characters, then for the 21st overwrite it puts 10 bytes in, decreasing the files size to a minimum (almost), after it has overwritten the file 21 times, it deletes it using the 'Kill' statement. as far as i know this program deletes the file clear off your hard disk, maybe a program like norton utilities could recal i but i couldn't find any traces of the deleted file. P.S. im looking for any comments/suggestions to improve the eficiency of this program.
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
				
'**************************************
' Name: A+ Secure Delete Program
' Description:this code takes a file in which you specify, overwrites it 21 times, then deletes it all in about 1-2 seconds depending on the size of the file, i have seen other secure delete programs here but i think that this is for the most part more efficient, it overwrites it 20 times with a bunch of random characters, then for the 21st overwrite it puts 10 bytes in, decreasing the files size to a minimum (almost), after it has overwritten the file 21 times, it deletes it using the 'Kill' statement. as far as i know this program deletes the file clear off your hard disk, maybe a program like norton utilities could recal i but i couldn't find any traces of the deleted file. 
P.S. im looking for any comments/suggestions to improve the eficiency of this program.
' By: Im_[B]0ReD (from psc cd)
'
' Side Effects:it deletes a file, just don't delete any system files and you'll be alright!
'**************************************

Function DeleteFile(Path As String)
'This is an extremely quick file delete developed
'by me in about 5 minutes.
'overwrites the file 21 times then deletes it
'clean off your disk :-)
Dim i As Integer 'variable for times to overwrite
Dim Data1 As String, Data2 As String, Data3 As String, Data4 As String, Data5 As String, Data6 As String, Data7 As String, Data8 As String, Data9 As String, Data10 As String, Data11 As String, Data12 As String, Data13 As String, Data14 As String, Data15 As String, Data16 As String, Data17 As String, Data18 As String, Data19 As String, Data20 As String
'^^^ all 20 data variables, which hold the information to overwrite the file with
Dim FinalByte As Byte 'just a byte to do the final overwrite with
Data1 = Chr(85) 'the variables information
Data2 = Chr(170) 'the variables information
Data3 = Chr(74) 'the variables information
Data4 = Chr(99) 'the variables information
Data5 = Chr(71) 'the variables information
Data6 = Chr(92) 'the variables information
Data7 = Chr(101) 'the variables information
Data8 = Chr(112) 'the variables information
Data9 = Chr(1) 'the variables information
Data10 = Chr(61) 'the variables information
Data11 = Chr(97) 'the variables information
Data12 = Chr(119) 'the variables information
Data13 = Chr(86) 'the variables information
Data14 = Chr(79) 'the variables information
Data15 = Chr(109) 'the variables information
Data16 = Chr(72) 'the variables information
Data17 = Chr(90) 'the variables information
Data18 = Chr(0) 'the variables information
Data19 = Chr(255) 'the variables information
Data20 = Chr(212) 'the variables information
Open Path For Binary Access Write As #1 'open the path so we can overwrite it
For i = 1 To 10 'a loop
Put #1, , Data1 'overwrite
Next i 'stop loop
For i = 1 To 10 'another loop
Put #1, , Data2 'overwrite
Next i 'stop loop
For i = 1 To 10 'another loop
Put #1, , Data3 'overwrite
Next i 'stop loop
For i = 1 To 10 'another loop
Put #1, , Data4 'overwrite
Next i 'stop loop
For i = 1 To 10 'another loop
Put #1, , Data5 'overwrite
Next i 'stop loop
For i = 1 To 10 'Im sure you get the point from here on!
'that this is just the overwriting stage!
Put #1, , Data6
Next i
For i = 1 To 10
Put #1, , Data7
Next i
For i = 1 To 10
Put #1, , Data8
Next i
For i = 1 To 10
Put #1, , Data9
Next i
For i = 1 To 10
Put #1, , Data10
Next i
For i = 1 To 10
Put #1, , Data11
Next i
For i = 1 To 10
Put #1, , Data12
Next i
For i = 1 To 10
Put #1, , Data13
Next i
For i = 1 To 10
Put #1, , Data14
Next i
For i = 1 To 10
Put #1, , Data15
Next i
For i = 1 To 10
Put #1, , Data16
Next i
For i = 1 To 10
Put #1, , Data17
Next i
For i = 1 To 10
Put #1, , Data18
Next i
For i = 1 To 10
Put #1, , Data19
Next i
For i = 1 To 10
Put #1, , Data20
Next i
For i = 1 To 10 'the final loop
Put #1, , FinalByte 'the final overwrite
Next i 'stop final loop
Close #1 'close the file
Kill Path 'delete it
MsgBox "All Done Wiping The File!", vbInformation + vbOKOnly, "All Done!" 'duh
End Function


Other 4 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.