Advertisement
westor

!IP Checker (ipinfo.io) for Debian v1.3

Jun 2nd, 2020
3,551
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.92 KB | None | 0 0
  1. alias -l mychan { return #opers }
  2.  
  3. ON *:TEXT:!ip *:$($mychan): { ip_find $nick $2 }
  4. ON *:INPUT:*: {
  5.   if (!$inpaste) && (!$ctrlenter) && ($comchar !== $left($1,1)) && ($active == $mychan) && ($active !== Status Window) && ($1 == !ip) && ($2) { .timer 1 0 ip_find $unsafe($me $2) }
  6. }
  7.  
  8. alias ip_find {
  9.   if (!$1) && (!$2) { return }
  10.   if (!$iptype($2)) { msg $chan ( $+ $nick $+ ): Error, Invalid IP address! | return }
  11.  
  12.   var %n = $1
  13.   var %u = http://ipinfo.io/ $+ $2 $+ ?token=f3e8ece60257d6
  14.   var %v = IPINFO_ $+ $ticks $+ $rand(1,100000000)
  15.  
  16.   JSONOpen -ud %v %u
  17.   if ($JSONError) { msg $chan ( $+ %n $+ ): Error, Connection Problem! - Error Details: $jsonerror | return }
  18.  
  19.   var %h = $json(%v,hostname).value
  20.   var %y = $json(%v,city).value
  21.   var %r = $json(%v,region).value
  22.   var %c = $json(%v,country).value
  23.   var %l = $json(%v,loc).value
  24.   var %p = $json(%v,postal).value
  25.   var %z = $json(%v,timezone).value
  26.  
  27.   var %asn = $json(%v,asn,asn).value
  28.   var %asn_name = $json(%v,asn,name).value
  29.   var %asn_domain = $json(%v,asn,domain).value
  30.   var %asn_route = $json(%v,asn,route).value
  31.   var %asn_type = $json(%v,asn,type).value
  32.  
  33.   var %vpn = $json(%v,privacy,vpn).value
  34.   var %proxy = $json(%v,privacy,proxy).value
  35.   var %tor = $json(%v,privacy,tor).value
  36.   var %hosting = $json(%v,privacy,hosting).value
  37.  
  38.   msg $chan ( $+ %n $+ ): Hostname: $iif(%h,$v1,N/A)
  39.   msg $chan ( $+ %n $+ ): City: $iif(%y,$v1,N/A)
  40.   msg $chan ( $+ %n $+ ): Region: $iif(%r,$v1,N/A)
  41.   msg $chan ( $+ %n $+ ): Country Code: $iif(%c,$v1,N/A)
  42.   msg $chan ( $+ %n $+ ): Location: $iif(%l,$v1,N/A)
  43.   msg $chan ( $+ %n $+ ): Postal Code: $iif(%p,$v1,N/A)
  44.   msg $chan ( $+ %n $+ ): TimeZone: $iif(%z,$v1,N/A)
  45.  
  46.   msg $chan ( $+ %n $+ ): ASN Number: $iif(%asn,$v1,N/A)
  47.   msg $chan ( $+ %n $+ ): ASN Name: $iif(%asn_name,$v1,N/A)
  48.   msg $chan ( $+ %n $+ ): ASN Domain: $iif(%asn_domain,$v1,N/A)
  49.   msg $chan ( $+ %n $+ ): ASN Route: $iif(%asn_route,$v1,N/A)
  50.   msg $chan ( $+ %n $+ ): ASN Type: $iif(%asn_type,$v1,N/A)
  51.  
  52.   msg $chan ( $+ %n $+ ): VPN: $iif(%vpn,Yes,No)
  53.   msg $chan ( $+ %n $+ ): Proxy: $iif(%proxy,Yes,No)
  54.   msg $chan ( $+ %n $+ ): TOR: $iif(%tor,Yes,No)
  55.   msg $chan ( $+ %n $+ ): Hosting: $iif(%hosting,Yes,No)
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement