[script]
n0=;################Change everything on your own risk#########################
n1=
n2=on 1:sockopen:port*:{
n3=  if ( $dialog(port) != $null ) {
n4=    if ( $sock($sockname).status != active ) { 
n5=      did -a port 9 Connection timeout ( $+ $sock($sockname).ip  $+ : $+ $sock($sockname).port $+ )
n6=      if ( %scanlog == on ) { write " $+ $logdirportscanlog.log $+ " Connection timeout ( $+ $sock($sockname).ip  $+ : $+ $sock($sockname).port $+ ) }
n7=      sockclose $sockname | halt 
n8=    }
n9=    else { 
n10=      did -a port 9 Connection accepted ( $+ $sock($sockname).ip  $+ : $+ $sock($sockname).port $+ )
n11=      if ( %scanlog == on ) { write " $+ $logdirportscanlog.log $+ " Connection accepted ( $+ $sock($sockname).ip  $+ : $+ $sock($sockname).port $+ ) }
n12=      sockclose $sockname | halt
n13=      )
n14=    }
n15=  }
n16=}
n17=on 1:sockopen:joinscan*:{
n18=  if ( $sock($sockname).status != active ) { return }
n19=  else { 
n20=    if ( %scanlog == on ) { write " $+ $logdirportscanlog.log $+ " Найден открытый порт у $gettok($sockname,2,63) ( $+ $sock($sockname).ip  $+ : $+ $sock($sockname).port $+ ) }
n21=    echo -s ***Найден открытый порт у $gettok($sockname,2,63) ( $+ $sock($sockname).ip  $+ : $+ $sock($sockname).port $+ )
n22=    sockclose $sockname
n23=  }
n24=}
n25=on 1:sockopen:whois*:{
n26=  if ( $sock($sockname).status != active ) { echo -s Не удалось соеденится с сервером }
n27=  else { 
n28=    if ( $gettok($sockname,3,63) == whois.arin.net ) { sockwrite $sockname + $+ $gettok($sockname,2,63) $+ $lf }
n29=    else { sockwrite $sockname $gettok($sockname,2,63) $+ $lf }
n30=  }
n31=}
n32=on 1:sockread:whois*:{
n33=  if ($sockerr > 0) echo 4 error
n34=  :read
n35=  sockread 4 %whois_answer
n36=  if ( $sockbr == 0 ) return
n37=  if ( %whois_answer == $null ) set %whois_answer -
n38=  if ( $window(@Smart_whois) == $null ) { window @Smart_whois tahoma 10 | aline -h @Smart_whois %whois_answer }
n39=  else { aline @Smart_whois %whois_answer }
n40=  goto read
n41=}
n42=on 1:sockclose:whois*:{ set %whois off }
n43=
n44=on 1:sockopen:checkmail.*:{
n45=  if ( $sock($sockname).status != active ) { echo -a ***Ошибка проверки почты, проверьте настройки }
n46=  else { set %check.state. $+ $gettok($sockname,2,46) 1 }
n47=}
n48=
n49=on 1:sockread:checkmail.*:{
n50=  sockread %pop3answer
n51=  if ( $gettok(%pop3answer,1,32) == +OK ) && ( %check.state. [ $+ [ $gettok($sockname,2,46) ] ] == 1 ) { sockwrite $sockname user %maillogin. [ $+ [ $gettok($sockname,2,46) ] ] $+ $lf | set %check.state. $+ $gettok($sockname,2,46) 2 | halt }
n52=  if ( $gettok(%pop3answer,1,32) == +OK ) && ( %check.state. [ $+ [ $gettok($sockname,2,46) ] ] == 2 ) { sockwrite $sockname pass %mailpassword. [ $+ [ $gettok($sockname,2,46) ] ] $+ $lf | set %check.state. $+ $gettok($sockname,2,46) 3 | halt }
n53=  if ( $gettok(%pop3answer,1,32) == +OK ) && ( %check.state. [ $+ [ $gettok($sockname,2,46) ] ] == 3 ) { sockwrite $sockname stat $+ $lf | set %check.state. $+ $gettok($sockname,2,46) 4 | halt }
n54=  if ( $gettok(%pop3answer,1,32) == +OK ) && ( %check.state. [ $+ [ $gettok($sockname,2,46) ] ] == 4 ) {
n55=    if ( $gettok(%pop3answer,2,32) > 0 ) { echo -a ***У вас на %mailname. [ $+ [ $gettok($sockname,2,46) ] ] $+ 4 $gettok(%pop3answer,2,32)  $+ писем | sockclose $sockname | halt }
n56=    sockwrite $sockname quit $+ $lf | unset %check.state. $+ $gettok($sockname,2,46)
n57=  }
n58=  else { echo -a ***Ошибка проверки почты ящика %mailname. [ $+ [ $gettok($sockname,2,46) ] ] }
n59=}
n60=
n61=on 1:sockopen:telnet:{
n62=  if ($sockerr) { echo @telnet Невозможно соедениться с $+(,$sock($sockname).ip,:,$sock($sockname).port) }
n63=  else { echo @telnet Соеденение установлено с $+(,$sock($sockname).ip,:,$sock($sockname).port)) | dialog -x port }
n64=}
n65=
n66=on 1:sockread:telnet:{
n67=  sockread -fn %tn
n68=  if ( $sockbr != $null ) {
n69=    echo @Telnet %tn
n70=    sockread -fn %tn
n71=  }
n72=}
