Virus scan a file before upload.

Hi friends,
I wanted to virus scan a file before being uploaded to the server. I have basically no idea how this could be done in java.Could anyone help me out in this.

Well, you'd have to virus scan after upload, since you couldn't to it on the client. And then you'd have to either find virus scan software with a Java API or use JNI to access a C++ API, or if it supports a command-line mode, use Runtime.exec() to execute that and parse that command's output.

Similar Messages

  • Virus Scan a document before uploading to Portal

    Hi,
    While uploading a document to PORTAL using "add_item" that document has to be scanned thro an antivirus software, if anybody knows the possibilty of doing this in Oracle Portal please let me know the details.
    Thanks
    Regards

    Well, you'd have to virus scan after upload, since you couldn't to it on the client. And then you'd have to either find virus scan software with a Java API or use JNI to access a C++ API, or if it supports a command-line mode, use Runtime.exec() to execute that and parse that command's output.

  • Virus scanning of files before storing into SAP

    <b>Hi,
    I'm about to implement BAdi VSCAN_INSTANCE to integrate virus scanner into the virus scan interface. I would apprecaite If anyone can provide me information on how to configure scanner groups, virus scan servers, virus scan profiles and implement virus scanning BAdi.
    Thanks in advance.</b>

    The Online documentation might help you:
    http://help.sap.com/saphelp_erp2004/helpdata/en/20/51773f12f14a18e10000000a114084/frameset.htm
    Also check OSS note 807989 & 797108.
    Peter

  • Virus scan during file check-in or upload

    Is there any option available for doing virus scan on file being check-in in UCM? Is there any UCM service/ webservice available to do virus scan?
    If we've implement custom logic for same, what's the best practice or approach to be followed from UCM standpoint.

    Hi,
    That can be done, for sure, but you will need an antivirus service(third party) that scans the actual file. Once you have that, you can communicate with it via some protocol and make the scanning requests. The service itself will be installed on some machine with all there is to it(according to the specs of the manufacturer) and then you can write a Java client/server (let's say) that adheres to the protocol the service imposes to make the communication possible. The service will do the scanning and your client/server will initiate the request, read the response, communicate with the WCC so on and so forth...
    Considering that during the check-in the path of the file being checked-in is available and according to the service's API one can develop a flow that will scan the files before being actually checked-in. We have used SAVAPI - Secure AntiVirus Application Programming Interface (SAVAPI) from Avira that provides an interface to detect malware and repair infected files.
    Regards,
    Vlad

  • Virus Scan on File Attachments

    Hi,
    I have added the file upload/download capability to a OAF page using AttachmentTable component. Everything works fine, I am able to upload/download files. But, I have to scan the documents for any viruses before uploading them. Could you please give some pointers on how can I do it?
    Thank you.

    Virus scanning is happening for iRecruitement Module if Semanatic antivirus server is installed(This required to buy sementic licence.)
    iRec code use this oracle.apps.per.irc.common.VirusCheck file for scanning document (Uploaded by OAF pages).
    After enabling this setup and using VirusCheck class you can enable Virus Scanning for your custom code.
    We have also tried other options like finding any JAVA or PLSQL API and or any free tool but did n't get success in this way.

  • When downloading a file, how do I tell Firefox to not do a virus scan of files with specific extensions such a .gif files?

    I'm using AVG Free as my anti-virus program and always use the latest version. I have set scanning options in AVG to skip the scanning of gif and jpg files but that seems to be ignored when I am downloading a very small file of either type. The "Downloads" (Ctrl J) pop-up window shows the progress of the download and scan. At times, the virus scan is so miserably slow for simple gif and jpg files that it is a while until I can once more move my mouse cursor.
    By the way, I'm using version 3.6.17 Firefox and WIN 7 Premium.

    Unfortunately, I continue to have the problem. Just to make sure, following your suggestion, I shut down Firefox then restarted it but had the same result. Similarly, I rebooted after making the changes but again, no difference. Ah well...
    Just thought I'd attach this partial screen print to show that I am in Firefox and that I am downloading a file -- in this case, a daily Doonesbury gif file.
    Thanks for the suggestion though.
    Larry Stewart

  • How to delete one existing file before uploading a file with same name?

    Hello everybody.
    I am uploading a file to Tomcat server. But, the problem is:
    i want to delete an existing file in the server, if i upload a fresh file with same name. In other words, "First check for the file with the same name in the server. If it exists, then delete existing file in the server and upload fresh one". If such file doesnot exist, then upload the file to server.
    I have given deleteonExit()
    but, for the first time when user is uploading, i want to check for the file with same name in the server.
    i am pasting the code here. please help:
    <!-- uploading the file -->
    <%
    String contentType = request.getContentType();
    if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0))
    DataInputStream in = new DataInputStream(request.getInputStream());
    int formDataLength = request.getContentLength();
    byte dataBytes[] = new byte[formDataLength];
    int byteRead = 0;
    int totalBytesRead = 0;
    while (totalBytesRead < formDataLength)
    byteRead = in.read(dataBytes, totalBytesRead, formDataLength);
    totalBytesRead += byteRead;
    String contextRootPath = this.getServletContext().getRealPath("/");
    contextRootPath=contextRootPath.concat("uploaded");
    String file = new String(dataBytes);
    String saveFile = file.substring(file.indexOf("filename=\"") + 10);
    saveFile = saveFile.substring(0, saveFile.indexOf("\n"));
    saveFile = saveFile.substring(saveFile.lastIndexOf("\\") + 1,saveFile.indexOf("\""));
    // Create a directory; all ancestor directories must exist
    File outputFile = new File(contextRootPath, saveFile);
    var=outputFile.getPath();
    outputFile.createNewFile();
    int lastIndex = contentType.lastIndexOf("=");
    String boundary = contentType.substring(lastIndex + 1,contentType.length());
    int pos;
    pos = file.indexOf("filename=\"");
    pos = file.indexOf("\n", pos) + 1;
    pos = file.indexOf("\n", pos) + 1;
    pos = file.indexOf("\n", pos) + 1;
    int boundaryLocation = file.indexOf(boundary, pos) - 4;
    int startPos = ((file.substring(0, pos)).getBytes()).length;
    int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length;
    FileOutputStream fileOut = new FileOutputStream(outputFile);
    fileOut.write(dataBytes, startPos, (endPos - startPos));
    fileOut.flush();
    fileOut.close();
    outputFile.deleteOnExit();
    %>Please help. Thanks for taking time.
    Regards,
    Ashvini

    Thank you MartinHilpert,
    I have one more doubt,
    I am uploading the file to one folder called "uploaded". Before uploading a fresh file, i want to delete all existing files in that folder. IS that possible ?? If yes, can you please tell me how to do that ??
    Regards, Thanks for your time.
    Ashlvini

  • Virus scanning of files

    Hi All,
    Anyone worked with scanning of files in XI configuration? If yes give me some inputs for this scenario
    Thanks
    Sai

    Yes Sai,
    Its true we can scan files in SAP using API's.
    You can use the virus scan interface to include external virus scanners in the SAP system to increase the security of your system. This means that you can use a high-performance integration solution to scan files or documents that are processed by applications for viruses. This applies both for applications delivered by SAP and for customer developments, for example, during data transfers across networks or when documents are exchanged using interfaces.
    http://help.sap.com/saphelp_nw70/helpdata/en/e3/aa783f181b0866e10000000a114084/frameset.htm
    Check this link probabbly you can have some more info..!
    VAMSHI

  • Virus Scan a file in java

    Is there any API in java that scan a file for virus without using any external resources?

    Sreejith-JavaDeveloper wrote:
    Is it possible with the help of any external scan engine?You can call out to any external program you wish, but doing this kind of makes using Java pointless in the first place doesn't it?
    1) Could you write a virus scanner in Java? Yes.
    2) Would it be very good? No
    3) Can you invoke some other virus scanner from Java? Yes
    4) Can you programmatically interact with some other virus scanner from Java? It depends on whether that virus scanner implements an appropriate interface for you. Not likely.

  • How to zip a file before uploading?

    I know we don't have much control when uploading files, but can we zip files when uploading them from a Flex application?
    Any code examples or links to such?
    Thanks,
    Greg

    hi,
    The mars project includes flex code to enable the creation of adobe openPDF containers, these containers are zip files, you can stream any flex object into a 'container'  which is actually a zip file, for instance I can take an xmldocument, stream it into the zip stream as xmldoco.xml then save that stream to mytest.zip. Use any zip program and you will see you have a compressed text file in mytest.zip called xmldoco.xml. The original question was about creating a zip file, the mars project flex classes allow you to do this.
    http://download.macromedia.com/pub/labs/mars/mars_sampleapp_air_051608.zip - look at the flex zip classes in this file
    The only reason that the flex mars application was done in air was due to the fp 9 local file access limitations with fp 10 that no longer applies.
    http://labs.adobe.com/technologies/mars/ read comment 7 at the bottom of this webpage
    "You can open a PDFXML file with any Zip tool or the PDFXML Inspector, which allows you to display the file contents and make simple edits."
    David.

  • Use PL/SQL procedure to guard against malformed CSV files before upload

    Hi all,
    In my CSV upload utility, I've implemented error checking procedures, but they are invoked only AFTER data has been uploaded to temp table. This doesn't catch the following sample scenarios:
    1. The CSV is malformed, with some rows shifted due to fields and separators missing here and there.
    2. User has chosen a wrong CSV to upload (most likely number of fields mismatch)
    I'm wondering if it is a good idea to have procedure to read in the CSV, scan each line, count the number of fields (null fields but with delimiters showing the field exist is ok) for each record. If every single record matches the required number of fields for that table, then the CSV is ok, and the insert from external table to temp table is allow. This will ensure at least the CSV file has a valid matrix size for the target table, but rest of error checking is left until after temp table is populated.
    One of my concerns is, I specify "missing field values are null" in the external table parameters, which is necessary since not all fields are required. Does this specification causes a row with missing trailing separators still considered valid? If so then the stored procedure must be programmed to omit such a case.
    What do you think? Many thanks.

    Hi, Cuauhtemoc Amox
    Thank you for your advice. I have set web adi  using PL SQL interface.
    I have decided to go futher
    i have a procedure like that
    procedure delete_old_data ( p_id in number, p_description in varchar2)
    as
    begin
                   begin
                   if g_flag ='N' then
                   delete from xx_test;
                    g_flag='Y';
                    else null;
                    end if;
                    end;
    insert into xx_test (p_id,p_descriptiom);
    end;
    G_FLAG is a global variable with default value ='N'  in my package. When web_adi upload
    first row from excel sheet, then procedure delete all data from table and change g_flag to 'Y'.
    All other rows uploads succesfully; it  works fine.
    But when user change data in excel sheet and try to upload second time. DELETE_OLD_DATA procedure doesnt work in proper way.
    I have found what problem is. when user use same template and try to upload data several times there is same SESSION_ID in database.
    i.e. g_flag ='Y' when user try to upload second time. But when user log off and create template again it is work properly.
    My question is: How i can different upload attempts? May be there is some id for each upload proccess.
    if i can use this ID in my procedure user will have opportunity to use same template.
    Thank you

  • Verification of an uploaded file BEFORE upload - The Answer

    Hello fellow CF Maniacs...
    As many of us may have experienced, when someone uses a form
    on a site to upload a file, it can be quite a pain to have to wait
    for the file to be uploaded before it gets verified as the correct
    file name or file format.
    I set out on a quest to find a javascript solution to this
    problem.
    What I was looking for was a way for the actual filename
    selected by the user, regardless of what directory structure
    information was in the file field upon submission, to be verified
    before the upload took place.
    For instance, if the site were expecting a file called
    'myfile.jpg', when the user clicked on the browse button to select
    the file, the resulting string of text could be anything.
    It might be 'C:\myfile.jpg' or
    'D:\SomeDirectory\AnotherDirectory\YetanotherDirectory\myfile.jpg'
    Worse yet, it might even be the wrong file entirely.
    Up until now, I've always had to allow the file to be
    uploaded and then verify the file was correct.
    When you're getting large files from users, and even small
    ones at times, this can be a 'patience issue' for the user. They
    wait around for the file to be uploaded, just to be told 'Oops, you
    sent the wrong file, please try again'.
    After a few hours of trial and error, I came across an
    unrelated javascript file that seemed like it would work for my
    requirements. And it did. Yes, if the user has javascript disabled
    there's the chance this wont work - but for those who have it
    enabled, it could save a lot of bandwidth in uploads and reuploads,
    and a lot of time for the user.
    The following example can be used to create a page called
    'testform.cfm'.
    The only value in the following example form that you would
    change is:
    filename.ext = the filename and extension you require to be
    selected (i.e. myfile.jpg or somefile.html)
    This code will work 'out of the box' if you just want to put
    a specific filename in the 'thefilename' field. However, this will
    mean that everyone user uploading a file will be sending the same
    filename as everyone else.
    I wont go into how to get unique filenames for each user,
    because that's not what this instruction page is for. If you need
    unique filenames, there are a variety of ways to change the passed
    value of 'thefilename' to accomodate them.
    Enough yacking.. here's the code:
    <!-- content of testform.cfm --->
    <cfif parameterexists(field2) is 'no'>
    <script language="Javascript">
    <!--
    function copyData(from,to) { to.value = from.value }
    // -->
    </script>
    <form name="myForm" action="testform.cfm" method="post"
    enctype="multipart/form-data">
    <input type="file" name="field1"
    onchange="copyData(this,document.myForm.field2)"
    onKeyUp="copyData(this,document.myForm.field2)">
    <input type="hidden" name="field2"
    onchange="copyData(this.document.myForm.field1)"
    onKeyUp="copyData(this,document.myForm.field1)"><input
    type="submit" value="go">
    <input type="hidden" name="thefilename"
    value="filename.ext">
    </form>
    <Cfelse>
    Field 2 is
    <cfoutput>#field2#</cfoutput><Br><BR>
    <cfset namelength = #LEN(thefilename)#>
    <cfset actualfile = #RIGHT(field2, namelength)#>
    Actual Filename picked on form was:
    <cfoutput>#actualfile#</cfoutput><Br>
    Looking for the filename:
    <cfoutput>#thefilename#</cfoutput><Br>
    <cfif #actualfile# is not '#thefilename#'>
    File did not match - don't continue with upload
    <cfelse>
    File matched - continue with upload
    </cfif>
    </cfif>
    Perhaps someone will come along and make this work even
    better. But at least this works :)
    Kudos,
    eTeli.com

    Oops.. perhaps I should explain what is happening when this
    code is used.
    First off, there is a file input field (field1).
    Secondly there is a hidden field (field2).
    What the code is doing, is taking whatever text appears in
    field1 and automatically inserting it into the hidden field2 value.
    When the form is submitted, the field1 value will be changed
    by the server to some temporary value - which is of no use when
    you're trying to find out the actual text that was in the field to
    begin with.
    But, since the hidden field has a 'copy' of that value, and
    the hidden field doesn't get changed to a temporary one, you have
    something to work with before the file gets delivered to the
    server.
    Pretty simple solution really.. too bad it took me hours to
    find it.
    I went through everything from using regex searches and finds
    to trying to disable the submit button if the filename was
    incorrect.
    Everything else I tried failed.
    Hope it works for you :)
    eTeli.com

  • Upload Component:can't pre-treat the file before upload?

    I use FileReference to upload files to server , like this topic:http://forums.adobe.com/thread/709281?tstart=0
    After users select files which to upload,I can get file name,file creator,file creationDate via FileReference's fields.
    But now I want to compress the txt file which users select and then upload the compress data to my server, but I can't find data field in Class FileReference.
    So can't i read the file which users want to upload to the server?
    Is there any methods to solve this problem?

    I use FileReference to upload files to server , like this topic:http://forums.adobe.com/thread/709281?tstart=0
    After users select files which to upload,I can get file name,file creator,file creationDate via FileReference's fields.
    But now I want to compress the txt file which users select and then upload the compress data to my server, but I can't find data field in Class FileReference.
    So can't i read the file which users want to upload to the server?
    Is there any methods to solve this problem?

  • How to virus scan uploads

    I think everybody will be aware that large web sites
    always virus scan the files you upload to there server.
    Would anybody know how to virus scan a file that you would upload on to your server.
    Using JSP or the Java Bean.
    This one is trickly.
    Many thanks to all.
    Any help is good help

    Upload it to a temporary folder. Run an external virus scanner against the file (find out how to run an external program). If it passes, move it to the "real" location. otherwise, prompt the user for instructions.

  • Virus Scan from Servlet

    Hiii,
    First of all I cant decide where to post this message... this can be wrong place but I am sure that you can give some valuable ideas...
    I have a servlet that donwloads some files from some users, and puts them to appropriate place... but dosent look at the files are corrupted by virus, trojans or etc... so that it brings a security issue that I have to handle... but I dont know where to begin... My server runs RedHat EE ..
    In my opinnion I should use command line scanning ... scanner can scan file and may RETURN some information about the file .. finally do some necessary job(delete, copy or move file ... etc..)...
    Some anti-virus softares has command line scanners.. but it seems that they do not return a meaningfull message .. ...
    I think I am clear about the problem...
    Is there anybody who has done such kind of a job before.. ? ..

    Providing you don't need to report back to the user that their files are invalid how about uploading the files to a quarantined area on your server and setting a cron job to scan this files before moving them to correct directory?
    Kaspersky do a linux virus scanner you might try - http://www.kaspersky.com/lin_fileserver
    No idea how flexible the command line interface is though.

Maybe you are looking for

  • Need help showing multiple parameters in a report header

    Post Author: Annette CA Forum: Formula hi-- i am new to this and i have created a report where the person picks one or more items (they are different hospital suites) and i need for them to print on the report header all of the selections that they c

  • Camera Roll is empty but it says that i have (7) pictures

    My Camera Roll is empty, but it reads that i have sven pictures. When i take a pictures it reads that i have 8 pictures not one. This has been happening since the upgrade to 3.1

  • Can i create an apple id without billing information?

    I have just created a new apple ID and i dont have a credit card or gift card and it requires one. Can i somehow skip this part?

  • Syncing issues with 1st Gen. AppleTV

    Hello, having syncing issues with my 1st generation ATV. It just keeps filling up until it is full regardless of the settings. I have set it for only the last 5 unwatched for tv, movies, etc. and then I have changed every movie and tv show, etc to un

  • Configure a monitored target from one agent to another

    Hi, I am using OEMGC 10.2.0.5 and agent 10.2.0.5/4 My question is . On a particular server I have 3 agents A1,A2,A3 And each agent is monitoring 1 Target(DB and listener) T1,T2,T3. Now I want to configure agent A1 to monitor all targets,so that I can