Sending messages through pts tty on linux
Page 1 of 1
Sending messages through pts tty on linux
sudo command required in most cases!
Blast.sh
- Code:
#!/bin/bash
# Message Blaster (c) Jnet 2021
# jnet.sytes.net
#
# https://jnet.forumotion.com/t1754-sending-messages-through-pts-tty-on-linux#2715
#
# ./blast "Message"
#
# echo $message > /dev/pts/$f
spec="-en "
echo -en "\e[92mWelcome To PTS / TTY Blaster (c) J~Net 2021"
defaultmessage="Get Off Now!!!"
echo ""
if [ "$#" -eq "0" ]
then
read -p "Enter message [$defaultmessage]: " message
else
message=$1
fi
# Cleanup
rm -f out.txt
# Display users with w
w
#
MSG="Get Off Now!!!"
for f in /dev/pts/* ; # Puts /dev/pts/1 into item list so remember that!
do
echo "$f \n" >> out.txt # /dev/pts/$f
echo $spec $message > $f
done
SpamBlast.sh
- Code:
#!/bin/bash
# Message Blaster (c) Jnet 2021
# jnet.sytes.net
#
# https://jnet.forumotion.com/t1754-sending-messages-through-pts-tty-on-linux#2715
#
# ./spamblast "Message"
#
# echo $message > /dev/pts/$f
spec="-en "
while true;
do
echo -en "\e[92mWelcome To PTS / TTY Blaster (c) J~Net 2021"
defaultmessage="Get Off Now!!!"
echo ""
if [ "$#" -eq "0" ]
then
read -p "Enter message [$defaultmessage]: " message
else
message=$1
fi
# Cleanup
rm -f out.txt
# Display users with w
w
#
#message="Get Off Now!!!"
for f in /dev/pts/* ; # Puts /dev/pts/1 into item list so remember that!
do
echo "$f \n" >> out.txt # /dev/pts/$f
echo $spec $message > $f
cat $message | sudo $f
done
done
Last edited by jamied_uk on 22nd July 2021, 23:16; edited 1 time in total
Re: Sending messages through pts tty on linux
Running is simple sudo file.sh
or make executable
sudo is required in most cases!
or make executable
- Code:
sudo chmod +x *.sh
./file.sh
sudo is required in most cases!
- Code:
./blast.sh "message here!"
./spamblast.sh "bla bla bla "
Similar topics
» this is for sending linux terminal messages to logged on members using two commands
» Setting up bluetooth for linux for sending files over BT
» Seting youyr own custom Error messages instead of getting generic error messages!
» Sending & Receiving Binary Files Via Bash On Linux
» Setting up SMTP for localhost web server for sending free emails using gmail
» Setting up bluetooth for linux for sending files over BT
» Seting youyr own custom Error messages instead of getting generic error messages!
» Sending & Receiving Binary Files Via Bash On Linux
» Setting up SMTP for localhost web server for sending free emails using gmail
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum