Subversion Repositories ALCASAR

Compare Revisions

No changes between revisions

Ignore whitespace Rev 3215 → Rev 3216

/CHANGELOG.md
6,6 → 6,7
* CHANGES
* E2guardian : new architecture
* Radius database schema update
* TOR @IP of node G update
* ACC
* Use nmap's MAC prefix file instead of our
* BUGS
/blacklist/Tor-extract-IP.sh
File deleted
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
Deleted: svn:executable
-*
\ No newline at end of property
/blacklist/blacklist-Tor-extract-IP.sh
0,0 → 1,54
#!/bin/bash
 
#######################################
## Update script for Tor entry point ##
## By Sylvain Harand & Rexy ##
## ##
#######################################
 
# Note: The dan.me site only allow to fetch one every 15 minutes by IP adresses.
# Trying to fetch more may result in a definitive ban.
 
# File paths
input_file='TorNodesTmp.txt'
output_file_IPV4='TorNodesIPV4.txt'
output_file_IPV6='TorNodesIPV6.txt'
 
# Récupération de la liste des noeuds TOR et stockage dans le fichier temporaire depuis le site dan.me
curl https://www.dan.me.uk/tornodes > $input_file
 
# extraction des données situées entre les balises spécifiques
tor_nodes=$(sed -n '/<!-- __BEGIN_TOR_NODE_LIST__ \/\/-->/, /<!-- __END_TOR_NODE_LIST__ \/\/-->/p' "$input_file" | sed '1d;$d')
 
# RAZ des fichiers de sortie
> "$output_file_IPV4"
> "$output_file_IPV6"
 
# IPV4 Ptn
PTN='^\([01]\?[[:digit:]][[:digit:]]\?\|2[0-4][[:digit:]]\|25[0-5]\).\([01]\?[[:digit:]][[:digit:]]\?\|2[0-4][[:digit:]]\|25[0-5]\).\([01]\?[[:digit:]][[:digit:]]\?\|2[0-4][[:digit:]]\|25[0-5]\).\([01]\?[[:digit:]][[:digit:]]\?\|2[0-4][[:digit:]]\|25[0-5]\)$'
 
# Pour chaque ligne de la variable temporaire
echo "$tor_nodes" | while IFS= read -r line; do
# Suppression des balises HTML
clean_line=$(echo "$line" | sed -e 's/<br>//g')
# Extraction du 5e champ pour vérifier s'il contient "G" (Tag pour noeud de Garde (entrée)
fifth_field=$(echo "$clean_line" | cut -d '|' -f 5)
if [[ "$fifth_field" == *"G"* ]]; then
# Extraction de l'@IP (1er champ)
ip_address=$(echo "$clean_line" | cut -d '|' -f 1)
# Aihuillage en fonction du type @IP
if [[ $(expr "$ip_address" : "$PTN") -gt 0 ]]
then echo "$ip_address" >> "$output_file_IPV4"
else echo "$ip_address" >> "$output_file_IPV6"
fi
echo -n "#"
fi
done
echo
echo -n "Removing duplicate IPV4 entries - Please wait..."
uniq "$output_file_IPV4" > "$input_file"; cat "$input_file" > "$output_file_IPV4"
echo "Nb_IP_V4 = `wc -l $output_file_IPV4`"
echo -n "Removing duplicate IPV6 entries - Please wait..."
uniq "$output_file_IPV6" > "$input_file"; cat "$input_file" > "$output_file_IPV6"
echo "Nb_IP_V6 = `wc -l $output_file_IPV6`"
rm "$input_file"
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:executable
+*
\ No newline at end of property
/rpms/x86_64/wget-1.21.4-1.mga9.x86_64.rpm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/rpms/x86_64/wget-1.21.4-1.1.mga9.x86_64.rpm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/scripts/alcasar-rpm-download.sh
8,7 → 8,7
# récupération des RPM nécessaires dans un fichier tarball
# retrieve needed RPM in a tarball file
 
VERSION="8"
VERSION="9"
ARCH="x86_64"
# The kernel version we compile netflow for
KERNEL="kernel-server-6.6.28-1.mga9"
/scripts/alcasar-rpm.sh
55,8 → 55,11
}
 
# We prefer wget than curl
urpmi --no-verify-rpm --auto rpms/$ARCH/wget*.rpm
 
wget_exist=`rpm -qa|grep wget|wc -l`
if [ "$wget_exist" -eq "0" ]
then
urpmi --no-verify-rpm --auto rpms/$ARCH/wget*.rpm
fi
# Set the RPM repository (if not already set)
cp /etc/urpmi/urpmi.cfg /etc/urpmi/urpmi.cfg.old
ACTIVE_REPO=`cat /etc/urpmi/urpmi.cfg|grep "mageia.org"|wc -l`
228,7 → 231,7
# Save chilli launch script (erase with new rpm one)
[ -e /etc/chilli.conf ] && cp /etc/chilli.conf /tmp/
# Install home made RPMs
for pkg in `ls rpms/$ARCH/*.rpm`
for pkg in `ls rpms/$ARCH/*.rpm|grep -v wget`
do
urpmi --no-verify --auto $pkg
done