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