Bash script that creates Windows REGEDIT script #1

Merged
restitux merged 1 commits from regedit into main 2023-02-20 19:01:15 +00:00
Executable
+17
View File
@@ -0,0 +1,17 @@
to_hex () {
echo $1 | while read -n 1 char; do
echo -n $char | xxd -p | tr \\n ","
done
echo -n "00"
}
base0="1001"
base1="00"
servername=$1
region="1"
url=$2
echo "REGEDIT4
[HKEY_CURRENT_USER\Software\Blizzard Entertainment\Warcraft III]
\"Battle.net Gateways\"=hex(7):$(to_hex $base0),$(to_hex $base1),$(to_hex $servername),$(to_hex $region),$(to_hex $url),00"