Antivirus problem solved, please update your Khas Graphics Library

I'm not sure this is allowed, but I created a new topic to make it clear that this problem has been solved.


What is the problem?


Some anti virus software accused my graphics library dll file of carrying a virus. Some of them already removed the false positive (like Avira), but some are still complaining about it. You can check that list here.


How do I fix it?


If you don't have the "Khas Graphics Library 2.0" already (you may check the version on RPG Maker's console), do the following:


1. Go to the KGL page at my blog and download the new files (script and library).


2. Substitute the script by the new one in your project


3. Delete the old "Khas Graphics Library.dll" file


4. Place the new library "KGL2.klib" in your project's System folder (you can customize its location in the script, if you want)


5. Done!


I don't have the problem, but should I update it anyways?


Yes. Some of the people who will play your game may have an antivirus software that will complain about my library, so it's better to keep your files up to date.


How did I fix it?


So, before explaining anything, I would like to quote @Dreadshadow's explanation on what was happening:

Well, an anti virus is actually reading an file like a dll, looking for patterns.


Simplifying the geek stuff ,if for example a virus has a code that is like "ASDGJUTRVJHTREHDDRTGDFTTREFDVGDFGFDGSFGBBDGFGB" and the most harmful and significant part of the code, that distinguish it from other viruses, is "GDFTTRE", then this is what an anti virus is looking for.


Imagine now a dll file, using RAM calls and pointers like a ninja. Well it is really technical, but it is easy to take it as a false positive either on detection or heuristics.



That gave me an idea. I opened my dll's source and checked the libraries I was using:


1. The standard template library algorithms. I was using only one method of it and it wasn't critical.


2. The Windows API. Used for reading bitmap headers.


3. The Open Multi-Processing API. Actually, it was included but I ended up not using it (using a single thread was faster), so I forgot it there. My bad.


4. String. This is essential for my engine (memcpy and other stuff).


The idea was to remove everything that could be similar to any other programs (especially the windows.h stuff), so my goal was to implement myself what I was using from the libraries and ditch them. I removed the libraries 1, 2 and 3, rebuild the dll, and it worked! No more false positives, yay! I did some tests with Khas Ultra Lighting and everything is working as expected.


I ran a scan here and it isn't triggering a false positive anymore. In addition, @Kes helped me test it and it looks fine.


I apologize for the inconvenience, I wasn't expecting that my library would trigger false positives. 


If you have any questions or if you need any help, please contact me.
Thank you @Khas!


I replaced the files in my paid version of your script ^^


(I haven't never encountered any problems however..)
I'm clearly overlooking the obvious, but on your blog page I can see where to download the Library file, but not where to download the up to date script which calls this instead of the old .dll file.  I have version 1.01


Does this version run the new file?
Indeed, the new file has the extension .lib...
The old dll, remove it?
@Kes @Ally If you go to the Downloads part, there's two download links there (it wasn't that obvious before, I'm sorry - I changed the names there).


You will need to replace the script, delete the old dll file, and copy the new klib file to the System folder.
Thank you for this! 🙂  
I got the new script, installed it in the editor. Put the new Library file in the system folder of the demo, tried to play the demo and got this:


KGL error.png


What have I omitted to do?


Thanks


EDIT


Ignore this, I'm a certified idiot.  It's working fine.


Thank you.
Thanks for fixing this, Khas!


Have I mentioned how good it is to have you back with us?
Welcome back Khas!


Well done mate!
Thank you everyone!


@Kes You scared me! hahahah


I read your message but I had to leave, so I was a bit worried. But I'm glad to hear you figured it out 🙂  
I may be the only one who had this issue (for about an hour) but I was attempting to go into the project folder / project.zip and paste the KGL2.klib in that way and it kept dissappearing as your actual project folders are located in your My Documents folder.

Long story short when pasting stuff in you need to go into your game folder through the Game / Open Game Folder menu.

FML.

Original thread: https://forums.rpgmakerweb.com/threads/antivirus-problem-solved-please-update-your-khas-graphics-library.73981/