File tree 1 file changed +8
-7
lines changed 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
3
if [[ " $2 " = " " ]] || [[ " $3 " = " " ]]; then
4
- echo " Usage: $0 BASE_DIRECTORY DEPTH HASH_BITS "
4
+ echo " Usage: $0 BASE_DIRECTORY DEPTH BITS_PER_CHAR "
5
5
echo " BASE_DIRECTORY will be created if it doesn't exist"
6
6
echo " DEPTH must be an integer number >0"
7
- echo " HASH_BITS(session.hash_bits_per_character) should be one of 4, 5, or 6"
7
+ echo " BITS_PER_CHAR(session.sid_bits_per_character) should be one of 4, 5, or 6."
8
+ # http://php.net/manual/en/session.configuration.php#ini.session.sid-bits-per-character
8
9
exit 1
9
10
fi
10
11
18
19
19
20
directory=" $1 "
20
21
depth=" $2 "
21
- hashbits =" $3 "
22
+ bitsperchar =" $3 "
22
23
23
24
hash_chars=" 0 1 2 3 4 5 6 7 8 9 a b c d e f"
24
25
25
- if [[ " $hashbits " -ge " 5" ]]; then
26
+ if [[ " $bitsperchar " -ge " 5" ]]; then
26
27
hash_chars=" $hash_chars g h i j k l m n o p q r s t u v"
27
28
fi
28
29
29
- if [[ " $hashbits " -ge " 6" ]]; then
30
+ if [[ " $bitsperchar " -ge " 6" ]]; then
30
31
hash_chars=" $hash_chars w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z - ,"
31
32
fi
32
33
@@ -56,10 +57,10 @@ if [[ ! -d $directory ]]; then
56
57
fi
57
58
58
59
59
- echo " Creating session path in $directory with a depth of $depth for session.hash_bits_per_character = $hashbits "
60
+ echo " Creating session path in $directory with a depth of $depth for session.sid_bits_per_character = $bitsperchar "
60
61
61
62
for i in $hash_chars ; do
62
63
newpath=" $directory /$i "
63
64
mkdir $newpath || exit 1
64
- bash $0 $newpath ` expr $depth - 1` $hashbits recurse
65
+ bash $0 $newpath ` expr $depth - 1` $bitsperchar recurse
65
66
done
You can’t perform that action at this time.
0 commit comments