I have updated and improved my script for you. Try to use this code. If you find any bugs or have new ideas to improve this script, write me about it here. cool

Updates to v1.1:

  1.Now, every time you or your bot with this script joins a channel, a command with a request "/who #channel" will be executed. This is necessary in order to get users data for the correct operation of the $address identifier.
  2.Now you can create a space-separated list of words in the "%di_target" variable and if one of them is found in the user's host address, then this will cause the script to run.
  3.Now it is possible to specify the nickname of the user or his ID at your request by the command. Syntax: !hex <nick/ident>. You can find out the IP address by ID even if the user is already disconnected from the network. This will only work correctly if the user ID is encoded in an 8 character hexadecimal format. Some web gateways as "Mibbit" do this. But keep in mind that the user ID can be just a random set of characters. In such cases, this script may not work or give an incorrect address. Therefore, in the variable "%di_target" specify only those source values for searching to in a for user host that are suitable for this, so that the script will give you the correct result.
  4.You can now choose how to display the script message between "/msg", "/notice", "/echo", or send it to the specified service channel "/msg #Services". Just remove the ";" before the desired execution line at the bottom of the code.

      [Linked Image from i.ibb.co]

This code must be inserted into the scripts editor. To do this, press the key combination "ALT+R" and replace the old code with this code and then save it entitled name "DecoderIP.mrc":

Code
#####################################################################
#   Name: DecoderIP v1.1
#   Description: Decodes an IP address encoded in hexadecimal format in a user ID.
#   Author: Epic
#   Email: epicnet@mail.ru
#   Site: http://epicnet.ru
#####################################################################

on *:JOIN:#: if ($nick == $me) { %di_who = true | .who $chan } | else dec_ip $nick $chan $me join
on *:TEXT:!hex*:#: if ($2) { dec_ip $2 $chan $nick text } | else .notice $nick Syntax: !hex <nick/ident>
raw 352:*: if (%di_who == true) haltdef
raw 315:*: if (%di_who == true) { haltdef | unset %di_who }
alias -l dec_ip {
  ;------------------------------
  %di_target = .mibbit .virtual
  ;------------------------------
  var %di_value $strip($1)
  if ($comchan(%di_value,0) > 0) {
    var %di_nick %di_value | var %di_host $gettok($address(%di_nick,2),2,64)
    var %di_ident $remove($gettok($address(%di_nick,1),1,64),*!*)
    if ($di_check(%di_nick,%di_host) == true && $len(%di_ident) == 8) {
      var %di_ip $longip($base(%di_ident,16,10))
      var %di_return DecoderIP: $+(06,%di_nick,) -> $+(%di_ident,@,04,%di_ip,) -> $+($chr(40),%di_host,$chr(41))
    }
  }
  if ($comchan(%di_value,0) == 0 && $len(%di_value) == 8) {
    var %di_ip $longip($base(%di_value,16,10))
    var %di_return DecoderIP: $+(06,%di_value,) -> $+(04,%di_ip,)
  }
  if (%di_return) di_message $1 $2 $3 %di_return
}
alias -l di_check {
  var %di_q 1 | while (%di_q <= $numtok(%di_target,32)) {  
    if ($gettok(%di_target,%di_q,32) isin $2) return true | inc %di_q
  }
  return false
}
alias -l di_message {
  ;/echo $2 $4-
  ;/notice $3 $2 $4-
  ;/msg #Services $2 $4-
  /msg $2 $4-
}


Apropos decrypting a host like this as "mirc [~prueba@3CDAE328.946F4591.C0F38FD0.IP]" it is practically impossible. Because we cannot know exactly in what way and by what method a given user's host is encrypted. This can be implemented differently via the "cloaking" module on each server, and only the Network Owner or IRCop can be aware of it. Moreover, this encryption was done not so that it could be decrypted, but in order, for example, to reliably protect the user from hooligans and hackers so that they could not organize an attack on an IP address. Also, it could just be a random set of characters like a virtual host. So that if the user who uses the client program does not want other users to see his address, he enables the (+x) user mode for this. Therefore, I think there is hardly anyone here who can help you.



🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples