free software resistance
the cost of computing freedom is eternal vigilance
### welcome.fig
*original date:* sep 2018
*originally posted:* oct 2024
welcome.fig:
```
proginf = "fig os welcome 0.1, oct 2016 mn"
now "" print
ckremote "pgrep sshd | wc -l" arrshell mid 1 1 int
iftrue ckremote
now "" print
now " you have sshd enabled... to prevent remote logins," colortext 12 print "" print
now " it is recommended you turn it off by typing: " prints
now "remote off" colortext 14 print colortext 7 "" print print
fig
trythatfirst 0
while
qu 0
rc 0
ifequal trythatfirst 1
now " " times 11 prints "you can get help simply by typing: " colortext 7 prints
now "help" colortext 14 print colortext 7 "" print print
trythatfirst 2
else
ifequal trythatfirst 0
trythatfirst 1
fig
fig
try
p "type here: " colortext 10 prints colortext 7 "" prints "bash -c 'read -e t ; echo $t'" arrshell mid 1 1
plen p len
iftrue plen
first p asc
else
first 0
fig
now p ltrim rtrim lcase
ckcmd " " plus now plus " "
ckcmdremote instr ckcmd " remote "
ckcmdoff instr ckcmd " off " times ckcmdremote
iftrue ckcmdoff
rc 1
now " " times 11 prints "service ssh stop" shell "" print
fig
ifequal now "help"
rc 1
trythatfirst 2 ## disable function that tells you about the help command
now " " times 11 prints "valid commands are:" colortext 3 print "" print
now " " times 11 prints " help" colortext 14 prints ": to get help" colortext 7 print
now " " times 11 prints "remote off" colortext 14 prints ": to turn off remote login" colortext 7 print
now " " times 11 prints " sh" colortext 14 prints ": if you know bash" colortext 7 print
now " " times 11 prints " exit" colortext 14 prints ": (or quit or q) to quit welcome program " colortext 7 print
now "" colortext 7 print
fig
ifequal now "sh"
rc 1
qu 1
now " " times 11 prints "running bash... welcome program will quit on exit:" colortext 3 print "" print
now "cd /root ; bash --rcfile /root/.bashrc" shell
fig
ifequal now "exit"
rc 1
qu 1
fig
ifequal now "quit"
rc 1
qu 1
fig
ifequal now "q"
rc 1
qu 1
fig
except
qu 1
resume
iftrue qu
now "" print system
fig
ifequal rc 0
now " " times 11 prints colortext 3 "unrecognized command (no problem)" prints colortext 7 "" print print
wend
```
license: 0-clause bsd
```
# 2018 mn
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
```
=> https://freesoftwareresistance.neocities.org