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 == $chan) {
- var %t = $nick($chan,0)
- var %i = 1
- while (%i <= %t) {
- var %n = $nick($chan,%i)
- if (%n == $me) || (%n == $nick) { goto next }
- var %total = $calc(%total +1)
- set -e %userip_other $chan $nick
- set -e %userip_nicks $addtok(%userip_nicks,%n,32)
- userip %n
- :next
- inc %i
- }
- if (!%total) { msg $chan ( $+ $bold($nick) $+ ): Error, Too few nicknames to scan the channel! | return }
- return
- }
- if ($2 ison $chan) { set -e %userip_other $chan $nick | set -e %userip_nicks $addtok(%userip_nicks,$2,32) | userip $2 | return }
- if ($2 !ison $chan) {
- if (!$check_ipv4($2)) && (!$check_ipv6($2)) { msg $chan ( $+ $bold($nick) $+ ): Error, Incorrect IP Address! | return }
- if ($2 == 127.0.0.1) { msg $chan ( $+ $bold($nick) $+ ): Error, Cannot use that IP Address! | return }
- var %ip = $2
- scan_ip $chan $nick 0 %ip
- return
- }
- }
- raw 340:*: {
- var %n = $remove($gettok($2,1,61),*)
- var %h = $gettok($2,2,64)
- if (%n) && (%h) && ($istok(%userip_nicks,%n,32)) && (%userip_other) {
- haltdef
- set -e %userip_nicks $remtok(%userip_nicks,%n,1,32)
- scan_ip %userip_other %n %h
- }
- }
- alias -l scan_ip {
- if (!$1) && (!$2) { return }
- if (!$check_ipv4($4)) && (!$check_ipv6($4)) { return }
- if ($4 == 127.0.0.1) { msg $1 ( $+ $bold($2) $+ ): Error, Cannot scan $4 IP Address! | return }
- var %v = IP_LOOKUP_ $+ $rand(1,10000000000)
- var %u = https://proxycheck.io/v2/ $+ $4 $+ ?key= $+ $key $+ &vpn=1&asn=1&inf=1&risk=2&port=1
- JSONOpen -ud %v %u
- if ($jsonerror) { msg $1 ( $+ $bold($2) $+ ): 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 $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 }
- var %asn = $json(%v,$4,asn).value
- var %isp = $json(%v,$4,provider).value
- var %proxy = $json(%v,$4,proxy).value
- var %proxy_type = $json(%v,$4,type).value
- var %country = $json(%v,$4,country).value
- var %country_code = $json(%v,$4,isocode).value
- var %score = $json(%v,$4,risk).value
- if (%proxy == yes) { var %proxy = $bold(3Yes) }
- if (%proxy == no) { var %proxy = $bold(4No) }
- 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)
- }
- alias -l key {
- if (!%ip_key) { set %ip_key 1 }
- var %keys = 104514-018k09-639675-705hpf,0084o0-629mo0-81822l-493836
- 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