1
0
bot/test/token.zsh
syui 7b03adda1f
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 9s
v0.1
2024-03-05 04:09:43 +09:00

19 lines
427 B
Bash
Executable File

function token() {
mkdir -p ~/.config/ai
echo server:
read host
echo password:
read pass
echo handle:
read handle
echo "{ \"host\":\"$host\", \"password\":\"$pass\", \"handle\":\"$handle\" }" >> $cfg
url=https://$host/xrpc/com.atproto.server.createSession
j=`curl -sL -X POST -H "Content-Type: application/json" -d "{\"identifier\":\"$handle\",\"password\":\"$pass\"}" $url`
echo $j
echo $j >! $cfg.t
}