mirror of
https://git.phreedom.club/localhost_frssoft/bbs-telnet
synced 2024-11-24 01:59:20 +02:00
Compare commits
No commits in common. "bcf33de7e12eada7f397bab5cab39a1bd90526ad" and "6bd3f033b5fa969b02449fa24665e7e46df1c8c8" have entirely different histories.
bcf33de7e1
...
6bd3f033b5
|
@ -1,3 +1,2 @@
|
|||
access_granted
|
||||
access_denied
|
||||
config
|
||||
|
|
|
@ -11,4 +11,4 @@ $EDITOR config
|
|||
```run server (socat required)
|
||||
./bss.sh <PORT>
|
||||
```
|
||||
run it without argument -> random port selected
|
||||
|
||||
|
|
10
bbs.sh
10
bbs.sh
|
@ -1,13 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ ! -n "$1" ]; then
|
||||
port=$(shuf -i 1024-65000 -n 1)
|
||||
else
|
||||
port=$1
|
||||
fi
|
||||
echo "listening for commands on 0.0.0.0:$1"
|
||||
|
||||
echo "listening for commands on 0.0.0.0:$port"
|
||||
|
||||
socat -v -v TCP-LISTEN:$port,reuseaddr,pktinfo,fork SYSTEM:"./executor.sh"
|
||||
socat -v -v TCP-LISTEN:$1,reuseaddr,pktinfo,fork SYSTEM:"./executor.sh"
|
||||
|
||||
|
||||
|
|
|
@ -23,10 +23,6 @@ die(){
|
|||
}
|
||||
|
||||
mkdir -p -m 700 access_granted
|
||||
mkdir -p -m 700 access_denied
|
||||
|
||||
if [ -f access_denied/"$remote_ip" ]; then exit 0; fi
|
||||
|
||||
generator_session=$(zcat -f $system_dict | shuf -n 2 | tr -d "\n'")
|
||||
randpadding=$(head -c 8 /dev/urandom | base64)
|
||||
printf "$randpadding\t$generator_session\n"
|
||||
|
|
Loading…
Reference in New Issue