Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 7th, 2006, 7:08 AM   #1
bigguy
Professional Programmer
 
bigguy's Avatar
 
Join Date: Sep 2005
Location: Arkansas
Posts: 298
Rep Power: 0 bigguy is an unknown quantity at this point
Send a message via AIM to bigguy Send a message via MSN to bigguy Send a message via Yahoo to bigguy
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.
bigguy is offline   Reply With Quote
Old Jul 7th, 2006, 9:49 AM   #2
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
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)
        Next

or 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 Sub


Quote:
Also, what some things that would make present spyware programs better?
The ability to remove the spyware found and its associated files.
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Jul 7th, 2006, 8:46 PM   #3
bigguy
Professional Programmer
 
bigguy's Avatar
 
Join Date: Sep 2005
Location: Arkansas
Posts: 298
Rep Power: 0 bigguy is an unknown quantity at this point
Send a message via AIM to bigguy Send a message via MSN to bigguy Send a message via Yahoo to bigguy
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 Sub

But 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.
bigguy is offline   Reply With Quote
Old Jul 7th, 2006, 9:08 PM   #4
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,254
Rep Power: 5 grumpy will become famous soon enough
Quote:
Originally Posted by bigguy
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.
Given that there is a very large number of ways that spyware might work (different means of spying, different data gathered, different means of reporting what is spies, different means of installation), I suggest it would be rather challenging to design a general means of detecting such things.
Quote:
Originally Posted by bigguy
Now I know that part sounds liek spyware but I'm not meaning it to. Just somthign to help better protect people.
One way to handle that is to have the reporting process under user control. In particular, only send information back to your service if you have permission from the user to do so. Preferably, disable the reporting mechanism unless the user has enabled it (reporting data back to you before receiving user permission seems a bit at odds with the intent of an anti-spyware package). And allow the user to check data sent back before hand, preferably in a form that the user can easily understand.
grumpy is offline   Reply With Quote
Old Jul 8th, 2006, 1:44 AM   #5
bigguy
Professional Programmer
 
bigguy's Avatar
 
Join Date: Sep 2005
Location: Arkansas
Posts: 298
Rep Power: 0 bigguy is an unknown quantity at this point
Send a message via AIM to bigguy Send a message via MSN to bigguy Send a message via Yahoo to bigguy
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.
bigguy is offline   Reply With Quote
Old Jul 8th, 2006, 3:31 AM   #6
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,254
Rep Power: 5 grumpy will become famous soon enough
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
grumpy is offline   Reply With Quote
Old Jul 8th, 2006, 5:02 AM   #7
melbolt
Professional Programmer
 
melbolt's Avatar
 
Join Date: Feb 2005
Location: PA, USA
Posts: 253
Rep Power: 4 melbolt is on a distinguished road
Quote:
Originally Posted by bigguy
Also, what some things that would make present spyware programs better?

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
melbolt is offline   Reply With Quote
Old Jul 8th, 2006, 1:06 PM   #8
bigguy
Professional Programmer
 
bigguy's Avatar
 
Join Date: Sep 2005
Location: Arkansas
Posts: 298
Rep Power: 0 bigguy is an unknown quantity at this point
Send a message via AIM to bigguy Send a message via MSN to bigguy Send a message via Yahoo to bigguy
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.
bigguy is offline   Reply With Quote
Old Jul 8th, 2006, 2:06 PM   #9
Prm753
Professional Programmer
 
Prm753's Avatar
 
Join Date: Oct 2005
Location: United States
Posts: 447
Rep Power: 4 Prm753 is on a distinguished road
Send a message via AIM to Prm753 Send a message via MSN to Prm753
Quote:
Originally Posted by melbolt
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.
I'm not totally sure that would do anything. If the spyware .exe's are starting up on boot, (and continuing to run) I think even the command prompt will not be able to get rid of them unless it is running in Safe Mode. As far as I know, Windows won't just let you yank out a file from under a running process, as that could make the process or Windows crash.

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
Prm753 is offline   Reply With Quote
Old Jul 9th, 2006, 4:37 AM   #10
melbolt
Professional Programmer
 
melbolt's Avatar
 
Join Date: Feb 2005
Location: PA, USA
Posts: 253
Rep Power: 4 melbolt is on a distinguished road
Quote:
Originally Posted by Prm753
I'm not totally sure that would do anything. If the spyware .exe's are starting up on boot, (and continuing to run) I think even the command prompt will not be able to get rid of them unless it is running in Safe Mode. As far as I know, Windows won't just let you yank out a file from under a running process, as that could make the process or Windows crash.

Do correct me if I am mistaken though.

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
melbolt is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:59 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC