Ip Scanner

By -Fear- on Feb 23, 2007

NOTE:MUST HAVE OPER STATUS, (LOCOP,IRCOP,ADMIN) FOR THIS TO WORK.
Place this in your remotes then right click in the channel u will see a window that popups up that says "Nick/Ip" enter a nick and their ip will show or enter the ip and the nick will show that the ip belongs to.

NOTE:THIS HAS BEEN TESTED ON UNREAL IRCD

alias scanip {
  if ( $1 == $null ) { echo -a 3* Scanip syntax: /scanip <IP/nick> | halt }
  if (*.*.*.* !iswm $1) { echo -a 3* Retreiving IP address for $1 $+ ... | set %nick.ip $1 | scan.nick | return }
  echo -a 3 * Scanning # for ( $+ $1 $+ )...
  set -u20 %scanning.for $1
  set -u20 %scan.active $true
  set -u20 %chan $chan($active)
  set -u20 %st $nick( %chan ,0)
  set -u20 %sp 1 
  .userhost $nick( %chan , %sp )
}
alias scan.nick {
  set -u20 %scan.nick $true
  userhost %nick.ip
}
raw 302:*:{ 
  if (%scan.active) || (%scan.nick) { 
    set -u20 %nickhost $2 
    scan.for.match 
  }
}
alias scan.for.match {
  tokenize 64 %nickhost
  set -u20 %curr.nick $1
  set -u20 %toknickhost $2
  tokenize 61 %curr.nick
  set -u20 %current.nick $1
  .dns %toknickhost
}
on 1:DNS:{
  if (%scan.active) {
    if ( $dns(1).ip == %scanning.for ) {
      echo -a 3* %current.nick Matches $dns(1).ip
      unset %scan.active
      halt
    }
    inc %sp  
    if ( %sp < %st ) { userhost $nick( %chan , %sp ) }
  }
  if (%scan.nick) {
    if (!$dns(1).ip) { echo -a 3* %nick.ip has userhost %toknickhost | unset %scan.nick | halt }
    echo -a 3* %nick.ip has resolved to $dns(1).ip

    unset %scan.nick
    halt
  }
}
menu channel {
Ip Scanner:scanip $$?="Nick/Ip"
}

Comments

Sign in to comment.
T012m3n7oR   -  May 23, 2008

change

  if ( $1 == $null ) { echo -a 3* Scanip syntax: /scanip <IP/nick> | halt } 

to

  if (!$1) { echo -a 3* Scanip syntax: /scanip <IP/nick> | halt }

and it doesn\'t give you their ip only their user host mask

 Respond  
Dizzlenub   -  Jul 12, 2007

Uhh... \"if ($1 == $null) { echo -a...\" Why would $1 be an empty slot? Noone\'s gonna type / and expect it to IP scan someone.. But other then that little...weird safety... I can\'t say much cause I havent tested it. But it looks nice, and I need a IP grabber =P

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.