![]() |
|
Get Antivirusname & Firewallname - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: Visual Basic & .NET Framework (https://sinister.ly/Forum-Visual-Basic-NET-Framework) +--- Thread: Get Antivirusname & Firewallname (/Thread-Get-Antivirusname-Firewallname) |
Get Antivirusname & Firewallname - Madara-Uchiha - 08-14-2013 Get AV and Firewall
Just a little snippet I wanted to share. You can read out Firewall and Antivirus using WMI.
(Credits to: Mr. Smith from HF)
Don't forget to import System.Management and also set a reference to this.
![]() PHP Code: Function GetAntiVirus() As String
Dim str As String = Nothing
Dim searcher As New ManagementObjectSearcher("\\" & Environment.MachineName & "\root\SecurityCenter2", "SELECT * FROM AntivirusProduct")
Dim instances As ManagementObjectCollection = searcher.[Get]()
For Each queryObj As ManagementObject In instances
str = queryObj("displayName").ToString()
Next
Return str
End Function
PHP Code: Function GetFirewall() As String
Dim str As String = Nothing
Dim searcher As New ManagementObjectSearcher("\\" & Environment.MachineName & "\root\SecurityCenter2", "SELECT * FROM FirewallProduct")
Dim instances As ManagementObjectCollection = searcher.[Get]()
For Each queryObj As ManagementObject In instances
str = queryObj("displayName").ToString()
Next
Return str
End Function
If you liked it, please leave a thanks
![]() By Madara-Uchiha RE: Get Antivirusname & Firewallname - ViolentReality - 08-14-2013 Very nice man, thanks for the share! RE: Get Antivirusname & Firewallname - Madara-Uchiha - 08-14-2013 No problem, its nice to use in RATs or Keyloggers or Botnets. Also good just for reading out the System Information
RE: Get Antivirusname & Firewallname - Shebang - 08-14-2013 Tip, you can use the following tags for vb.net code: Code: [code=vbnet][*/code] without the asterisk.RE: Get Antivirusname & Firewallname - Bonfire - 08-15-2013 It's giving me the following error Spoiler:![]() RE: Get Antivirusname & Firewallname - ViolentReality - 08-15-2013 (08-15-2013, 04:54 AM)Bonfire Wrote: It's giving me the following error Be sure to import the correct Imports. I believe here you need to add this to the top of your code. Code: Imports System.ManagementRE: Get Antivirusname & Firewallname - Bonfire - 08-15-2013 (08-15-2013, 05:04 AM)ViolentReality Wrote:(08-15-2013, 04:54 AM)Bonfire Wrote: It's giving me the following error Referring back to the image, the correct imports are imported. I don't really see whats wrong with the code, but it's throwing an error. RE: Get Antivirusname & Firewallname - ViolentReality - 08-15-2013 Spoiler: Add Reference:![]() I hope this helps. RE: Get Antivirusname & Firewallname - -Correct - 08-15-2013 Very nice, thanks for this! |