forked from JuniorJPDJ/steam_account_changer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
steam_acc.sh
executable file
·42 lines (36 loc) · 946 Bytes
/
steam_acc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
STEAMDIR="$HOME/.local/share/Steam"
STEAMUSERDATA="$STEAMDIR/userdata"
STEAMREGISTRY="$HOME/.steam/registry.vdf"
get_name() {
grep PersonaName "$STEAMUSERDATA/$1/config/localconfig.vdf" | cut -f 5
}
get_login() {
grep -B 2 "`get_ID64 "$1"`" "$STEAMDIR"/config/config.vdf | head -n 1 | awk '{ print $1 }'
}
get_ID3() {
echo "[U:1:$1]"
}
get_ID64() {
expr 76561197960265728 + $1
}
for accpath in "$STEAMUSERDATA"/*; do
[ -d $accpath ] || continue
acc=`basename "$accpath"`
echo -e " ID3:\t\t\t`get_ID3 "$acc"`"
echo -e " Login:\t\t`get_login "$acc"`"
echo -e " Name:\t\t`get_name "$acc"`"
echo -en " CS:GO config:\t"
if [ -e "$accpath"/730 ]; then
if [ -L "$accpath"/730 ]; then
cspath="`readlink "$accpath"/730`"
csacc=$(basename "`readlink -f "$accpath/$cspath.."`")
echo "Linked to `get_name "$csacc"` `get_ID3 "$csacc"`"
else
echo "Own"
fi
else
echo "No profile found"
fi
echo
done