Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/dest/
Empty file modified BLPListParser.sh
100644 → 100755
Empty file.
27 changes: 27 additions & 0 deletions B_UT1Parser.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
type="categories" # These are all catagories for services
rsync -arpogvt rsync://ftp.ut-capitole.fr/blacklist .
cd dest
ls -d */ | while read line; do
# Extract the file name from the list
dir_name=${line%/}
#Check if folder already exists, create it if not
if [ ! -d "../${type}/${dir_name}" ]; then
mkdir -p "../${type}/${dir_name}"
fi
# Sed using extened regex to invert match ips and there ranges while removing spaces and coments of the file if any
output=$(sed -rn '/((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])/!p ;s/\s*#.*//g ;/^$/ d' ${dir_name}/domains)
if [ -n "$output" ]; then
echo "$output" >> "../${type}/${dir_name}/domains"
fi
# Remove Duplicates from the files if added any
awk -i inplace '!seen[$0]++' ../${type}/${dir_name}/domains

# Sed using extened regex to get ips and there ranges while removing spaces and coments of the file if any
output=$(sed -rn '/((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])/p ;s/\s*#.*//g ;/^$/ d' ${dir_name}/domains)
if [ -n "$output" ]; then
echo "$output" >> ""../${type}/${dir_name}/ip""
fi
# Remove Duplicates from the files if added any
awk -i inplace '!seen[$0]++' ../${type}/${dir_name}/ip
done
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# kosh

We have moved to `https://code.hopbox.in/hopbox/kosh`.

Kosh is a collection of widely used configuration information about various applications


Expand Down
Loading