OOBlock — File Browser

OOBlockv1.0 / OOBlockv1.0 / ooblock.mrc

ooblock.mrc — 8.74 KB — Download this file

;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
;-=-|       /--\ /--\ |-\  |     /--\  /--  |  /       Your mIRC anti-WinNuke Solution
;-=-|       |    | |    | |_/ |     |    |  |     |<                                  This Script was designed for mIRC 5.31 32bit
;-=-|       \--/ \--/ |_/ |__ \--/  \_  |  \                                                            By Haem (haem@deathsdoor.com)
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
on 1:START:{
  unset %oob*
set %oob.statuswin Status Window
  set %oobwin.back $findfile($mircdir,ooblock.bmp,1)
  set %oobwin.check $findfile($mircdir,checked.bmp,1)
  set %oob.ini.file $findfile($mircdir,OOBlock.ini,1)
  set %oobsound.file $readini -n %oob.ini.file Sound File
  if (%oobwin.back == $null) {
    echo -s OBBlock -=- ERROR -=- Couldn't find ooblock.bmp!! This file is required!!  Please place it either in the mIRC Dir or a Subdirectory!!  OOBlock will not function properly until you do!!!
    set %oob.error 1  
  } 
  if (%oobwin.check == $null) {
    echo -s OBBlock -=- ERROR -=- Couldn't find check.bmp!! This file is required!!  Please place it either in the mIRC Dir or a Subdirectory!!  OOBlock will not function properly until you do!!!
    set %oob.error 1   
  }
  if (%oob.ini.file == $null) {
    echo -s OBBlock -=- ERROR -=- Couldn't find OOBlock.ini!! This file is required!!  Please place it either in the mIRC Dir or a Subdirectory!!  OOBlock will not function properly until you do!!!
    set %oob.error 1  
  }
  if ($exists( %oobsound.file ) == $false) {
    echo -s OBBlock -=- ERROR -=- Couldn't find [ $readini -n %oob.ini.file Sound File ] $+ !! Please select another file by turning the sound option off then on.
    set %oob.error 1   
  }
  if ( %oob.error == 1 ) { goto end }
  oobwin  
  oobwin.new
  if ( [ $readini -n %oob.ini.file General Enabled ] == On ) {
    if ( [ $readini -n %oob.ini.file Ports 139 ] == On ) /listen.139
    if ( [ $readini -n %oob.ini.file Ports 138 ] == On ) /listen.138
    if ( [ $readini -n %oob.ini.file Ports 137 ] == On ) /listen.137
  }
  :end
  if (%oob.error != $null ) unset %oob.error
}


;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-;
;            -=- Socket Routines -=-             ;
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-;

on 1:socklisten:OOBNuke.139:{
  sockaccept OOBNuke1A
  oobnuke $sock(OOBNuke1A).ip 139
  sockclose OOBNuke1A
  halt
}

on 1:socklisten:OOBNuke.138:{
  sockaccept OOBNuke2A
  oobnuke $sock(OOBNuke2A).ip 138
  sockclose OOBNuke2A
  halt
}

on 1:socklisten:OOBNuke.137:{
  sockaccept OOBNuke3A
  oobnuke $sock(OOBNuke3A).ip 137
  sockclose OOBNuke3A
  halt
}

alias /listen.139 {
  if ( $portfree(139) == $false ) { echo -s OBBlock -=- ERROR -=- Port 139 is already in use by another application!! | goto end }
  else {
    socklisten OOBNuke.139 139
    if ($sockerr > 0) { echo -s OBBlock -=- ERROR -=- Couldn't Start Nuke Protection on Port 139 | goto end }
    echo -s OBBlock -=- Now Listening on Port 139
  }
  :end
}

alias /listen.138 {
  if ( $portfree(138) == $false ) { echo -s OBBlock -=- ERROR -=-  Port 138 is already in use by another application!! | goto end }
  else {
    /socklisten OOBNuke.138 138
    if ($sockerr > 0) { echo -s OBBlock -=- ERROR -=- Couldn't Start Nuke Protection on Port 138 | goto end }
    echo -s OBBlock -=- Now Listening on Port 138
  }
  :end
}


alias /listen.137 {
  if ( $portfree(137) == $false ) { echo -s OBBlock -=- ERROR -=- Port 137 is already in use by another application!! | goto end }
  else {
    /socklisten OOBNuke.137 137
    if ($sockerr > 0) { echo -s OBBlock -=- ERROR -=- Couldn't Start Nuke Protection on Port 137 | goto end }
    echo -s OBBlock -=- Now Listening on Port 137
  }  
  :end
}

alias /oobclose {
  sockclose OOBNuke. [ $+ [ $1 ] ]
  if ($sockerr > 0) echo -s OBBlock -=- ERROR -=- Couldn't Stop Nuke Protection on Port $1
  else echo -s OBBlock -=- No Longer Monitoring Port $1
}


;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-;
;            -=- Options Window -=-             ;
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-;
;  unset %oobwin.h*
;  unset %oobwin.w*

alias /oobwin {
  if ( [ $readini -n %oob.ini.file OOBWin X ] == $null ) set %oobwin.x $oobwin.w
  else set %oobwin.x [ $readini -n %oob.ini.file OOBWin X ]
  if ( [ $readini -n %oob.ini.file OOBWin Y ] == $null ) set %oobwin.y $oobwin.h
  else set %oobwin.y [ $readini -n %oob.ini.file OOBWin Y ]
  if ( [ $readini -n %oob.ini.file General Enabled ] == On ) window -p +tn @OOBlock %oobwin.x %oobwin.y 380 219
  else window -pn +tn @OOBlock %oobwin.width %oobwin.height 380 219
}

alias /oobwin.new {
  drawpic -c @OOBLock 0 0 %oobwin.back
  if ( [ $readini -n %oob.ini.file Ports 139 ] == On ) /drawpic -c @OOBLock 28 100 %oobwin.check
  if ( [ $readini -n %oob.ini.file Ports 138 ] == On ) /drawpic -c @OOBLock 28 120 %oobwin.check
  if ( [ $readini -n %oob.ini.file Ports 137 ] == On ) /drawpic -c @OOBLock 28 140 %oobwin.check
  if ( [ $readini -n %oob.ini.file General Enabled ] == On ) /drawpic -c @OOBLock 143 100 %oobwin.check
  if ( [ $readini -n %oob.ini.file General Find ] == On ) /drawpic -c @OOBLock 143 120 %oobwin.check
  if ( [ $readini -n %oob.ini.file General Logging ] == On ) /drawpic -c @OOBLock 143 140 %oobwin.check
  if ( [ $readini -n %oob.ini.file Sound State ] == On ) /drawpic -c @OOBLock 143 160 %oobwin.check
}

alias oobwin.h {
  set %oobwin.h1 $window(-1).h
  set %oobwin.h2 $calc(((%oobwin.h1 - 219)/2)-55)
  return $int(%oobwin.h2)
}

alias oobwin.w {
  set %oobwin.w1 $window(-1).w
  set %oobwin.w2 $calc((%oobwin.w1 - 380)/2)
  return $int(%oobwin.w2)
}

alias /oobwin.sclick {
  if ( [ $inrect($1,$2,28,100,13,13) ] ) /oobini Ports 139
  if ( [ $inrect($1,$2,28,120,13,13) ] ) /oobini Ports 138
  if ( [ $inrect($1,$2,28,140,13,13) ] ) /oobini Ports 137
  if ( [ $inrect($1,$2,143,100,13,13) ] ) /oobini General Enabled
  if ( [ $inrect($1,$2,143,120,13,13) ] ) /oobini General Find
  if ( [ $inrect($1,$2,143,140,13,13) ] ) /oobini General Logging
  if ( [ $inrect($1,$2,143,160,13,13) ] ) /oobini Sound State
}

menu @OOBlock {
  sclick:/oobwin.sclick $mouse.x $mouse.y
}

on 1:CLOSE:@OOBlock: { 
  writeini %oob.ini.file OOBWin X $window(@OOBlock).x 
  writeini %oob.ini.file OOBWin Y $window(@OOBlock).y
}


;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-;
;                 -=- IRC Find -=-                    ;
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-;

on 1:DNS: {
  if ( $raddress != $null ) set %oob.nukehost * $+ $raddress
  else set %oob.nukehost 0
}

alias /oob.find {
  set %oob.nukeip * $+ $1
  set %oob.nukeport $2
  echo -s OOBlock -=- /WHOing for the Nuker...
  echo -s OOBlock -=- The above person(s) might be the attacker.  This is for your information in determining the attacker.  It is not 100% accurate!!!  
  if ( %oob.nukehost != $null ) who %oob.nukehost
  who %oob.nukeip
}


;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-;
;              -=- Miscellaneous -=-               ;
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-;

alias /oobini {
  set %initext %oob.ini.file $1 $2
  if ( [ $readini -n %oob.ini.file $1 $2 ] == On ) {    
    writeini %oob.ini.file $1 $2 Off
    if ($1 == Ports) oobclose $2
    if ($1 == General && $2 == Enabled) {
      if ( [ $readini -n %oob.ini.file Ports 139 ] == On ) oobclose 139
      if ( [ $readini -n %oob.ini.file Ports 138 ] == On ) oobclose 138
      if ( [ $readini -n %oob.ini.file Ports 137 ] == On ) oobclose 137
    }
  }
  else { 
    writeini %oob.ini.file $1 $2 On 
    if ($1 == Ports && [ $readini -n %oob.ini.file General Enabled ] == On ) listen. [ $+ [ $2 ] ]
    if ($1 == General && $2 == Enabled) {
      if ( [ $readini -n %oob.ini.file Ports 139 ] == On ) listen.139
      if ( [ $readini -n %oob.ini.file Ports 138 ] == On ) listen.138
      if ( [ $readini -n %oob.ini.file Ports 137 ] == On ) listen.137
    }
    if ($1 == Sound ) writeini %oob.ini.file Sound File $$dir="Choose a Sound!" [ $wavedir ]
  }
  oobwin.new
  flushini %oob.ini.file
  unset %initext
} 

alias /oobnuke {
  echo -s OBBlock -=- NUKE DETECTED -=- From $1 -=- Port $2
  if ( [ $active ] != %oob.statuswin )  echo -a OBBlock -=- NUKE DETECTED -=- From $1 -=- Port $2
  flash Nuked!!
  if ( [ $readini -n %oob.ini.file General Find ] == On ) { dns $1 | .timer 1 20 oob.find $1 }
  if ( [ $readini -n %oob.ini.file Sound State ] == On ) splay [ $readini -n %oob.ini.file Sound File ]
  if ( [ $readini -n %oob.ini.file General Logging ] == On ) {
    write [ $mircdir $+ OOBlock\OOBlock.log ] $asctime($ctime) -=- Nuked by $1 -=- On Port $2
  }
}

alias f10 {
  oobwin  
  oobwin.new
}