Advertisement
westor

Country Ban and Info for Debian v7.2

Aug 19th, 2018
446
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 13.42 KB | None | 1 0
  1. menu status,channel,query  {
  2.   GLINE PROXY ON CONNECT (is $+ $chr(58) $iif(%glineproxy_onconnect,ON,OFF) $+ )
  3.   .On: { set %glineproxy_onconnect 1 | .echo -a 4* GLINE PROXY ON CONNECT -> ON * }
  4.   .Off: { set %glineproxy_onconnect 0 | .echo -a 4* GLINE PROXY ON CONNECT -> OFF * }
  5. }
  6.  
  7. menu status,channel,query  {
  8.   GLINE PROXY ON JOIN (is $+ $chr(58) $iif(%glineproxy_onjoin,ON,OFF) $+ )
  9.   .On: { set %glineproxy_onjoin 1 | .echo -a 4* GLINE PROXY ON JOIN -> ON * }
  10.   .Off: { set %glineproxy_onjoin 0 | .echo -a 4* GLINE PROXY ON JOIN -> OFF * }
  11. }
  12.  
  13. ON ^*:SNOTICE:*: {
  14.   tokenize 32 $strip($1-)
  15.   var %nick = $4
  16.   var %addr = $remove($5,$chr(40),$chr(41))
  17.   var %ip = $remove($6,[,])
  18.   var %country_code = $upper($gettok(%addr,$numtok(%addr,46),46))
  19.  
  20.   if (clients isin $7) { var %local = 1 }
  21.   if ($7 == [secure) { var %ssl = 1 }
  22.   if ($8 == [secure) { var %ssl = 1 }
  23.  
  24.   if (*Client connecting* iswm $1-) {
  25.     haltdef
  26.     if (!$hget(CONNECTS)) { hmake CONNECTS 10000 }
  27.  
  28.     if (%glineproxy_onconnect) && (!$ulist(%ip,exemp,1)) { var %gline = 1 }
  29.     if (%glineproxy_onconnect) && (%country_code isletter) && (!$ulist(%country_code,country,1)) { var %gline = 2 }
  30.  
  31.     if (%gline) {
  32.       .quote zline *@ $+ %ip 1m : 6Defense Security Service Of Intelligence
  33.       window -e @CONNECTING
  34.       echo -t @CONNECTING 10-- Client 10[ 4G-Line 10] 10due4 $iif(%local,local,remote) 10connecting4 %nick $+ 5 %addr 10(4 $+ %ip $+ 10 ) $iif(%ssl,10SSL4 Yes) 10from4 $iif(%country_code isletter,$v1,N/A)
  35.       return
  36.     }
  37.  
  38.     hadd CONNECTS %nick %addr %ip $iif(%local,local,remote) $iif(%ssl,1,0)
  39.     .timer[SCAN_ $+ %nick $+ _INFO] -h 1 1000 scan_info %nick
  40.   }
  41.   if (*Client exiting* iswm $1-) {
  42.     haltdef
  43.     .timer[SCAN_ $+ %nick $+ _INFO] off
  44.     .timer[SCAN_ $+ %nick $+ _JOIN] off
  45.  
  46.     if ($hget(CONNECTS,%nick)) { hdel CONNECTS %nick }
  47.     if ($hget(CONNECTS_INFO,%nick)) { hdel CONNECTS_INFO %nick }
  48.   }
  49.   if (*has changed their nickname* iswm $1-) {
  50.     haltdef
  51.     .timer[SCAN_ $+ $2 $+ _INFO] off
  52.  
  53.     hadd CONNECTS $9 $hget(CONNECTS,$2)
  54.     hdel CONNECTS $2
  55.     .timer[SCAN_ $+ $9 $+ _INFO] -h 1 1000 scan_info $9
  56.   }
  57.   if (*Z:Line added for* iswm $1-) && ($me isin $14) { haltdef }
  58. }
  59.  
  60. alias scan_info {
  61.   if (!$1) && (!$hget(CONNECTS,$1)) { return }
  62.  
  63.   var %nick = $1
  64.   var %ip = $gettok($hget(CONNECTS,%nick),2,32)
  65.   var %addr = $gettok($hget(CONNECTS,%nick),1,32)
  66.   var %type = $gettok($hget(CONNECTS,%nick),3,32)
  67.   var %ssl = $gettok($hget(CONNECTS,%nick),4,32)
  68.  
  69.   var %r = $rand(1,6)
  70.   if (%r == 1) { var %k = 972177-6h3592-vt5423-w27057 }
  71.   if (%r == 2) { var %k = f23321-120875-493f81-352158 }
  72.   if (%r == 3) { var %k = 589h35-9u8361-736n38-10hj05 }
  73.   if (%r == 4) { var %k = 326620-r6co92-4j2g0r-93784p }
  74.   if (%r == 5) { var %k = x46397-z46706-b39969-135l05 }
  75.   if (%r == 6) { var %k = 2396u4-056176-691304-1s3197 }
  76.  
  77.   var %v1 = scaninfo1_ $+ $ticks $+ _ $+ $md5(%nick)
  78.  
  79.   JSONOpen -u %v1 https://proxycheck.io/v2/ $+ %ip $+ ?key= $+ %k $+ &vpn=1&asn=1&time=1&inf=1&days=7
  80.   if ($JSONError) { JSONClose %v1 | goto next_2 }
  81.  
  82.   var %country_name = $json(%v1,%ip,country).value
  83.   var %country_code = $json(%v1,%ip,isocode).value
  84.   var %proxy = $json(%v1,%ip,proxy).value
  85.  
  86.   JSONClose %v1
  87.  
  88.   if (%proxy !== yes) { var %proxy = 0 }
  89.   elseif (%proxy == yes) { var %proxy = 1 }
  90.  
  91.   if (%proxy !== $null) && (%country_name) && (%country_code) { goto save }
  92.  
  93.   :next_2
  94.  
  95.   var %r = $rand(1,2)
  96.   if (%r == 1) { var %k = Mjk1NDpadFdlVk02QUp2eWgybFFFNk4xREl5WTlHOTc2dFJ5Vg== }
  97.   if (%r == 2) { var %k = Mjk1NTpYRnpLdFhlQ2dGYmdSanBvRzBWaHp5dG1ZR3JLYlZ0eQ== }
  98.  
  99.   var %v2 = scaninfo2_ $+ $ticks $+ _ $+ $md5(%nick)
  100.  
  101.   JSONOpen -uw %v2 http://v2.api.iphub.info/ip/ $+ %ip
  102.   if ($JSONError) { JSONClose %v2 | goto next_3 }
  103.   JSONHttpHeader %v2 X-Key %k
  104.   JSONHttpFetch %v2
  105.   if ($JSONError) { JSONClose %v2 | goto next_3 }
  106.  
  107.   var %proxy = $json(%v2,block).value
  108.   var %country_name = $json(%v2,countryName).value
  109.   var %country_code = $json(%v2,countryCode).value
  110.  
  111.   JSONClose %v2
  112.  
  113.   if (%proxy) && (%country_name) && (%country_code) { goto save }
  114.  
  115.   :next_3
  116.  
  117.   var %r = $rand(1,5)
  118.   if (%r == 1) { var %k = rkyn3BuN4AiRRGbcrjNiRMNypuSkPLtu }
  119.   if (%r == 2) { var %k = 2fsQsrrmLzay2zwAq7ruNNOAbsj0345x }
  120.   if (%r == 3) { var %k = 5mrz0QQcX5mJ2hSfS1BCxYBB7kyGcrF4 }
  121.   if (%r == 4) { var %k = I3K5eOA4SemTYOpccmEU9o4HwGt2BWS4 }
  122.   if (%r == 5) { var %k = GgxSzAXDadyNjlFqBB5GbTfaFdoorjU2 }
  123.  
  124.   var %v3 = scaninfo3_ $+ $ticks $+ _ $+ $md5(%nick)
  125.  
  126.   JSONOpen -u %v3 https://ipqualityscore.com/api/json/ip/ $+ %k $+ / $+ %ip $+ ?strictness=1
  127.   if ($JSONError) { JSONClose %v3 | return }
  128.  
  129.   var %proxy = $json(%v3,proxy).value
  130.   var %country_name = $json(%v3,region).value
  131.   var %country_code = $json(%v3,country_code).value
  132.  
  133.   JSONClose %v3
  134.  
  135.   :save
  136.  
  137.   if (!$hget(CONNECTS_INFO)) { hmake CONNECTS_INFO 10000 }
  138.   hadd CONNECTS_INFO %nick %proxy $iif(%country_code,$v1,N/A) $iif(%country_name,$v1,N/A)
  139.  
  140.   window -e @CONNECTING
  141.  
  142.   if (%glineproxy_onconnect) && (!$ulist(%ip,exemp,1)) { var %gline = 1 }
  143.   if (%glineproxy_onconnect) && (%country_code isletter) && (!$ulist(%country_code,country,1)) { var %gline = 2 }
  144.  
  145.   if (%gline) {
  146.     .quote zline *@ $+ %ip 1m : 6Defense Security Service Of Intelligence
  147.     echo -t @CONNECTING 10-- Client 10[ 4G-Line 10] 10due4 %type 10connecting4 %nick $+ 5 %addr 10(4 $+ %ip $+ 10 ) $iif(%ssl,10SSL4 Yes) 10from4 $iif(%country_code isletter,$v1,N/A)
  148.   }
  149.   else { echo -t @CONNECTING 10-- Client4 %type 10connecting4 %nick $+ 5 %addr 10(4 $+ %ip $+ 10) $iif(%ssl,10SSL4 Yes) 10from4 $iif(%country_code isletter,$v1,N/A) }
  150. }
  151.  
  152. ON ^!*:JOIN:#: {
  153.   haltdef
  154.   var %con_info = $hget(CONNECTS,$nick)
  155.   var %con_extra_info = $hget(CONNECTS_INFO,$nick)
  156.  
  157.   var %ip = $gettok(%con_info,2,32)
  158.   var %addr = $gettok(%con_info,1,32)
  159.   var %ssl = $gettok(%con_info,4,32)
  160.   var %proxy = $gettok(%con_extra_info,1,32)
  161.   var %country_name = $gettok(%con_extra_info,3,32)
  162.   var %country_code = $gettok(%con_extra_info,2,32)
  163.  
  164.   if (!%country_code) { .timer[SCAN_ $+ $nick $+ _JOIN] -h 1 1000 join_rescan $nick }
  165.  
  166.   var %clones = $ial(*@ $+ $gettok(%addr,2,64) $+ ,0)
  167.   if (%clones == 1) || (%clones == 0) { unset %clones }
  168.  
  169.   if (!%clones) { var %clones = $ial(*@ $+ $gettok($address($nick,0),2,64) $+ ,0) }
  170.   if (%clones == 1) || (%clones == 0) { unset %clones }
  171.  
  172.   if (%addr) { echo -tc join $chan * $iif(%clones,Joins4 $ord(%clones) clone:,Joins:) $nick ( $+ $gettok($address($nick,0),2,33) $+ ) 5 $+ $gettok(%addr,2,64) [7 $+ %ip $+ ] $iif(%ssl,with 13SSL) $iif(%country_name && %country_code,4 $+ %country_name $+  (4 $+ %country_code $+ )) }
  173.   else { echo -tc join $chan * $iif(%clones,Joins4 $ord(%clones) clone:,Joins:) $nick ( $+ $gettok($address($nick,0),2,33) $+ ) }
  174.  
  175.   if (%glineproxy_onjoin) && (%proxy) && (%ip) && (%country_code) && (!$ulist(%ip,exemp,1)) { var %gline = 1 }
  176.   if (%glineproxy_onjoin) && (%proxy) && (%ip) && (%country_code) && (!$ulist(%country_code,country,1)) { var %gline = 2 }
  177.  
  178.   if (%gline) {
  179.   .quote zline *@ $+ %ip 1m 5Defense Security Service Of Intelligence 4: 6IP Juaj $3 U Kap Si 4PROXY5/4SOCK5/4VPN }
  180. }
  181.  
  182. alias join_rescan {
  183.   if (!$1) { return }
  184.   var %con_info = $hget(CONNECTS,$1)
  185.   var %con_extra_info = $hget(CONNECTS_INFO,$1)
  186.  
  187.   var %ip = $gettok(%con_info,2,32)
  188.   var %proxy = $gettok(%con_extra_info,1,32)
  189.   var %country_code = $gettok(%con_extra_info,2,32)
  190.  
  191.   if (%glineproxy_onjoin) && (%proxy) && (%ip) && (%country_code) && (!$ulist(%ip,exemp,1)) { var %gline = 1 }
  192.   if (%glineproxy_onjoin) && (%proxy) && (%ip) && (%country_code) && (!$ulist(%country_code,country,1)) { var %gline = 2 }
  193.  
  194.   if (%gline) {
  195.   .quote zline *@ $+ %ip 1m 5Defense Security Service Of Intelligence 4: 6IP Juaj $3 U Kap Si 4PROXY5/4SOCK5/4VPN }
  196. }
  197.  
  198. raw 311:*: {
  199.   haltdef
  200.   if (%banchan) && ($2 == $gettok(%banchan,1,32)) && ($me ison $gettok(%banchan,2,32)) && ($me isop $gettok(%banchan,2,32)) && (*mibbit.com* !iswm $6-) && (*Bisedo.com* !iswm $6-) && (*Nastradini.com* !iswm $6-) && (*Kupidi.com* !iswm $6-) {
  201.     mode $gettok(%banchan,2,32) +b ~r:* $+ $replace($6-,$chr(32),_) $+ *
  202.     halt
  203.   }
  204.   window -e @WHOIS
  205.   linesep @WHOIS
  206.   echo -t @WHOIS 10:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-[4WHOIS10]-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
  207.   echo -t @WHOIS  $+ $2 is $wraw_col($3 $+ @ $+ $4-5)
  208.   echo -t @WHOIS Realname4: 10 $+ $6-
  209. }
  210.  
  211. raw 379:*: {
  212.   haltdef
  213.   if ($gettok(%banchan,1,32) == $2) { halt }
  214.   echo -t @WHOIS  $+ $2 $+  $wraw_col($3-)
  215. }
  216.  
  217. raw 378:*: {
  218.   haltdef
  219.   if ($gettok(%banchan,1,32) == $2) { halt }
  220.  
  221.   var %con_extra_info = $hget(CONNECTS_INFO,$2)
  222.  
  223.   var %addr = $gettok($hget(CONNECTS,$2),1,32)
  224.   var %proxy = $gettok(%con_extra_info,1,32)
  225.   var %country_name = $gettok(%con_extra_info,3,32)
  226.   var %country_code = $gettok(%con_extra_info,2,32)
  227.  
  228.   var %clones = $ial(*@ $+ $gettok(%addr,2,64) $+ ,0)
  229.   if (%clones == 1) || (%clones == 0) { unset %clones }
  230.  
  231.   if (!%clones) { var %clones = $ial(*@ $+ $gettok($address($2,0),2,64) $+ ,0) }
  232.   if (%clones == 1) || (%clones == 0) { unset %clones }
  233.  
  234.   echo -t @WHOIS  $+ $2 $+  $wraw_col($3- $iif(%proxy,$chr(40) $+ OPEN PROXY $+ $chr(41)))
  235.   echo -t @WHOIS  $+ $2 is also connected $iif(%proxy,with proxy) $wraw_col(from %country_name ( $+ %country_code $+ ))
  236.   if (%clones) { echo -t @WHOIS  $+ $2 has also %clones clones connected on the network. }
  237. }
  238.  
  239. raw 307:*: {
  240.   haltdef
  241.   if ($gettok(%banchan,1,32) == $2) { halt }
  242.   echo -t @WHOIS  $+ $2  $+ $3-
  243. }
  244.  
  245. raw 319:*: {
  246.   haltdef
  247.   if ($gettok(%banchan,1,32) == $2) { halt }
  248.   echo -t @WHOIS  $+ $2  $+ on $wraw_common_chans($3-)
  249. }
  250.  
  251. raw 312:*: {
  252.   haltdef
  253.   if ($gettok(%banchan,1,32) == $2) { halt }
  254.   echo -t @WHOIS  $+ $2  $+ using $wraw_col($3) $4-
  255. }
  256.  
  257. raw 313:*: {
  258.   haltdef
  259.   if ($gettok(%banchan,1,32) == $2) { halt }
  260.   echo -t @WHOIS  $+ $2  $+ $wraw_col($3-)
  261. }
  262.  
  263. raw 301:*: {
  264.   haltdef
  265.   if ($gettok(%banchan,1,32) == $2) { halt }
  266.   echo -t @WHOIS  $+ $2  $+ is away: $3-
  267. }
  268.  
  269. raw 671:*: {
  270.   haltdef
  271.   if ($gettok(%banchan,1,32) == $2) { halt }
  272.   echo -t @WHOIS  $+ $2  $+ $wraw_col($3- $chr(40) $+ SSL $+ $chr(41) $+ ))
  273. }
  274.  
  275. raw 320:*: {
  276.   haltdef
  277.   if ($gettok(%banchan,1,32) == $2) { halt }
  278.   echo -t @WHOIS  $+ $2  $+ $3-
  279. }
  280.  
  281. raw 330:*: {
  282.   haltdef
  283.   if ($gettok(%banchan,1,32) == $2) { halt }
  284.   echo -t @WHOIS  $+ $2  $+ $5- $3
  285. }
  286.  
  287. raw 276:*: {
  288.   haltdef
  289.   if ($gettok(%banchan,1,32) == $2) { halt }
  290.   echo -t @WHOIS  $+ $2 $+  $right($3-,-1)
  291. }
  292.  
  293. raw 335:*: {
  294.   haltdef
  295.   if ($gettok(%banchan,1,32) == $2) { halt }
  296.   echo -t @WHOIS  $+ $2 $+  $wraw_col($3-5 $chr(40) $+ +B $+ $chr(41) $6-)
  297. }
  298. raw 317:*: {
  299.   haltdef
  300.   if ($gettok(%banchan,1,32) == $2) { halt }
  301.   echo -t @WHOIS 10 $+ Entered4:10 $asctime($4,dddd dd/mm/yyyy HH:nn:ss)  
  302.   echo -t @WHOIS 10 $+ Idle Time4: 10 $duration($3)  $3
  303.   echo -t @WHOIS 10 $+ Online Time4: 10 $duration($calc($ctime - $4))
  304.  
  305. }
  306.  
  307. raw 318:*: {
  308.   haltdef
  309.   if ($gettok(%banchan,1,32) == $2) { unset %banchan | halt }
  310.   if ($ial($address($2,2),0) > 1) echo -t @WHOIS 4>> $+ 10Eshte Ne te Njejten Adrese Me Nick : 7(4 $gettok($ial($address($2,2),1),1,33) $gettok($ial($address($2,2),2),1,33) $gettok($ial($address($2,2),3),1,33) $gettok($ial($address($2,2),4),1,33) $gettok($ial($address($2,2),5),1,33) $gettok($ial($address($2,2),6),1,33) $gettok($ial($address($2,2),7),1,33) 7)
  311.   echo -t @WHOIS 10:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:[4END10]-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
  312.   window -a @WHOIS
  313.   linesep @WHOIS
  314. }
  315.  
  316. raw 310:*: {
  317.   haltdef
  318.   if ($gettok(%banchan,1,32) == $2) { halt }
  319. }
  320.  
  321. alias wraw_col {
  322.   if (!$1) { return }
  323.   return $replace($1-,.,$+($chr(3),4.,$chr(3),$chr(2),$chr(2)),@,$+($chr(3),4@,$chr(3),$chr(2),$chr(2)),~,$+($chr(3),4~,$chr(3),$chr(2),$chr(2)),*,$+($chr(3),4*,$chr(3),$chr(2),$chr(2)),$chr(40),$+($chr(3),4,$chr(40),$chr(3),$chr(2),$chr(2)),$chr(41),$+($chr(3),4,$chr(41),$chr(3),$chr(2),$chr(2)),!,$+($chr(3),4!,$chr(3),$chr(2),$chr(2)),^,$+($chr(3),4^,$chr(3),$chr(2),$chr(2)),&,$+($chr(3),4&,$chr(3),$chr(2),$chr(2)),_,$+($chr(3),4_,$chr(3),$chr(2),$chr(2)),-,$+($chr(3),4-,$chr(3),$chr(2),$chr(2)),+,$+($chr(3),4+,$chr(3),$chr(2),$chr(2)),=,$+($chr(3),4=,$chr(3),$chr(2),$chr(2)),\,$+($chr(3),4\,$chr(3),$chr(2),$chr(2)),|,$+($chr(3),4|,$chr(3),$chr(2),$chr(2)),$chr(35),$+($chr(3),4#,$chr(3),$chr(2),$chr(2)),$chr(36),$+($chr(3),4$,$chr(3),$chr(2),$chr(2)),%,$+($chr(3),4%,$chr(3),$chr(2),$chr(2)),[,$+($chr(3),4[,$chr(3),$chr(2),$chr(2)),],$+($chr(3),4],$chr(3),$chr(2),$chr(2)),`,$+($chr(3),4`,$chr(3),$chr(2),$chr(2)),:,$+($chr(3),4:,$chr(3),$chr(2),$chr(2)),;,$+($chr(3),4;,$chr(3),$chr(2),$chr(2)),",$+($chr(3),4",$chr(3),$chr(2),$chr(2)),',$+($chr(3),4',$chr(3),$chr(2),$chr(2)),<,$+($chr(3),4<,$chr(3),$chr(2),$chr(2)),>,$+($chr(3),4>,$chr(3),$chr(2),$chr(2)),$chr(44),$+($chr(3),4 $+ $chr(44),$chr(3),$chr(2),$chr(2)),?,$+($chr(3),4?,$chr(3),$chr(2),$chr(2)),/,$+($chr(3),4/,$chr(3),$chr(2),$chr(2)),$chr(123),$+($chr(3),4{,$chr(3),$chr(2),$chr(2)),$chr(125),$+($chr(3),4},$chr(3),$chr(2),$chr(2)))
  324. }
  325.  
  326. alias wraw_common_chans {
  327.   if (!$1-) { return }
  328.   var %old = $wraw_col($1-)
  329.   var %t = $numtok(%old,32)
  330.   var %i = 1
  331.   while (%i <= %t) {
  332.     var %c = $gettok(%old,%i,32)
  333.     if (%c) && ($me ison $strip($remove(%c,~,@,%,&,+,!))) { var %old = $replacecs(%old,%c,$chr(2) $+ %c $+ $chr(2)) }
  334.     inc %i
  335.   }
  336.   return $iif(%tot,$v1,%old)
  337. }
  338.  
  339. ON *:OPEN:?:*: { whois $nick }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement