add nlogin.bas
This commit is contained in:
parent
c2427492db
commit
6c93b110f2
1 changed files with 25 additions and 0 deletions
25
nlogin.bas
Normal file
25
nlogin.bas
Normal file
|
@ -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
|
Loading…
Reference in a new issue