mIRC Home    About    Download    Register    News    Help

Print Thread
help to ip virtual #268152 02/12/20 10:56 PM
Joined: Nov 2020
Posts: 16
Konrado Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Nov 2020
Posts: 16
do you have any script similar that does the same job, I know this is easy for scripts .. greetings



ssey [52e0571d@zoneuser-3505D69F.mibbit.com] join

nick: !hex ssey


nick: ssey is 52e0571d@82.224.87.29 (FR) (zoneusers-3505D69F.mibbit.com)

Re: help to ip virtual [Re: Konrado] #268153 03/12/20 12:31 AM
Joined: Jan 2012
Posts: 82
Epic Online
Babel fish
Online
Babel fish
Joined: Jan 2012
Posts: 82
I wrote a little script code for you. I think this is what you wanted to get. Please check if everything works.

The script is able to answer both at the request of the command "!hex nick", and gives an automatic response when Joins each user on the channel. (If it's user from a Mibbit webgate source).

Optionally, you can disable auto-message for Join if you set ";" before the line -   ;on *:JOIN:#:

You can also choose whether to display the script response as a message on the "/msg" channel, or as a notice "/notice", or as an echo response "/echo".

Displaying a country zone in the form of as (FR) for an IP address requires an additional code and database. So while without this.
But if necessary, you can find out the location from the received IP-address through the sources you know on the web page.

    [Linked Image from i.ibb.co]

This code must be inserted into the script editor. To do this, press the key combination "ALT+R" and install as a new script:

Code
# DecoderIP v1.0.2  (by Epic)

on *:JOIN:#: dec_ip $nick $chan $me
on *:TEXT:!hex*:#: if ($2) { dec_ip $2 $chan $nick } | else .notice $nick Syntax: !hex <nick>
alias -l dec_ip {
  var %di_nick $strip($1) | var %di_host $gettok($address(%di_nick,2),2,64)
  var %di_ident $remove($gettok($address(%di_nick,1),1,64),*!*)
  if (mibbit isin %di_host && $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))
    ;-------------------------
    ;/echo $2 %di_return
    ;/notice $3 $2 %di_return
    /msg $2 %di_return
  }
}

If you will appear have new ideas for improving this script or you find errors, then be sure to write to me here about it. And we together we will think about what can be done.


Re: help to ip virtual [Re: Epic] #268154 03/12/20 01:03 AM
Joined: Jan 2004
Posts: 1,481
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,481
fyi, a more efficient way to do the translating you're doing, is to use $longip.

//echo -a $longip($base(52e0571d,16,10)) is 82.224.87.29

Re: help to ip virtual [Re: maroon] #268155 03/12/20 01:10 AM
Joined: Jan 2012
Posts: 82
Epic Online
Babel fish
Online
Babel fish
Joined: Jan 2012
Posts: 82
I'm gratitude you for participating in help and for the prompt helpful hint. I will make these changes and add to my script, which thereafter will then get the index v1.0.2

Re: help to ip virtual [Re: Epic] #268167 05/12/20 08:05 PM
Joined: Nov 2020
Posts: 16
Konrado Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Nov 2020
Posts: 16
tnx!!! epic



Elmanotas [c97f0b96@AjFWTK.AMebNW.virtual] this is same a mibbit


mirc [~prueba@3CDAE328.946F4591.C0F38FD0.IP]


Your script is going great, but I have a question which I have seen as well as many these types of ips which go with the same code that you provided or what rules should I change to leave the version from 1.0.2 to 1.0.4 this It is very easy for you, you have talent and keep it up friend, greetings!















Last edited by Konrado; 06/12/20 12:41 AM.
Re: help to ip virtual [Re: Konrado] #268169 06/12/20 04:10 PM
Joined: Jan 2012
Posts: 82
Epic Online
Babel fish
Online
Babel fish
Joined: Jan 2012
Posts: 82
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.


Re: help to ip virtual [Re: Epic] #268183 07/12/20 04:00 PM
Joined: Nov 2020
Posts: 16
Konrado Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Nov 2020
Posts: 16
Thanks for your time and explanation and for the others that there are limits in doing things. happy holidays in advance, greetings!

Re: help to ip virtual [Re: Epic] #268185 07/12/20 10:27 PM
Joined: Nov 2020
Posts: 16
Konrado Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Nov 2020
Posts: 16
raulll [xS2unZRLae@C5rfAW.BGlwBk.virtual] join
when it is in lowercase the ident is recognized but when it is the ident in uppercase it is not recognized by the on join, when this I apply it separately // echo -a $ longip($base(xS2unZRLae,16,10)) if it solves it . greetings friend. I hope to share a good script that is being generated. and taking advantage of the great talent you have

Re: help to ip virtual [Re: Konrado] #268186 07/12/20 10:44 PM
Joined: Jan 2004
Posts: 1,481
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,481
Sadly, it looks like this is encoding the ip address differently than the other internet provider was doing.

$longip is translating a value between being in 1.2.3.4. format and being a 32-bit number in the range 0-4294967295. The $base is translating between base-10 and another base, in this case base 16 is the same as case-insensitive hexadecimal. However in your example, you gave a 10-digit string that is not hex. I can see that because 7 of the 10 characters in xS2unZRLae are not part of the hexadecimal alphabet. It also uses both upper and lowercase letters, so it looks like it intends to treat 'x' differently than 'X', while hexadecimal treats "f" and "F" the same.

Re: help to ip virtual [Re: maroon] #268187 08/12/20 04:07 AM
Joined: Nov 2020
Posts: 16
Konrado Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Nov 2020
Posts: 16

I was able to make it work from 8 characters that it had to 10, now when it over goes to 11 it no longer, just as you tell me only 10 characters is the range. but when it is manual that is normal. but there should be some extraction that pulls all the ident and if the hex can be done ..


if ($di_check(%di_nick,%di_host) == true && $len(%di_ident)) { <----- In this section I removed the == 8 and that is when I actually went to 10 characters whistle

Re: help to ip virtual [Re: Konrado] #268264 20/12/20 05:35 PM
Joined: Jan 2012
Posts: 82
Epic Online
Babel fish
Online
Babel fish
Joined: Jan 2012
Posts: 82
My script was designed to decrypt specifically the hexadecimal code, which consists of 8 characters in the user ID, according to the example for the "Mibbit" webgate: https://wiki.mibbit.com/index.php/Hexip

But even this is not a 100% guarantee that the address will be decoded, so in most cases it is better to use it only for users from this web gate or similar it. That is, you must understand in which case the answer will be correct, and in which most likely false, for this you should set the value in the variable "%di_target = .mibbit" only for those sources that are suitable for this and the name of these sources is present in their host.

How to decode 10 character identifiers is difficult to understand without information about the source that creates this identifier. In addition, it can be just a random set of characters and numbers, or a fake in the form of an encrypted address. Trying to decipher it by replacing the value from 8 to 10, you simply can get the wrong result, which will be misleading.

If you have additional information about which method and through which source given IP address "raulll [xS2unZRLae@C5rfAW.BGlwBk.virtual] join channel" is encrypted by users on your network, be sure to report it.

Re: help to ip virtual [Re: Epic] #268265 20/12/20 06:20 PM
Joined: Nov 2020
Posts: 16
Konrado Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Nov 2020
Posts: 16
Tnx! bro.. nice day smile