15,917,455 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by CodingIsDreamy (Top 41 by date)
CodingIsDreamy
2-Nov-17 16:22pm
View
thanks man
CodingIsDreamy
2-Nov-17 16:15pm
View
wait where? that other dude had an awnser that helped alot just saying to anyone else that reads to skip straight to yours and his is awnser
CodingIsDreamy
2-Nov-17 16:14pm
View
ok cool
CodingIsDreamy
2-Nov-17 15:55pm
View
yeah dude the c:\
CodingIsDreamy
2-Nov-17 15:14pm
View
Do you work in many programming languages? or just .net? just wondering cause i've met some people on here that somehow like load of programming languages, but your the only one that has been proper caring about code, like just seem to love code :-)
CodingIsDreamy
2-Nov-17 15:10pm
View
thanks man:-)
CodingIsDreamy
2-Nov-17 15:09pm
View
in your opinion is a 30% cpu useage alot?
CodingIsDreamy
2-Nov-17 15:08pm
View
:-)
CodingIsDreamy
2-Nov-17 15:08pm
View
lol saved dude
CodingIsDreamy
2-Nov-17 14:59pm
View
Also dude can i grab your email just incase in the future i need help with a tiny error i should'nt but i might? It's just somthimes when i ask other people dude they just say i cant code and stuff but it's just im more used to other programing languages
CodingIsDreamy
2-Nov-17 14:57pm
View
its now 30% cpu useage so it's helped! :-)
CodingIsDreamy
2-Nov-17 14:54pm
View
ok dude cheers sorry for late reply was making a coffe :-)
CodingIsDreamy
2-Nov-17 14:41pm
View
no prob dude im just glad your helping :-)
CodingIsDreamy
2-Nov-17 14:38pm
View
well dude it took it down a little bit but not much of an effect from what i saw :-)
CodingIsDreamy
2-Nov-17 14:35pm
View
ok two secounds :-)
CodingIsDreamy
2-Nov-17 14:34pm
View
ok ill try now :-)
CodingIsDreamy
2-Nov-17 14:31pm
View
or an example or somthing
CodingIsDreamy
2-Nov-17 14:29pm
View
oh could you fix it for me and next to the fix explain what i did wrong?
CodingIsDreamy
2-Nov-17 14:28pm
View
where should i add it? Example?
CodingIsDreamy
2-Nov-17 14:27pm
View
is that what you mean? cause dude if not im confused :-)
CodingIsDreamy
2-Nov-17 14:27pm
View
Private Sub FileSystemWatcher1_Renamed(ByVal sender As System.Object, ByVal e As System.IO.RenamedEventArgs) Handles FileSystemWatcher1.Renamed
Dim OpenFileDialog3 As String
Try
Detect.Labellastreal.Text = e.FullPath
ListBox3.Items.Add(Detect.Labellastreal.Text)
OpenFileDialog3 = ""
Dim md5 As New MD5CryptoServiceProvider
Dim f As New FileStream(e.FullPath, FileMode.Open, FileAccess.Read, FileShare.Read, &H2000)
md5.ComputeHash(f)
Dim hash As Byte() = md5.Hash
Dim buff As New StringBuilder
Dim hashByte As Byte
For Each hashByte In hash
buff.Append(String.Format("{0:X2}", hashByte))
Next
f.Close()
If My.Computer.FileSystem.ReadAllText(Application.StartupPath & "\Database\UnwantedProgs.txt").Contains(buff.ToString) Then
OpenFileDialog3 = e.FullPath
File.Move(Detect.Labellastreal.Text, Path.Combine("C:\ProgramData\DreamyTS\Infected\", Path.GetFileName(Detect.Labellastreal.Text)))
Detect.ShowDialog()
WriteToLog("Unwanted Program detected")
End If
Catch exception1 As Exception
ProjectData.SetProjectError(exception1)
Dim ex As Exception = exception1
ProjectData.ClearProjectError()
End Try
End Sub
CodingIsDreamy
2-Nov-17 14:21pm
View
my code is above
CodingIsDreamy
2-Nov-17 14:20pm
View
i dont understand what you mean?
CodingIsDreamy
2-Nov-17 13:53pm
View
thanks dude
CodingIsDreamy
2-Nov-17 11:57am
View
do you by any chance know how to read all text from multiple files My.Computer.FileSystem.ReadAllText(textfile.txt) by for more then one. Sorry for asking i've just seen you have awnserd a few things that have helped me any just wondering if you new
CodingIsDreamy
2-Nov-17 11:56am
View
thanks dude
CodingIsDreamy
2-Nov-17 11:55am
View
thanks dude
CodingIsDreamy
30-Oct-17 9:32am
View
Deleted
heres the part i need help with its not the full code but its the scenario: its in a filesystem watcher
Dim OpenFileDialog3 As String
Try
Detect.Labellastreal.Text = e.FullPath
ListBox3.Items.Add(Detect.Labellastreal.Text)
OpenFileDialog3 = ""
Dim scanbox As String
scanbox = My.Computer.FileSystem.ReadAllText(Application.StartupPath & "\Database\TextFile1.dat").ToString
Dim md5 As New MD5CryptoServiceProvider
Dim f As New FileStream(e.FullPath, FileMode.Open, FileAccess.Read, FileShare.Read, &H2000)
md5.ComputeHash(f)
Dim hash As Byte() = md5.Hash
Dim buff As New StringBuilder
Dim hashByte As Byte
For Each hashByte In hash
buff.Append(String.Format("{0:X2}", hashByte))
Next
f.Close()
If scanbox.Contains(buff.ToString) Then
OpenFileDialog3 = e.FullPath
Detect.ShowDialog()
WriteToLog("Virus detected")
End If
Catch exception1 As Exception
ProjectData.SetProjectError(exception1)
Dim ex As Exception = exception1
ProjectData.ClearProjectError()
End Try
CodingIsDreamy
30-Oct-17 8:31am
View
Deleted
heres the part i need help with its not the full code but its the scenario: its in a filesystem watcher
Dim OpenFileDialog3 As String
Try
Detect.Labellastreal.Text = e.FullPath
ListBox3.Items.Add(Detect.Labellastreal.Text)
OpenFileDialog3 = ""
Dim scanbox As String
scanbox = My.Computer.FileSystem.ReadAllText(Application.StartupPath & "\Database\TextFile1.dat").ToString
Dim md5 As New MD5CryptoServiceProvider
Dim f As New FileStream(e.FullPath, FileMode.Open, FileAccess.Read, FileShare.Read, &H2000)
md5.ComputeHash(f)
Dim hash As Byte() = md5.Hash
Dim buff As New StringBuilder
Dim hashByte As Byte
For Each hashByte In hash
buff.Append(String.Format("{0:X2}", hashByte))
Next
f.Close()
If scanbox.Contains(buff.ToString) Then
OpenFileDialog3 = e.FullPath
Detect.ShowDialog()
WriteToLog("Virus detected")
End If
Catch exception1 As Exception
ProjectData.SetProjectError(exception1)
Dim ex As Exception = exception1
ProjectData.ClearProjectError()
End Try
CodingIsDreamy
30-Oct-17 8:30am
View
Deleted
oh ok ill paste below
CodingIsDreamy
30-Oct-17 8:13am
View
Deleted
do you need all the code to awnser? or is it easy to do wityhout it?
CodingIsDreamy
30-Oct-17 8:07am
View
Deleted
how would i get it to pre process the file?
CodingIsDreamy
29-Oct-17 12:44pm
View
look ive tried that but it's not working like that i get no error just doesnt work
/ detect the file
CodingIsDreamy
29-Oct-17 12:29pm
View
ok i understand. Do you know how i can turn my code to make it able to scan a list of sha1 hashes instead of md5 (without the names)
CodingIsDreamy
29-Oct-17 12:02pm
View
hey Original Giff i understand what you mean. What about SHA1 how can i change the code i have abouve to work with a list of sha1 hashes. Or how can i use the code abouve to use a list of virus signitures (sha1) what can i do? how do i make my code useful lol :-)
CodingIsDreamy
29-Oct-17 9:59am
View
ill try it now :-)
CodingIsDreamy
29-Oct-17 9:27am
View
heres a picture : https://ibb.co/ep4q5m
CodingIsDreamy
28-Oct-17 15:56pm
View
it's the same hash dude its literally just the hash in a text file
CodingIsDreamy
28-Oct-17 15:01pm
View
well when i test the program it doesnt show up asif its detected a file with the same hash
CodingIsDreamy
28-Oct-17 13:48pm
View
could you explain more. Or show an example.
CodingIsDreamy
28-Oct-17 12:47pm
View
heres all of the code i need help with https://pastebin.com/g8f1rNjy
Show More