# Convincing AntiVirsus, im not a virus

This topic is 1131 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello,

I have recently wrote a tool which reads in .json files and merges them together, then outputs the result. Unfortunately multiple antivirus' do not like the program writing to a file (Avast and Microsoft Security Essentials). If I disable the antivirus, my program is free to create the output file.

I thought/hoped that in release mode, my program would be free of these restraints, but even after installing the program, it is still being flagged.

Is there something I can do to allow my program to write to files?

##### Share on other sites

Edited by Blazart

##### Share on other sites
I had the same problem with Avast. I had to turn off part of the program to make it stop flagging my programs.

##### Share on other sites

unfortunately I do not determine which Antivirus the user has.

I don't think saying "Incompatible with shitty anti viruses." when the user downloads/buys the program is an option.

Ok, I wasn't sure in the original question whether you were referring to your PC, or PCs in general - in the former case, you can just whitelist your application in the antivirus (unless its really so shitty it doesn't even have that option ;) ), but for ALL PCs, its a little more complicated. If, as you said, multiple antiviruses all flagged your application, there has to be some common component triggering that behaviour, so you might be able to find that out and possibly alter it.

Aside from that, maybe contact the manufacturers customer support, and see if they can do anything (like making adjustments to their detection routine, to produce less false-flags like your application; though I can't say how likely that is to happen)?

##### Share on other sites

unfortunately I do not determine which Antivirus the user has.

I don't think saying "Incompatible with shitty anti viruses." when the user downloads/buys the program is an option.

Ok, I wasn't sure in the original question whether you were referring to your PC, or PCs in general - in the former case, you can just whitelist your application in the antivirus (unless its really so shitty it doesn't even have that option ;) ), but for ALL PCs, its a little more complicated. If, as you said, multiple antiviruses all flagged your application, there has to be some common component triggering that behaviour, so you might be able to find that out and possibly alter it.

Aside from that, maybe contact the manufacturers customer support, and see if they can do anything (like making adjustments to their detection routine, to produce less false-flags like your application; though I can't say how likely that is to happen)?

It was the latter. (sorry)

I have already debugged, The only part of the program which does not run as expected is the writing to a file.

	std::ofstream outfile("Output//Merged.json", std::ofstream::binary);
int len = json.length();
char * buff = new char[len];
memcpy(buff, json.c_str(), sizeof(char) * len);
outfile.write(buff, len);
outfile.close();


(I have tried multiple extensions and methods of writing)

:/

only library I am using is RapidJson

I am running under admin permissions

Edited by dsm1891

##### Share on other sites
You're using two forward slashes - try using one forward slash OR two backslashes, but not two forward slashes. Edited by Nypyren

##### Share on other sites

It was the latter. (sorry)

If found this stackoverflow-article, from someone that had the same problem like you:

http://stackoverflow.com/questions/14375340/my-programs-are-blocked-by-avast-anti-virus

So appearently you can eigther digitally sign your code (costs), or really just contact the anti-virus manufactures and have them whitelist your file (probably only makes sense after a release).

##### Share on other sites

You're using two forward slashes - try using one forward slash OR two backslashes, but not two forward slashes.

sorry, that was a typo in the code

1. 1
2. 2
3. 3
Rutin
22
4. 4
5. 5

• 9
• 13
• 19
• 14
• 9
• ### Forum Statistics

• Total Topics
632940
• Total Posts
3009324
• ### Who's Online (See full list)

There are no registered users currently online

×