<commit_before>#!/bin/bash
MY_PATH="`dirname \"$0\"`"
echo $MY_PATH
pushd $MY_PATH

ipset -exist create rkn_update hash:ip
ipset flush rkn_update

rm /tmp/rkn.pac
#wget "http://www.vpngate.net/api/iphone/" -O vpns.csv

wget -4 "http://antizapret.prostovpn.org/proxy.pac" -O /tmp/rkn.pac

egrep -o "([0-9]+\.){3}[0-9]+" /tmp/rkn.pac > /tmp/blackips_pac

while read iphost
do
	for ip in $iphost; do
		ipset -exist add rkn_update $ip
	done;
done < /tmp/blackips_pac

ipset save rkn_update > /etc/rkn_blocked
ipset swap rkn rkn_update
<commit_msg>abs path for cron job<commit_after>#!/bin/bash
MY_PATH="`dirname \"$0\"`"
echo $MY_PATH
pushd $MY_PATH

/sbin/ipset -exist create rkn_update hash:ip
/sbin/ipset flush rkn_update

rm /tmp/rkn.pac
#wget "http://www.vpngate.net/api/iphone/" -O vpns.csv

wget -4 "http://antizapret.prostovpn.org/proxy.pac" -O /tmp/rkn.pac

egrep -o "([0-9]+\.){3}[0-9]+" /tmp/rkn.pac > /tmp/blackips_pac

while read iphost
do
	for ip in $iphost; do
		/sbin/ipset -exist add rkn_update $ip
	done;
done < /tmp/blackips_pac

/sbin/ipset save rkn_update > /etc/rkn_blocked
/sbin/ipset swap rkn rkn_update

{'fraction_non_alphanumeric': 0.1601423487544484, 'fraction_numerical': 0.012455516014234875, 'mean_word_length': 3.707112970711297, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2799901', 'n_tokens_mistral': 530, 'n_tokens_neox': 510, 'n_words': 116}