provoking antivirus

This is a discussion on provoking antivirus within the C++ Programming forums, part of the General Programming Boards category; Should this piece of code provoke my antivirus by any chance? Code: #include<iostream> using namespace std; int main() { int ...

  1. #1
    Tweaking master Aslaville's Avatar
    Join Date
    Sep 2012
    Location
    Rogueport
    Posts
    107

    Thumbs down provoking antivirus

    Should this piece of code provoke my antivirus by any chance?
    Code:
    #include<iostream>
    
    using namespace std;
    
    int main()
    {
        int sum=0 ,i;
    
    for(i=0;i<100;i++)
    {
    
        do{
            (sum+=i);
        }
        while
            (i%2!=0);
    }
    
        cout<<sum<<endl;
    
        return 0;
    
    }

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,494
    > Should this piece of code provoke my antivirus by any chance?
    No.

    Which AV software are you using?
    Some (Eg Comodo, which I use) operate white-lists of known good files. Since the checksum will change every time you recompile, it seems like a new file to the AV, which has to be relisted as "good".
    You might consider adding an exception rule for your development directory to stop the AV from checking things you're working on.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,239
    Maybe the AV has a really good heuristic which is spotting that pointless infinite loop...
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. AntiVirus
    By mrafcho001 in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 05-22-2005, 12:13 AM
  2. Antivirus
    By MethodMan in forum Tech Board
    Replies: 11
    Last Post: 09-25-2002, 10:22 PM
  3. Antivirus
    By gnu-ehacks in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 04-03-2002, 08:18 AM
  4. Thought-provoking quotes
    By tim545666 in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 01-28-2002, 11:13 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21