Advertisement
westor

Manually Proxy Checker for Debian v2.0

Dec 18th, 2019
1,295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 4.17 KB | None | 0 0
  1. ON @*:TEXT:!ip *:#msl: {
  2.   if ($nick !isop $chan) { msg $chan ( $+ $bold($nick) $+ ): Error, Access Denied! | return }
  3.  
  4.   if ($2 == $chan) {
  5.     var %t = $nick($chan,0)
  6.     var %i = 1
  7.  
  8.     while (%i <= %t) {
  9.       var %n = $nick($chan,%i)
  10.  
  11.       if (%n == $me) || (%n == $nick) { goto next }
  12.  
  13.       var %total = $calc(%total +1)
  14.  
  15.       set -e %userip_other $chan $nick
  16.       set -e %userip_nicks $addtok(%userip_nicks,%n,32)
  17.  
  18.       userip %n
  19.  
  20.       :next
  21.       inc %i
  22.     }
  23.  
  24.     if (!%total) { msg $chan ( $+ $bold($nick) $+ ): Error, Too few nicknames to scan the channel! | return }
  25.  
  26.     return
  27.   }
  28.  
  29.   if ($2 ison $chan) { set -e %userip_other $chan $nick | set -e %userip_nicks $addtok(%userip_nicks,$2,32) | userip $2 | return }
  30.  
  31.   if ($2 !ison $chan) {
  32.     if (!$check_ipv4($2)) && (!$check_ipv6($2)) { msg $chan ( $+ $bold($nick) $+ ): Error, Incorrect IP Address! | return }
  33.     if ($2 == 127.0.0.1) { msg $chan ( $+ $bold($nick) $+ ): Error, Cannot use that IP Address! | return }
  34.  
  35.     var %ip = $2
  36.  
  37.     scan_ip $chan $nick 0 %ip
  38.  
  39.     return
  40.   }
  41. }
  42.  
  43. raw 340:*: {
  44.   var %n = $remove($gettok($2,1,61),*)
  45.   var %h = $gettok($2,2,64)
  46.  
  47.   if (%n) && (%h) && ($istok(%userip_nicks,%n,32)) && (%userip_other) {
  48.     haltdef
  49.  
  50.     set -e %userip_nicks $remtok(%userip_nicks,%n,1,32)
  51.  
  52.     scan_ip %userip_other %n %h
  53.   }
  54. }
  55.  
  56. alias -l scan_ip {
  57.   if (!$1) && (!$2) { return }
  58.   if (!$check_ipv4($4)) && (!$check_ipv6($4)) { return }
  59.   if ($4 == 127.0.0.1) { msg $1 ( $+ $bold($2) $+ ): Error, Cannot scan $4 IP Address! | return }
  60.  
  61.   var %v = IP_LOOKUP_ $+ $rand(1,10000000000)
  62.   var %u = https://proxycheck.io/v2/ $+ $4 $+ ?key= $+ $key $+ &vpn=1&asn=1&inf=1&risk=2&port=1
  63.  
  64.   JSONOpen -ud %v %u
  65.   if ($jsonerror) { msg $1 ( $+ $bold($2) $+ ): There was a connection problem while trying to connect to the server! - Error Details: $bold($jsonerror) | return }
  66.  
  67.   var %status = $json(%v,status).value
  68.   var %message = $json(%v,message).value
  69.  
  70.   if (%status !== ok) && (%message) { msg $1 ( $+ $bold($2) $+ ): There was a parsing problem while trying to parse the data from the server! - IP: $bold($4) - Error Details: $bold(%message) | return }
  71.  
  72.   var %asn = $json(%v,$4,asn).value
  73.   var %isp = $json(%v,$4,provider).value
  74.   var %proxy = $json(%v,$4,proxy).value
  75.   var %proxy_type = $json(%v,$4,type).value
  76.   var %country = $json(%v,$4,country).value
  77.   var %country_code = $json(%v,$4,isocode).value
  78.   var %score = $json(%v,$4,risk).value
  79.  
  80.   if (%proxy == yes) { var %proxy = $bold(3Yes) }
  81.   if (%proxy == no) { var %proxy = $bold(4No) }
  82.  
  83.   msg $1 ( $+ $bold($2) $+ ): $iif($3,Nickname: $bold($3) $chr(124)) IP address: $bold($4) $chr(124) Location: $bold(%country) ( $+ $bold(%country_code) $+ ) $chr(124) ASN: $bold(%isp %asn) $chr(124) Proxy: $iif(%proxy,$v1,N/A) $iif(%proxy_type,$chr(124) Proxy Type:13 $bold(%proxy_type) $+ ) $chr(124) Score: $bold(%score)
  84. }
  85.  
  86. alias -l key {
  87.   if (!%ip_key) { set %ip_key 1 }
  88.  
  89.   var %keys = 104514-018k09-639675-705hpf,0084o0-629mo0-81822l-493836
  90.   var %key = $gettok(%keys,%ip_key,44)
  91.  
  92.   if (%ip_key == $numtok(%keys,44)) { set %ip_key 1 }
  93.   else { inc %ip_key 1 }
  94.  
  95.   if (%key) { return %key }
  96.   else { return 0 }
  97. }
  98.  
  99. alias -l bold { return $+($chr(2),$1-,$chr(2)) }
  100. alias -l check_ipv4 {
  101.   if (!$1) { return 0 }
  102.  
  103.   if ($regex($1,/^(\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})$/Sx)) && ($iptype($1) == ipv4) { return 1 }
  104.  
  105.   return 0
  106. }
  107. alias -l check_ipv6 {
  108.   if (!$1) { return 0 }
  109.  
  110.   if ($regex($1,/(fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|2[0-4][0-9]|1{0,1}[0-9]{0,1}[0-9])\.{3,3})(25[0-5]|2[0-4][0-9]|1{0,1}[0-9]{0,1}[0-9])|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|2[0-4][0-9]|1{0,1}[0-9]{0,1}[0-9])\.{3,3})(25[0-5]|2[0-4][0-9]|1{0,1}[0-9]{0,1}[0-9])|:((:[0-9a-fA-F]{1,4}){1,7}|:))/iD)) && ($iptype($1) == ipv6) { return 1 }
  111.  
  112.   return 0
  113. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement