Hack Forums
[C#] [Anti] Compare the country the PC uses - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C#] [Anti] Compare the country the PC uses (/showthread.php?tid=5912152)



[Anti] Compare the country the PC uses - gigajew - Nov 25, 2018

Here's a simple, but sometimes very effective anti method. It can be used to check whether their computer's country name equals the one you want to target.

So if I only want this to execute on computers in Finland, I would write something like:

Code
bool isFinland = string.Equals(GetCurrentCountry(),
                                    "Finland",
                                    StringComparison.InvariantCultureIgnoreCase);
            if (!isFinland)
                return -1;




RE: [Anti] Compare the country the PC uses - Nick (Name) - Nov 26, 2018

This is based off of region culture, pretty much what ever language is setup on the machine. I would say this isn’t very accurate at all, my computer states that I’m in France when I’m in the United States because of how I have my language setup.