mirror of
https://git.phreedom.club/localhost_frssoft/bbs-telnet
synced 2024-11-23 19:19:21 +02:00
separate file
This commit is contained in:
parent
bcf33de7e1
commit
f62ac374a1
14
executor.sh
14
executor.sh
|
@ -2,19 +2,6 @@
|
||||||
|
|
||||||
. ./config
|
. ./config
|
||||||
|
|
||||||
toot(){
|
|
||||||
curl -s -X POST -F in_reply_to_id=$reply -F status="$1" -F visibility='unlisted' -H "Authorization: Bearer $instance_token" https://$instance/api/v1/statuses
|
|
||||||
}
|
|
||||||
|
|
||||||
timeline_home(){
|
|
||||||
curl -s -H "Authorization: Bearer $instance_token" "https://$instance/api/v1/timelines/home?limit=40&max_id=$1" |
|
|
||||||
jq -r '.[] |
|
|
||||||
if .reblog then
|
|
||||||
(["bump", .reblog.id, .reblog.account.acct] | join(" ")), .reblog.pleroma.content."text/plain", (.reblog.media_attachments[] | "attach", .url, .description // empty)
|
|
||||||
else [.id, .account.acct], .pleroma.content."text/plain", (.media_attachments[] | "attach", .url, .description // empty)
|
|
||||||
end | @text'
|
|
||||||
}
|
|
||||||
|
|
||||||
remote_ip=$SOCAT_PEERADDR
|
remote_ip=$SOCAT_PEERADDR
|
||||||
die(){
|
die(){
|
||||||
rm access_granted/"$remote_ip"
|
rm access_granted/"$remote_ip"
|
||||||
|
@ -26,6 +13,7 @@ mkdir -p -m 700 access_granted
|
||||||
mkdir -p -m 700 access_denied
|
mkdir -p -m 700 access_denied
|
||||||
|
|
||||||
if [ -f access_denied/"$remote_ip" ]; then exit 0; fi
|
if [ -f access_denied/"$remote_ip" ]; then exit 0; fi
|
||||||
|
. ./mastodon_api.sh
|
||||||
|
|
||||||
generator_session=$(zcat -f $system_dict | shuf -n 2 | tr -d "\n'")
|
generator_session=$(zcat -f $system_dict | shuf -n 2 | tr -d "\n'")
|
||||||
randpadding=$(head -c 8 /dev/urandom | base64)
|
randpadding=$(head -c 8 /dev/urandom | base64)
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
#/bin/sh
|
||||||
|
|
||||||
|
toot(){
|
||||||
|
curl -s -X POST -F in_reply_to_id=$reply -F status="$1" -F visibility='unlisted' -H "Authorization: Bearer $instance_token" https://$instance/api/v1/statuses
|
||||||
|
}
|
||||||
|
|
||||||
|
timeline_home(){
|
||||||
|
curl -s -H "Authorization: Bearer $instance_token" "https://$instance/api/v1/timelines/home?limit=40&max_id=$1" |
|
||||||
|
jq -r '.[] |
|
||||||
|
if .reblog then
|
||||||
|
(["bump", .reblog.id, .reblog.account.acct] | join(" ")), .reblog.pleroma.content."text/plain", (.reblog.media_attachments[] | "attach", .url, .description // empty)
|
||||||
|
else [.id, .account.acct], .pleroma.content."text/plain", (.media_attachments[] | "attach", .url, .description // empty)
|
||||||
|
end | @text'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue