![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Professional Programmer
|
Help making a Drive Scanner
Hey yall. For my Spyware program I need something that can scan all the files ona HDD, Floppy, and CD. If yall can kinda pint me in the right direction towards some links or if yall wouldnt mind helping me because I'm sure it would take awhile alone. I would extremely greatful. I underdstand yall have your own projects. But I just thought I'd ask. Also, what some things that would make present spyware programs better?
__________________
Forgiveness is the fragrance that the violet sheds on the heal that has crushed it. - Mark Twain Destruction leads to a very rough road, but it also breeds creation. |
|
|
|
|
|
#2 | |
|
Programming Guru
![]() ![]() ![]() |
I'm almost certain you meant anti-Spyware and not Spyware. If so, you could start by getting a list of all logical drives:
Import System.IO
...
Public Function ListAllDrives() As String()
Dim arDrives() As String
arDrives = Directory.GetLogicalDrives()
Return arDrives
End Function
'SAMPLE USAGE
Dim sDrive As String, sDrives() As String
sDrives = ListAllDrives()
For Each sDrive In sDrives
Debug.WriteLine(sDrive)
Nextor as an alternative: ' List the drives.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal _
e As System.EventArgs) Handles MyBase.Load
For Each drive As String In Directory.GetLogicalDrives()
lstDrives.Items.Add(drive)
Next drive
End SubQuote:
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
|
#3 |
|
Professional Programmer
|
This is my code to get drives on the system:
Public Sub GetDrives()
Dim drives As String() = Directory.GetLogicalDrives
For Each drive As String In drives
Dim di As DriveInfo = New DriveInfo(drive)
Dim newlst1 As ListViewItem
newlst1 = lstdrives.Items.Add(0)
Try
newlst1.Text = (drive & di.VolumeLabel)
Catch ex As Exception
newlst1.Text = (drive & "")
End Try
Next
End SubBut how can I be sure I get all the fiels in the sytem? Like I want it to scan the selected dirves in the listbox. But I dont know how to scan all the files and folders and registry and stuff. Also, I thought about someythign to mkae it better, but I dont know if it would work. 1.Incase it misses anything "very very harmful" It creates a small backup of everything, and saves the status on a floppy from whivch you can boot. Hopefully this feature wont be used very often but just incase. I dont know if thats somethign that would help, people or for the most part be a nusiance. But lewt me know what yall think and mayeb so other stuff yall might think would help it out. 2. I don't know if other anti-spyware programs have this. But if somethign new is found like a spyware program that I dont know about but it's on someone's computer it gathers the info about it anfd it then sends it to my Update server and is added to the updated sig files. Now I know that part sounds liek spyware but I'm not meaning it to. Just somthign to help better protect people. Let me know what yall think. Thanks thus far
__________________
Forgiveness is the fragrance that the violet sheds on the heal that has crushed it. - Mark Twain Destruction leads to a very rough road, but it also breeds creation. |
|
|
|
|
|
#4 | ||
|
Programming Guru
![]() Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,254
Rep Power: 5
![]() |
Quote:
Quote:
|
||
|
|
|
|
|
#5 |
|
Professional Programmer
|
Thanks for the input grumpy. I will do that as it is a much better idea. But I still neeed help wiht the drive scan. just to look at all the files on the slected drive and scan them using info form the sig files. I think info meant I wanted to actually show the drives on the system but I'm not I just need somethign to scan them for spyware.
__________________
Forgiveness is the fragrance that the violet sheds on the heal that has crushed it. - Mark Twain Destruction leads to a very rough road, but it also breeds creation. |
|
|
|
|
|
#6 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,254
Rep Power: 5
![]() |
You've got the code that gets drives. To recurse a directory tree, look in the win32 API help files (which come with VB, IIRC) for functions FindFirstFile, FindNextFile, and FindClose
|
|
|
|
|
|
#7 | |
|
Professional Programmer
Join Date: Feb 2005
Location: PA, USA
Posts: 253
Rep Power: 4
![]() |
Quote:
after completion of a scan, the program logs all of the files to be removed, it then prompts you to reboot, when the reboot happens, it removes all of the infected files through command prompt. a lot of programs out there will find them but then leave it up to the user to figure out how the hell to get rid of them if they are in use. Safe mode scan usually does the trick but a lot of users aren't that computer savvy.
__________________
I have never let my schooling interfere with my education. -Mark Twain- Xbox live gamertag: melbolt |
|
|
|
|
|
|
#8 |
|
Professional Programmer
|
Thanks grumpy for that info I will look into it. Thanks melbolt, I will add that to my To-Do list.
__________________
Forgiveness is the fragrance that the violet sheds on the heal that has crushed it. - Mark Twain Destruction leads to a very rough road, but it also breeds creation. |
|
|
|
|
|
#9 | |
|
Professional Programmer
|
Quote:
Do correct me if I am mistaken though.
__________________
The world's first athletic computer geek! The home of PrProgramsStudios How not to post a question: <-- Please don't reply |
|
|
|
|
|
|
#10 | |
|
Professional Programmer
Join Date: Feb 2005
Location: PA, USA
Posts: 253
Rep Power: 4
![]() |
Quote:
you're not mistaken in what you explained but you misunderstood what i meant or i failed to explain it correctly. when i said command prompt, i mean before the operating system loads command prompt, not "start > run > cmd" command prompt. kind of like chkdsk does if you do a hard shutdown the next time you boot up.
__________________
I have never let my schooling interfere with my education. -Mark Twain- Xbox live gamertag: melbolt |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|