From 6c93b110f2501e0e5096d4edb8b9be9290dbc207 Mon Sep 17 00:00:00 2001 From: James Paterni Date: Mon, 11 Nov 2024 23:01:39 -0500 Subject: [PATCH] add nlogin.bas --- nlogin.bas | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 nlogin.bas diff --git a/nlogin.bas b/nlogin.bas new file mode 100644 index 0000000..baeeeb8 --- /dev/null +++ b/nlogin.bas @@ -0,0 +1,25 @@ +1 LASTHOST$ = TH_SED$(TH_HOSTNAME$,"\s.*","") +10 FOR I = 1 TO ARGC%-1 + LASTHOST$ = TH_SED$(TH_HOSTNAME$,"\s.*","") + IF TH_HASLOGIN(ARGV$(I)) = 0 THEN GOSUB 1000 +21 TH_EXEC "rlogin "+ARGV$(I) + IF INSTR(DIR$, "porthack", 0) = -1 THEN GOSUB 2000 +REM print ARGV$(I)+"$ ls" +REM TH_EXEC "ls" +REM PRINT ARGV$(I)+"$" +REM PRINT ARGV$(I)+"$ netstat" +REM TH_EXEC "netstat" +REM PRINT ARGV$(I)+"$" +30 NEXT I +END + +1000 PRINT "No login on " + ARGV$(I) + IF INSTR(DIR$, "porthack", 0) = -1 THEN GOSUB 2000 + TH_EXEC("porthack " + ARGV$(I)) + RETURN + +2000 PRINT "Porthack not on " + TH_HOSTNAME$ + ". Trying to fetch it from " + LASTHOST$ + TH_EXEC("ftp " + LASTHOST$) + TH_EXEC("get porthack.exe") + TH_EXEC("quit") + RETURN