westor

Manually Proxy Checker for psycho v1.0

Jan 28th, 2021 (edited)
580
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 4.67 KB | None | 0 0
  1. ON @*:TEXT:!ip *:#: {
  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) && (!$check_ipv4($2)) && (!$check_ipv6($2)) && (*.* iswm $2) {
  32.     set -eu60 %ipdns $nick $chan $2
  33.  
  34.     .dns -c $2
  35.  
  36.     return
  37.   }
  38.  
  39.   if ($check_ipv4($2)) || ($check_ipv6($2)) {
  40.     if (!$check_ipv4($2)) && (!$check_ipv6($2)) { msg $chan ( $+ $bold($nick) $+ ): Error, Incorrect IP Address! | return }
  41.     if ($2 == 127.0.0.1) { msg $chan ( $+ $bold($nick) $+ ): Error, Cannot use that IP Address! | return }
  42.  
  43.     var %ip = $2
  44.  
  45.     scan_ip $chan $nick 0 %ip
  46.  
  47.     return
  48.   }
  49. }
  50.  
  51. ON *:DNS: {
  52.   if (!%ipdns) { return }
  53.  
  54.   var %n = $gettok(%ipdns,1,32)
  55.   var %c = $gettok(%ipdns,2,32)
  56.   var %i = $gettok(%ipdns,3,32)
  57.  
  58.   if (!$dns(0)) { msg %c ( $+ %n $+ ): Could NOT resolve $bold(%i) hostname! | unset %ipdns | return }
  59.  
  60.   var %r = $dns(1).ip
  61.  
  62.   if (%r) { scan_ip %c %n 0 %r }
  63.  
  64.   unset %ipdns
  65. }
  66.  
  67. raw 340:*: {
  68.   var %n = $remove($gettok($2,1,61),*)
  69.   var %h = $gettok($2,2,64)
  70.  
  71.   if (%n) && (%h) && ($istok(%userip_nicks,%n,32)) && (%userip_other) {
  72.     haltdef
  73.  
  74.     set -e %userip_nicks $remtok(%userip_nicks,%n,1,32)
  75.  
  76.     scan_ip %userip_other %n %h
  77.   }
  78. }
  79.  
  80. alias -l scan_ip {
  81.   if (!$1) && (!$2) { return }
  82.   if (!$check_ipv4($4)) && (!$check_ipv6($4)) { return }
  83.   if ($4 == 127.0.0.1) { msg $1 ( $+ $bold($2) $+ ): Error, Cannot scan $4 IP Address! | return }
  84.  
  85.   var %v = IP_LOOKUP_ $+ $rand(1,10000000000)
  86.   var %u = https://proxycheck.io/v2/ $+ $4 $+ ?key= $+ $key $+ &vpn=1&asn=1&inf=1&risk=2&port=1
  87.  
  88.   JSONOpen -ud %v %u
  89.   if ($jsonerror) { msg $1 ( $+ $bold($2) $+ ): There was a connection problem while trying to connect to the server! - Error Details: $bold($jsonerror) | return }
  90.  
  91.   var %status = $json(%v,status).value
  92.   var %message = $json(%v,message).value
  93.  
  94.   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 }
  95.  
  96.   var %asn = $json(%v,$4,asn).value
  97.   var %isp = $json(%v,$4,provider).value
  98.   var %proxy = $json(%v,$4,proxy).value
  99.   var %proxy_type = $json(%v,$4,type).value
  100.   var %country = $json(%v,$4,country).value
  101.   var %country_code = $json(%v,$4,isocode).value
  102.   var %score = $json(%v,$4,risk).value
  103.  
  104.   if (%proxy == yes) { var %proxy = $bold(3Yes) }
  105.   if (%proxy == no) { var %proxy = $bold(4No) }
  106.  
  107.   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)
  108. }
  109.  
  110. alias -l key {
  111.   if (!%ip_key) { set %ip_key 1 }
  112.  
  113.   var %keys = 104514-018k09-639675-705hpf,0084o0-629mo0-81822l-493836
  114.   var %key = $gettok(%keys,%ip_key,44)
  115.  
  116.   if (%ip_key == $numtok(%keys,44)) { set %ip_key 1 }
  117.   else { inc %ip_key 1 }
  118.  
  119.   if (%key) { return %key }
  120.   else { return 0 }
  121. }
  122.  
  123. alias -l bold { return $+($chr(2),$1-,$chr(2)) }
  124. alias -l check_ipv4 {
  125.   if (!$1) { return 0 }
  126.  
  127.   if ($regex($1,/^(\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})$/Sx)) && ($iptype($1) == ipv4) { return 1 }
  128.  
  129.   return 0
  130. }
  131. alias -l check_ipv6 {
  132.   if (!$1) { return 0 }
  133.  
  134.   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 }
  135.  
  136.   return 0
  137. }
  138.  
Add Comment
Please, Sign In to add comment