;Port Scanner 1.3 by NoSupra
dialog psi {
  title "Port Scanner v1.3"
  size 177 114 164 191
  option dbu
  list 1, 4 16 76 104, size
  list 2, 84 16 76 104, size
  edit "", 3, 24 136 60 10, multi, return
  button "Scan", 5, 36 164 40 12
  button "OK", 6, 88 164 40 12,ok
  text "Porte Control.", 7, 4 4 44 8
  text "Porte Aperte", 8, 84 4 44 8
  text "Ready", 9, 4 152 44 8
  text "", 10, 49 152 116 8
  text "Porte da controllare:", 4, 4 124 100 8
  text "Dalla", 11, 4 136 20 8
  text "Alla", 12, 88 136 8 8
  edit "", 13, 100 136 60 10, multi, return
  text "", 14, 4 180 156 8
}

on *:dialog:psi:init:0:{
  dll dlls/mdx/mdx.dll SetMircVersion $version
  dll dlls/mdx/mdx.dll MarkDialog $dname
  if (%unome == 1) {
    dll dlls/mdx/mdx.dll SetDialog $dname bgcolor $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor $dname 4,10,9,8,7,11,12,14  background $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor $dname 4,10,9,8,7,11,12,14  textbg $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor $dname 1,2,3,13  background $rgb(0,0,0)
    dll dlls/mdx/mdx.dll SetColor $dname 1,2,3,13  textbg $rgb(0,0,0)
    dll dlls/mdx/mdx.dll SetColor  4,10,9,8,7,11,12,14  text $rgb(255,255,255)
    /dll dlls\mdx\mdx.dll SetColor $dname 5,6 background $rgb(0,72,170)
  }
  if (%unome == 2) {
    dll dlls/mdx/mdx.dll SetDialog $dname bgcolor $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor $dname 4,10,9,8,7,11,12,14  background $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor $dname 4,10,9,8,7,11,12,14  textbg $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor $dname 1,2,3,13  background $rgb(0,0,0)
    dll dlls/mdx/mdx.dll SetColor $dname 1,2,3,13  textbg $rgb(0,0,0)
    dll dlls/mdx/mdx.dll SetColor  4,10,9,8,7,11,12,14  text $rgb(255,255,255)
    /dll dlls\mdx\mdx.dll SetColor $dname 5,6 background $rgb(0,0,95)
  }
  did -a psi 14 Port Scanner v1.3 By NoSupra           Copyright © 2004
}

on *:dialog:psi:sclick:*:{
  if ($did == 5) { 
    set %ttr $time(H:nn:ss) 
    set %i 1 
    start
  }
  if (%i == %d) && ($did == 5)  {
    did -a ps 9 Finished  Scanned 
    dialog -t psi Scan started at %ttr and finished at $time(H:nn:ss)
  }
}

on *:dialog:psi:edit:*:{
  if ($did == 3) /set %ps $did(3)
  if ($did == 13) /set %pd $did(13)
}

alias conf {
  set %t $portfree(%i) 
  if (%t == $true) did -a psi 1 Port %i Closed 
  if (%t == $false) did -a psi 1 Port %i Open 
  if (%t == $false) did -a psi 2 Port %i Open 
  did -a psi 9 Scanning... 
  did -a psi 10 Port %i of %pd 
  dialog -t psi Scan started at %ttr 
  inc %i 1
  if (%i <= %pd) /start
}

alias start {
  .timerstart 1 0 conf
}

dialog -l barto {
  title "Anti Collide Nick"
  size -1 -1 146 50
  option dbu
  box "Protegge dal collide nick", 1, 18 6 109 24
  check "", 2, 48 17 10 10, flat
  text "Attiva", 3, 58 17 50 10
  button "Ok", 5, 57 35 32 12, ok
}
Alias antco { /dialog -m barto barto |  if ( %cc181p == on ) { $tunder TDDialog $dialog(barto).hwnd > 2 } }


on *:DIALOG:barto:sclick:2: { Set %antco $did(2) }


on *:dialog:barto:init:*: {
  dll dlls/mdx/mdx.dll SetMircVersion $version
  dll dlls/mdx/mdx.dll MarkDialog $dname
  if (%unome == 1) {
    dll dlls/mdx/mdx.dll SetColor $dname 1 background $rgb(255,134,0)
    dll dlls/mdx/mdx.dll SetDialog $dname bgcolor $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor  $dname 2,3 background $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor $dname 2,3 textbg $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor 2,3 text $rgb(255,255,255)
    /dll dlls\mdx\mdx.dll SetColor $dname 5 background $rgb(0,72,170)
  }
  if (%unome == 2) {
    dll dlls/mdx/mdx.dll SetColor $dname 1 background $rgb(196,196,196)
    dll dlls/mdx/mdx.dll SetDialog $dname bgcolor $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor $dname 2,3 background $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor $dname 2,3 textbg $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor 2,3 text $rgb(255,255,255)
    /dll dlls\mdx\mdx.dll SetColor $dname 5 background $rgb(0,0,95)
  }
  if %antco = ON { did -c barto 2 }  

}

on *:dialog:barto:sclick:5: { 
  if ($did(barto,2).state = 1) { %antco = on } | else { %antco = off }

}
