[Snippet] Get Anti-Virus & Firewall - 0xE9 - Jun 8, 2010
Get Anti-Virus & Firewall
This is from Coolvibes, i did not code this.
Code unit unitAvs;
interface
uses
Windows,
sysutils,
TLHelp32;
const
Procesos: array[0..15] of String = ('avguard.exe',
'ashdisp.exe',
'avgcc.exe',
'bdss.exe',
'spider.exe',
'avp.exe',
'nod32krn.exe',
'cclaw.exe',
'dvpapi.exe',
'ewidoctrl.exe',
'mcshield.exe',
'pavfires.exe',
'almon.exe',
'ccapp.exe',
'pccntmon.exe',
'fssm32.exe');
NombreDeAntivirus: array[0..15] of String =('AntiVir',
'Avast Antivirus',
'AVG Antivirus',
'BitDefender',
'Dr.Web',
'Kaspersky Antivirus',
'Nod32',
'Norman',
'Authentium Antivirus',
'Ewido Security Suite',
'McAfee VirusScan',
'Panda Antivirus/Firewall',
'Sophos',
'Symantec/Norton',
'PC-cillin Antivirus',
'F-Secure');
Firewalls: array[0..14] of String = ('issvc.exe',
'vsmon.exe',
'cpf.exe',
'ca.exe',
'tnbutil.exe',
'avp.exe',
'mpfservice.exe',
'npfmsg.exe',
'outpost.exe',
'tpsrv.exe',
'pavfires.exe',
'kpf4ss.exe',
'persfw.exe',
'vsserv.exe',
'smc.exe');
NombreDeFirewall: array[0..14] Of string =('Norton Personal Firewall',
'ZoneAlarm',
'Comodo Firewall',
'eTrust EZ Firewall',
'F-Secure Internet Security',
'Kaspersky Antihacker',
'McAfee Personal Firewall',
'Norman Personal Firewall',
'Outpost Personal Firewall',
'Panda Internet Seciruty Suite',
'Panda Anti-Virus/Firewall',
'Kerio Personal Firewall',
'Tiny Personal Firewall',
'BitDefender / Bull Guard Antivirus',
'Sygate Personal Firewall');
function ObtenerAvs(): String;
function ObtenerFirewall(): String;
implementation
Function Scan(tipo: integer): String;
var
cLoop :Boolean;
CapProcesos:THandle;
L :TProcessEntry32;
i :integer;
Begin
Result := 'NO';
CapProcesos := CreateToolHelp32SnapShot(TH32CS_SNAPPROCESS or TH32CS_SNAPMODULE, 0);
L.dwSize := SizeOf(L);
cLoop := Process32First(CapProcesos, L);
while cLoop do
begin
if tipo = 1 then
for i := 0 to 15 do
if LowerCase(L.szExeFile) = Procesos[i] then
begin
If Result = 'No' then //Osea que no ha copiado nada a result
Result := NombreDeAntivirus[i]
else //si es diferente de 'No encontrado' es porque ya copi? un av antes
Result := Result + ' \ ' + NombreDeAntivirus[i] //copie un separador y el otro antivirus
end;
if tipo = 2 then
for i := 0 to 14 do
if LowerCase(L.szExeFile) = Firewalls[i] then
begin
if Result = 'No encontrado' then
Result := NombreDeFirewall[i]
else
Result := Result + ' \ ' + NombreDeFirewall[i];
end;
cLoop := Process32Next(CapProcesos, L);
end;
CloseHandle(CapProcesos);
end;
function ObtenerAvs(): String;
begin
Result := Scan(1);
end;
function ObtenerFirewall(): String;
begin
Result := Scan(2);
end;
end.
Example Project By DeadLine:
http://www.mediafire.com/?2fnhyyvixek
* - n0pcode - Jun 9, 2010
Damn, thats loads of work o_O
Thx Deadline!
* - Beanie - Jun 9, 2010
Holy cow, that's awesome dude. Nice ;)
* - 0xE9 - Jun 9, 2010
np m8, just give credits when or if you use this.
* - DrSponge - Jun 10, 2010
Nice and smart idea i thought of doing this a while ago i just couldnt be bothered thanks for savin my time hehe
* - mgcsupport747 - Jul 18, 2010
its detected =(
damn
Too short!!
* - 0xE9 - Jul 18, 2010
lol no its not? it just checks the current processes and it identifies the procces and shows it to u
* - ubbelol - Jul 19, 2010
Lol, much effort for nothing :p If i remember right i'm pretty sure there's a way to get the AV and Firewall through the registry or something, wich doesn't require a shitloads of strings to look for. ^^
* - Hi Im Brent - Jul 21, 2010
Thanks for this.
It helps alot.
* - SIM-121380 - Jul 24, 2010
This can be really useful ! Thanks for this ! (:
* - newuser0 - Apr 29, 2013
This is the most lamest way, watch these (the code will be hard for beginners)..:
http://www.delphibasics.info/home/delphibasicssnippets/retreiveantivirusinformationusingwmi
http://theroadtodelphi.wordpress.com/2011/02/18/getting-the-installed-antivirus-antispyware-and-firewall-software-using-delphi-and-the-wmi/
|