Delphi를 사용하여 프로그래밍 방식으로 바이러스 백신 프로그램을 실행하십시오

StackOverflow https://stackoverflow.com/questions/3292216

문제

INDY 구성 요소를 사용하여 파일을 전송하는 작은 앱을 썼습니다. 이제는 전송이 완료되면 파일을 확인할 때 바이러스 백신 프로그램을 시작하고 싶습니다.

클라이언트 측에 설치된 바이러스 백신 프로그램을 클라이언트 측에 실행할 수 있습니까?

업데이트 파일을 다운로드 한 다음 컴퓨터에 설치된 바이러스 백신을 실행할 때 Firefox와 유사한 것을 구현해야합니다.

미리 감사드립니다.

도움이 되었습니까?

해결책

내 다른 질문에 대한 좋은 사람의 답변을보십시오.

는 두 개의 COM 인터페이스가있는 것처럼 보입니다. 하나는 여기에 문서화되어야합니다.

iAttachmenTexecute

이 인터페이스는 Windows 셸 인터페이스의 일부입니다.

여기에 소스의 해설

/**
 * Code overview
 *
 * Download scanner attempts to make use of one of two different virus
 * scanning interfaces available on Windows - IOfficeAntiVirus (Windows
 * 95/NT 4 and IE 5) and IAttachmentExecute (XPSP2 and up).  The latter
 * interface supports calling IOfficeAntiVirus internally, while also
 * adding support for XPSP2+ ADS forks which define security related
 * prompting on downloaded content.  
 *
 * Both interfaces are synchronous and can take a while, so it is not a
 * good idea to call either from the main thread. Some antivirus scanners can
 * take a long time to scan or the call might block while the scanner shows
 * its UI so if the user were to download many files that finished around the
 * same time, they would have to wait a while if the scanning were done on
 * exactly one other thread. Since the overhead of creating a thread is
 * relatively small compared to the time it takes to download a file and scan
 * it, a new thread is spawned for each download that is to be scanned. Since
 * most of the mozilla codebase is not threadsafe, all the information needed
 * for the scanner is gathered in the main thread in nsDownloadScanner::Scan::Start.
 * The only function of nsDownloadScanner::Scan which is invoked on another
 * thread is DoScan.
.

여기에 몇 가지 구현 정보를 찾았습니다.이 기능을 AES라고합니다.

다른 팁

WinRAR와 같은 다른 프로그램이 어떻게 작동하는지 확인하십시오.대부분 명령 줄 매개 변수로 스캔하려는 파일이나 폴더로 안티 바이러스 프로그램을 시작할 가능성이 큽니다.안티 바이러스 프로그램의 설명서를 확인하여 수행 방법을 확인할 수 있습니다.

ShellExecute 또는 CreateProcess를 사용할 수 있습니다. 나는 shellexecute를 사용하지만 createProcess가 더 좋다고 들었습니다 ShellApi를 사용하여 AntiVVV를 사용하는 바이러스 백신을 실행하려면 다음과 같이하십시오.

uses ShellApi;
 ...
 ShellExecute(Handle, 'open', 'c:\program files\antivvv.exe', nil, nil, SW_SHOWNORMAL) ; 
.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top