Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ON @*:TEXT:!ip *:#msl: {
- if ($nick !isop $chan) { msg $chan ( $+ $bold($nick) $+ ): Error, Access Denied! | return }
- if ($2 ison $chan) {
- .ialfill $chan
- var %ip = $ial($2).host
- var %nick = $2
- if (!%ip) { msg $chan ( $+ $bold($nick) $+ ): There was an error while trying to retrieve the user IP Address! | return }
- if (!$check_ipv4(%ip)) && (!$check_ipv6(%ip)) { msg $chan ( $+ $bold($nick) $+ ): Incorrect user IP Address type! | return }
- goto scan
- }
- var %ip = $2
- if (!$check_ipv4(%ip)) && (!$check_ipv6(%ip)) { msg $chan ( $+ $bold($nick) $+ ): Error, Incorrect IP Address! | return }
- :scan
- var %v = IP_LOOKUP_ $+ $rand(1,10000000000)
- var %u = https://proxycheck.io/v2/ $+ %ip $+ ?key= $+ $key $+ &vpn=1&asn=1&inf=1&risk=2&port=1
- JSONOpen -ud %v %u
- if ($jsonerror) { msg $chan ( $+ $bold($nick) $+ ): There was a connection problem while trying to connect to the server! - Error Details: $bold($jsonerror) | return }
- var %status = $json(%v,status).value
- var %message = $json(%v,message).value
- if (%status !== ok) && (%message) { msg $chan ( $+ $bold($nick) $+ ): There was a parsing problem while trying to parse the data from the server! - Error Details: $bold(%message) | return }
- var %asn = $json(%v,%ip,asn).value
- var %isp = $json(%v,%ip,provider).value
- var %proxy = $json(%v,%ip,proxy).value
- var %proxy_type = $json(%v,%ip,type).value
- var %country = $json(%v,%ip,country).value
- var %country_code = $json(%v,%ip,isocode).value
- var %score = $json(%v,%ip,risk).value
- if (%proxy == yes) { var %proxy = $bold(3Yes) }
- if (%proxy == no) { var %proxy = $bold(4No) }
- msg $chan ( $+ $bold($nick) $+ ): $iif(%nick,Nickname: $bold(%nick) $chr(124)) IP address: $bold(%ip) $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)
- }
- alias -l key {
- if (!%ip_key) { set %ip_key 1 }
- var %keys = 104514-018k09-639675-705hpf
- var %key = $gettok(%keys,%ip_key,44)
- if (%ip_key == $numtok(%keys,44)) { set %ip_key 1 }
- else { inc %ip_key 1 }
- if (%key) { return %key }
- else { return 0 }
- }
- alias -l bold { return $+($chr(2),$1-,$chr(2)) }
- alias -l check_ipv4 {
- if (!$1) { return 0 }
- if ($regex($1,/^(\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})$/Sx)) && ($iptype($1) == ipv4) { return 1 }
- return 0
- }
- alias -l check_ipv6 {
- if (!$1) { return 0 }
- 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 }
- return 0
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement