×
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Morris06
Contributor
Message 1 of 13

How to Programatically Scan a File

Jump to solution

I have a web application (for this situation, Java on Tomcat) for which I infrequently need to permit the client to transfer documents. Despite the fact that I for the most part have dependable clients, in my business we expect anyone and everyone might actually be an crediblebh insider danger (or outright stupid). Hence, I might want to have the transferred document go straightforwardly to a "quarantine" index, automatically shoot an output, and provided that the sweep succeeds, duplicate it to the expected objective organizer for handling.

The main fly in the salve is sorting out (a) how to shoot an output, on request, automatically (we should accept that we're utilizing the McAfee set-up of devices) and (b) how to get notice back when the sweep is finished. Is it conceivable? Assuming this is the case, has anybody done it and can give me pointers?

 

Appreciate for help

1 Solution

Accepted Solutions
GaneshR
Moderator
Moderator
Message 2 of 13

Re: How to Programatically Scan a File

Jump to solution

Hi @Morris06 

Thank you for contacting McAfee. McAfee provides 24/7 protection for Pc's, MAC and mobile devices. Whenever new threat or malware detected in your devices McAfee will automatically remove particular file/folder which are corrupted. Hence your device will be safe from any kind of virus/spywares.. If any file detected as threat, it will automatically moved to quarantine and high risk means McAfee will delete the files/folders accordingly

Also, please go through the article for understanding more types of scan available with McAfee.

Regards

Ganesh Raju R

If this information was helpful in any way or answered your question, please mark it as the accepted solution and give Kudos if appropriate.

View solution in original post

12 Replies
GaneshR
Moderator
Moderator
Message 2 of 13

Re: How to Programatically Scan a File

Jump to solution

Hi @Morris06 

Thank you for contacting McAfee. McAfee provides 24/7 protection for Pc's, MAC and mobile devices. Whenever new threat or malware detected in your devices McAfee will automatically remove particular file/folder which are corrupted. Hence your device will be safe from any kind of virus/spywares.. If any file detected as threat, it will automatically moved to quarantine and high risk means McAfee will delete the files/folders accordingly

Also, please go through the article for understanding more types of scan available with McAfee.

Regards

Ganesh Raju R

If this information was helpful in any way or answered your question, please mark it as the accepted solution and give Kudos if appropriate.

Prateekm1111
Contributor
Message 3 of 13

Re: How to Programatically Scan a File

Jump to solution

This is not a solution for web application. You should suggest some libraries which can be used efficiently in java applications. You are saying scanning is automatic but question was about programatic scanning 

FabianD
Contributor
Message 4 of 13

Re: How to Programatically Scan a File

Jump to solution

To programmatically scan a file for potential threats or malware, you can follow these general steps:

  1. Choose a malware scanning API or library: There are various malware scanning APIs and libraries available that can be integrated into your application. Examples include VirusTotal, ClamAV, or commercial antivirus software APIs. Choose one that suits your programming language and requirements.

  2. Install the necessary dependencies: If you're using a specific library or API, make sure to install any required dependencies or SDKs according to the documentation provided.

  3. Integrate the scanning functionality: Depending on the chosen API or library, follow the integration instructions provided in their documentation. This usually involves importing necessary modules or libraries into your code and configuring authentication or API keys.

  4. Select the file to scan: Specify the file path or provide the file content to the scanning function or method. Ensure that you have the appropriate permissions to access the file.

  5. Initiate the scan: Invoke the scanning function or method with the file as the input. This will trigger the scanning process and send the file for analysis to the scanning service or engine.

  6. Receive and interpret the scan results: Once the scanning process is complete, you will receive the scan results. These results typically indicate whether the file is clean or if any threats were detected. The format and structure of the results may vary depending on the chosen API or library.

  7. Handle the results: Based on the scan results, implement appropriate logic in your program to handle the findings. This could involve quarantining the file, displaying a warning, or taking other necessary actions based on your application's requirements.

It's important to note that the specific implementation details may vary depending on the chosen API or library. Therefore, it's recommended to refer to their documentation or examples for detailed instructions on how to programmatically scan files using their services or libraries. KMFusa

Laura555
Contributor
Message 5 of 13

Re: How to Programatically Scan a File

Jump to solution

To programmatically scan a file using McAfee antivirus, you can utilize the McAfee ePolicy Orchestrator (ePO) platform, which provides an API for interacting with the McAfee security products. Here's a general outline of the steps involved:

  1. Set up McAfee ePO: Install and configure the McAfee ePO server in your environment. This will serve as the central management console for your McAfee security products.

  2. Obtain API credentials: Generate the necessary API credentials (API key or username/password) to authenticate your program with the McAfee ePO server. This step typically involves creating an API user account and assigning appropriate permissions.

  3. Choose a programming language and framework: Select a programming language and framework that you are comfortable with and that has support for making HTTP requests. Common options include Python, Java, or .NET.

  4. Authenticate with McAfee ePO: Implement the authentication process in your program to authenticate with the McAfee ePO server using the API credentials obtained in Step 2. This may involve sending an authentication request to the server and receiving an access token or session ID in response.

  5. Upload the file: Use the appropriate API endpoint to upload the file you want to scan. This can typically be achieved by sending a POST request to the appropriate endpoint, providing the file data as part of the request payload.

  6. Initiate a scan: Once the file is uploaded, initiate a scan on the file by sending a request to the appropriate API endpoint. This will trigger the McAfee antivirus engine to scan the uploaded file for any potential threats.

  7. Check scan results: Periodically check the scan results by querying the API for the status of the scan. This can be done by sending a request to the appropriate API endpoint and retrieving the scan results from the response.

  8. Take appropriate action based on results: Based on the scan results, you can programmatically handle any identified threats or take further actions as needed. This could include quarantining or deleting the file, notifying relevant parties, or implementing custom logic specific to your application.

It's important to note that the specific details and endpoints for interacting with the McAfee ePO API may vary depending on the version of McAfee security products you are using. It is recommended to refer to the McAfee ePO API documentation or contact McAfee support for more detailed instructions and guidance specific to your environment and version

ada8239523
Contributor
Message 6 of 13

Re: How to Programatically Scan a File

Jump to solution

Not much help to you at the moment but I can attest that Articulate are working on this. KanTime Medicare

tedclass
Contributor
Message 7 of 13

Re: How to Programatically Scan a File

Jump to solution

To programatically scan a file using McAfee, you can use the McAfee VirusScan Enterprise (VSE) command-line scanner, which is included with McAfee VirusScan Enterprise. Here are the steps to programatically scan a file using McAfee:

  1. Open a command prompt: Open a command prompt on the computer where McAfee VirusScan Enterprise is installed.

  2. Navigate to the VirusScan installation directory: Navigate to the installation directory for McAfee VirusScan Enterprise. The default installation directory is "C:\Program Files (x86)\McAfee\VirusScan Enterprise".

  3. Run the command-line scanner: Run the command-line scanner by entering the following command:

scan32.exe /ANALYZE /ADL /PROGRAM /ALL /ARCHIVE /MIME /ANALYSIS /UNZIP /SUSP /REPORT <filename>

Replace <filename> with the path and name of the file that you want to scan.

  1. Check the scan results: After the scan is complete, you can check the scan results by opening the report file that was generated by the scanner. The report file is saved in the same directory as the file that was scanned, and has a .log extension.

By following these steps, you can programatically scan a file using McAfee VirusScan Enterprise. You can also customize the scan options by modifying the command-line arguments. For more information on the available scan options, you can refer to the McAfee VirusScan Enterprise documentation. MyeClass

Ownebell
Contributor
Message 8 of 13

Re: How to Programatically Scan a File

Jump to solution
Thank You i thought i was not get answer. <a href="https://kmfusa.website/">KMF usa</a>
Basit11
Contributor II
Message 9 of 13

Re: How to Programatically Scan a File

Jump to solution

@Morris06MyCentura Patient Portal

To programmatically check a file for potential threats or malware, you can adhere to these general steps:

  1. Choose a malware scanning API or library: There's a variety of malware scanning APIs and libraries to pick from, like VirusTotal, ClamAV, or commercial antivirus software APIs. Select one that aligns with your programming language and needs.

  2. Install necessary dependencies: If utilizing a specific library or API, ensure to install any required dependencies or SDKs as per the provided documentation.

  3. Integrate the scanning functionality: Follow the integration instructions outlined in the documentation of the chosen API or library. This typically involves importing necessary modules or libraries into your code and configuring authentication or API keys.

  4. Specify the file to scan: Define the file path or provide the file content to the scanning function or method, ensuring appropriate permissions to access the file.

  5. Initiate the scan: Trigger the scanning process by invoking the scanning function or method with the file as input. This action sends the file for analysis to the scanning service or engine.

  6. Receive and interpret the scan results: Upon completion of the scanning process, receive the scan results. These outcomes typically indicate whether the file is clean or if any threats were detected. The structure and format of the results may differ based on the chosen API or library.

  7. Handle the results: Based on the scan results, incorporate appropriate logic in your program to manage the findings. This might involve quarantining the file, displaying a warning, or executing other necessary actions as per your application's requirements.

It's essential to acknowledge that the specific implementation details may vary depending on the chosen API or library. Therefore, it's advisable to consult their documentation or examples for comprehensive instructions on programmatically scanning files using their services or libraries. 

Jamesmathew
Contributor
Message 10 of 13

Re: How to Programatically Scan a File

Jump to solution

@Morris06accidental death lawyers
To programmatically scan a file for potential threats or malware, follow these general steps:

  1. Choose a malware scanning API or library: There are various options available, such as VirusTotal, ClamAV, or commercial antivirus software APIs. Select one that suits your programming language and requirements.

  2. Install necessary dependencies: If using a specific library or API, make sure to install any required dependencies or SDKs according to the provided documentation.

  3. Integrate the scanning functionality: Follow the integration instructions provided in the documentation of your chosen API or library. This typically involves importing necessary modules or libraries into your code and configuring authentication or API keys.

  4. Specify the file to scan: Provide the file path or content to the scanning function or method, ensuring appropriate permissions to access the file.

  5. Initiate the scan: Invoke the scanning function or method with the file as input to start the scanning process. This will send the file for analysis to the scanning service or engine.

  6. Receive and interpret the scan results: Once the scanning process is complete, receive the results indicating whether the file is clean or if any threats were detected. The format of the results may vary depending on the chosen API or library.

  7. Handle the results: Based on the scan results, implement appropriate logic in your program to manage the findings. This could involve quarantining the file, displaying a warning, or taking other necessary actions as per your application's requirements.

It's important to note that the specific implementation details may differ depending on the chosen API or library. Therefore, it's recommended to refer to their documentation or examples for detailed instructions on programmatically scanning files using their services or libraries.

How Many Badges Can You Collect?
Ready for a little competition? Members like you are earning badges and unlocking perks for their helpful answers. Are you? Click here to find out.

Community Help Hub

    New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

  • Find Forum FAQs
  • Learn How to Earn Badges
  • Ask for Help
Go to Community Help

Join the Community

    Thousands of customers use the McAfee Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

  • Get helpful solutions from McAfee experts.
  • Stay connected to product conversations that matter to you.
  • Participate in product groups led by McAfee employees.
Join the Community
Join the Community