mIRCStorm V2.0.0 — File Browser

mIRCStormV2.0.0v2.0.0 / mIRCStormV2.0.0v2.0.0 / mIRCStormV2.0.0 / Scripts / botnet.mrc

botnet.mrc — 6.4 KB — Download this file

;mIRCStorm V2.0.0 - Botnet.mrc
;
;Website: http://www.mIRCStorm.co.uk
;Author: Evil_Dave (Evil_Dave@mIRCStorm.co.uk)
;
;This script contains all the Botnet code 
;========================================================
;=======================DCC.mrc==========================
;=======================================================
alias /link {
  if ($readini database\mircStorm.botnet mircstorm %bot.botnet.link.nick == $null) { /msg = $+ %bot.botnet.nick Unknown Bot %bot.botnet.link.nick $+ . | halt }
  /msg =$nick Linking To %bot.botnet.link.nick $+ ....  
  set %bot.botnet.address $readini database\mircStorm.botnet mircstorm %bot.botnet.link.nick
  set %sock.link.ip $gettok(%bot.botnet.address,1,58)
  set %sock.link.port $gettok(%bot.botnet.address,2,58)
  /sockclose connection
  /sockopen Connection %sock.link.ip %sock.link.port
  /botnettalk *** Linking To %bot.botnet.link.nick %sock.link.ip %sock.link.port 
}

on *:socklisten:Connection:{
  /echo A Connection Is Coming In On My Botnet Port.
  /botnettalk *** A Remote Bot Is Attempting To Connect...
  var %bot.botnet.temp.connectionname $rand(1,99999)
  var %bot.botnet.connection.temp 1
  while (%bot.botnet.connection. [ $+ [ %bot.botnet.connection.temp ] ] != $null) {
    inc %bot.botnet.connection.temp 1
  }
  set %bot.botnet.connection. [ $+ [ %bot.botnet.connection.temp ] ] [ linked $+ [ %bot.botnet.temp.connectionname ] ]
  /sockaccept linked $+ %bot.botnet.temp.connectionname
  /sockclose Connection
  .socklisten -d $readini database\mircstorm.ini Botnet IP Connection $readini database\mircstorm.ini Botnet Port 
  /sockwrite linked $+ %bot.botnet.temp.connectionname PICKEDmIRCStormUP. $+ $me
}
on 1:sockclose:Connection:{
  /echo its closed
  set %bot.botnet.msg *** Failed To Link
  /botnettalk 
}
on 1:sockclose:*:{
  if ($sockname != Connection) {
    ;/echo losty connection
    /botnettalk *** A Botnet Connection Has Been Lost!
  }
}
on 1:sockread:*:{
  if (($sockname != Connection) && (linked !isin $sockname)) { 
    ;.msg #mircstorm i stopped in the botnet sockread check!! i had a sockname of $sockname
    halt 
  }
  unset %temp
  /sockread -f %temp
  if ($me isin %temp) { halt }
  if (PICKEDmIRCStormUP isin %temp) { 
    sockrename connection linked 
    /botnettalk *** A Botnet Connection Has Been Made To $gettok(%temp,2,46)
    var %bot.botnet.temp.connectionname $rand(1,99999)
    var %bot.botnet.connection.temp 1
    while (%bot.botnet.connection. [ $+ [ %bot.botnet.connection.temp ] ] != $null) {
      inc %bot.botnet.connection.temp 1
    }
    set %bot.botnet.connection. [ $+ [ %bot.botnet.connection.temp ] ] [ linked $+ [ %bot.botnet.temp.connectionname ] ]
    /sockrename $sockname linked $+ %bot.botnet.temp.connectionname
    /sockwrite linked $+ %bot.botnet.temp.connectionname PICKEDmIRCStormconfirmUP. $+ $me
    halt
  }
  if (PICKEDmIRCStormconfirmUP isin %temp) { 
    /botnettalk *** A Botnet Connection Has Been Made To $gettok(%temp,2,46)
    halt
  }
  /echo $active Revecided: %temp
  if (.WHOM isin %temp) {
    set %bot.dcc.temp.4 1
    while (%bot.dcc.temp.4 <= $calc(%bot.dcc.count + 20) ) {
      set %bot.dcc.hostname.whom [ $address(%bot.dcc.nick. [ $+ [ %bot.dcc.temp.4 ] ] $+ ,3) ]
      if ( %bot.dcc.nick. [ $+ [ %bot.dcc.temp.4 ] ] == $null ) { inc %bot.dcc.temp.4 | /continue }
      /sockwrite linked* .REQUESTEDWHOM %bot.dcc.nick. [ $+ [ %bot.dcc.temp.4 ] ]  $me  %bot.dcc.hostname.whom
      inc %bot.dcc.temp.4
    } 
    halt
  }
  if (.REQUESTEDWHOM isin %temp) {
    set %bot.botnet.temp 1
    while (%bot.botnet.temp <= $calc(%bot.dcc.count + 20) ) {
      if ( %bot.dcc.nick. [ $+ [ %bot.botnet.temp ] ] == $null ) { inc %bot.botnet.temp | /continue }
      /sockwrite $sockname %bot.dcc.nick. [ $+ [ %bot.botnet.temp ] ] $me UnKnownHost
      inc %bot.botnet.temp
    }
    /relaytalk.botnet %temp | halt
    halt
  }
  if (xmircloginstorm isin %temp) {
    if ($readini database\mircStorm.GID mircStorm $gettok(%temp,3,58) == $gettok(%temp,4,58) ) {
      writeini database\mircStorm.GID Login $gettok(%temp,5,58) HasDoneLoginOk  | set %bot.lastlogin $gettok(%temp,2,58) At $fulldate
      set %bot.dcc.command XLOGIN OK | set %bot.dcc.command.nick $gettok(%temp,2,58) | /dcctalk
      /relaytalk.botnet %temp | halt
    }
    else {  
      set %bot.dcc.command XLOGIN FAIL | set %bot.dcc.command.nick $gettok(%temp,2,58) | /dcctalk | halt
    }
  }
  set %bot.botnet.temp 1
  while (%bot.botnet.temp <= $calc(%bot.dcc.count + 20) ) {
    if ( %bot.dcc.nick. [ $+ [ %bot.botnet.temp ] ] == $null ) { inc %bot.botnet.temp | /continue }
    /msg = $+ %bot.dcc.nick. [ $+ [ %bot.botnet.temp ] ] %temp
    inc %bot.botnet.temp
  }
  /relaytalk.botnet %temp


}

alias /relaytalk.botnet {
  var %bot.botnet.reading.temp 1
  while (%bot.botnet.connection. [ $+ [ %bot.botnet.reading.temp ] ] != $null) {
    /echo 8looking at $sockname comparing with %bot.botnet.connection. [ $+ [ %bot.botnet.reading.temp ] ] 
    if ( !$sock(%bot.botnet.connection. [ $+ [ %bot.botnet.reading.temp ] ]).status ) { /echo ooo That socket anit there no more | inc %bot.botnet.reading.temp 1 | /continue }
    if (%bot.botnet.connection. [ $+ [ %bot.botnet.reading.temp ] ] != $sockname) {
      /echo 8found $sockname not to be bot who just sent that
      /echo trying to send $1-
      /sockwrite %bot.botnet.connection. [ $+ [ %bot.botnet.reading.temp ] ] $1-
    }
    else { /echo 8Theres the one who sent me that $sockname }
    inc %bot.botnet.reading.temp 1
  }

}
alias /botnettalk {
  if ($1 == $null) { /echo could not find any auguments - botnettalk | halt }
  ;/write -n modes.log ! $+ %bot.dcc.command.nick $+ %bot.dcc.command.chan $+ ! %bot.dcc.command
  if ( %bot.dcc.count > 0 ) {
    set %bot.dcc.temp.0 1
    while (%bot.dcc.temp.0 <= $calc(%bot.dcc.count + 20) ) {
      if ( %bot.dcc.nick. [ $+ [ %bot.dcc.temp.0 ] ] == $null ) { inc %bot.dcc.temp.0 | /continue }
      /msg = $+ %bot.dcc.nick. [ $+ [ %bot.dcc.temp.0 ] ] $1-
      inc %bot.dcc.temp.0
    } 
    unset %bot.botnet.msg
  }
}

alias /remote.botnettalk {
  if ($sock(linked*).type != $null) {
    if ($1 == mircstormrelaybot) {
      /sockwrite linked* $2-
      halt
    }
    else {
      var %bot.botnet.botnettalk < $+ $1 $+ @ $+ $me $+ > $2-
      /sockwrite linked* %bot.botnet.botnettalk
      /echo $active Sent: %bot.botnet.botnettalk
    }
  }
}




v