Created
November 14, 2021 10:53
-
-
Save kovacs-andras/c9f6949efafbf7a27bdc1535283342df to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use Geo::IP; | |
my $gi = Geo::IP->open("/usr/share/GeoIP/GeoLiteCountry.dat", GEOIP_STANDARD); | |
$country = $gi->country_code_by_name($ARGV[0]); | |
#print $country; | |
if ($country ne 'US'){ | |
exit(1); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment