<commit_before>#!/usr/bin/env bash
# [web-based interface]
# [admin-based interface]
# Firewall Invitations

<<DOC
This script rules in/out favour of an IP address.
    ./ip_address.sh $command $ip_address
$command
    A = Add = mk
    D = Del = rm
$ip_address
    IPv4
DOC

# https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers
read -r ports < <(head -n 1 ./etc/loopholes);

sudo iptables -$1 INPUT  -p tcp -s $2/32 --match multiport --dports $ports -j ACCEPT
sudo iptables -$1 OUTPUT -p tcp -d $2/32 --match multiport --sports $ports -j ACCEPT<commit_msg>1337: Firewall invitations are now logged.<commit_after>#!/usr/bin/env bash
# [web-based interface]
# [admin-based interface]
# Firewall Invitations

<<DOC
This script rules in/out favour of an IP address.
    ./ip_address.sh $command $ip_address
$command
    A = Add = mk
    D = Del = rm
$ip_address
    IPv4
DOC

# https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers
read -r ports < <(head -n 1 ./etc/loopholes);
read -r home  < <(head -n 1 ./etc/home     );

# Invitational Logging
[ $1 == A ] && cat>>"$home"/invitations<<<$2;

sudo iptables -$1 INPUT  -p tcp -s $2/32 --match multiport --dports $ports -j ACCEPT
sudo iptables -$1 OUTPUT -p tcp -d $2/32 --match multiport --sports $ports -j ACCEPT
{'fraction_non_alphanumeric': 0.13973458235753317, 'fraction_numerical': 0.02107728337236534, 'mean_word_length': 3.189542483660131, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, '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': '192647', 'n_tokens_mistral': 501, 'n_tokens_neox': 481, 'n_words': 150}