|
|
|
@ -15,7 +15,7 @@ |
|
|
|
|
### |
|
|
|
|
###------------------------------------------------ |
|
|
|
|
### |
|
|
|
|
### (C) Vincenzo 'KatolaZ' Nicosia <katolaz@freaknet.org> |
|
|
|
|
### (C) 2018 Vincenzo 'KatolaZ' Nicosia <katolaz@freaknet.org> |
|
|
|
|
### |
|
|
|
|
### Use, modify, redistribute under the terms of the GNU General |
|
|
|
|
### Public License version 3 or, at your option, any other version. |
|
|
|
@ -27,14 +27,9 @@ get_dirs(){ |
|
|
|
|
#IFS=$'\t\n' |
|
|
|
|
IFS="|" |
|
|
|
|
src_dir=$(echo "${src_id}" | cut -c -2) |
|
|
|
|
touch "${src_dir}/${src_id}" |
|
|
|
|
while read name sel host port; do |
|
|
|
|
## echo " --- name: \"$name\"" |
|
|
|
|
## echo " --- sel: \"$sel\"" |
|
|
|
|
## echo " --- host: \"$host\"" |
|
|
|
|
## echo " --- port: \"$port\"" |
|
|
|
|
TYPE=$(echo "$name" | cut -c 1) |
|
|
|
|
## echo " --- TYPE \"$TYPE\"" |
|
|
|
|
## echo "$TYPE, $name, $sel, $host, $port" |
|
|
|
|
port=$(echo $port | sed -r -e 's/\r//g') |
|
|
|
|
dir_id=$(echo "${TYPE}|${sel}|${host}|${port}" | sed 's/^1||/1|\/|/g') |
|
|
|
|
dest_id=$(echo "${dir_id}" | sha256sum | cut -d " " -f 1 ) |
|
|
|
|