# rct - Recode, Counter, Tracker # (C) 2002-2005 Lena@lena.kiev.ua # freeware for non-commercial use # version 3.53 December 6, 2022 BEGIN { $MainDomain = 'lena.kiev.ua'; $ParkedDomains = qr/(?:kcana\.kiev\.ua|leksen\.kiev\.ua|ksana\.org\.ua|sergej\.org\.ua)/i; $AllDomains = qr/(?:lena\.kiev\.ua|$ParkedDomains)/io; $root = '/home/cgi/data/www/lena.kiev.ua'; $from = "lena\@mail2ftp.heliohost.org"; # mailbox for error messages $to = "Lena\@lena.kiev.ua"; # address,address $sendmail = "/usr/sbin/sendmail -t -i -odb -oem -f$from"; $localproxy = '127.0.0.1'; # some webservers have a local proxy $blank = ''; # substitute for blank, must be in 0-31 (0-1F) range @hostnames_IP_needed = qw(.a2000.nl .emperion.net .dataforce.net .chello.nl .cetlink.net .omegaopt.ru .omegaguard.ru coollink.us .looksmart. exabot.com .FreeBit.NE.JP net-sweeper.com .dxi.net mobster.biz v0.valuehost.ru .webair.com virtuadome.com RIN dbsmarketing.net .hostmania.net .nwlink.com proxy.telecom.lt .valuehost.co.uk .bp13catv.broadband.hu membersgetit.com .creator.co.il .hrn.ru whitepine-ventures.com unleashed.net drd.ru hostland.ru 3fn.net .valuehost.ru websense.com .servershost.net .isi.edu group-it.com .net.upc.nl .nb.home.nl .adsl-surfen.hetnet.nl amatama. .excel.com irl-crawler.cs.tamu.edu cafe.tg hostersheaven.net hosting fish\d+.search.aol.com .pppool.de lucky-server.biz dns-cluster.net .red.bezeqint.net domainspa.com .adsl.wanadoo. merphy.demos.su .adsl.euronet.nl .home.nl hostbasket.com racknine.com jeteye.com .Stanford.EDU serverpronto.com surfcontrol.com hess.com .cable.casema.nl your-ideal.com .slu.edu .adsl.skynet.be vianw.pt claria.com infinitex.com securityspace.com .dial.sovam.com sms13.de starmp3.net .adsl.cybercity.dk .introweb.nl tuxdns.net .uni-regensburg.de offline.online.ee 2net.info .attens.net .kabel.telenet.be skulker.org .cable.quicknet.nl .burohappold.com .intercom.net.ua .saix.net .netscape.com .serverkompetenz.net .oz.net -ADSL.red.retevision.es wmd.rol.ru .skylogicnet.it spider.meta-ukraine.com .adscpm.com .ntli.net expressvu.ca .cs.tamu.edu .host150.netvision.net.il lomejordeinternet.net .steephost.com .cs.washington.edu); @banned_IPs = qw{4.38.109. 5.188.211. 12.148.196.(?:12[8-9]|1[3-9][0-9]|2[0-4][0-9]|25[0-5]) 12.148.209.(?:19[2-9]|2[0-4][0-9]|25[0-5]) 12.175.0.[34][0-9] 12.217.198.103 12.217.212.250 37.9.41. 38.112.195. 61.81.8.103 62.25.99.14$ 62.37.188.5$ 62.56.1(?:89|9[01]). 62.58.168.62 62.118.251.(?:16|30|67)$ 62.177.137.205 62.192.151.130 62.194.61.30 62.220.103.6$ 63.109.248. 63.148.99.2?:(2[4-9]|[3-4][0-9]|5[0-5]) 63.212.171.193 63.241.61.8$ 64.37.103.34 64.62.175.13[1-8] 64.124.150.52 64.124.222.166 64.140.49.6[6-9] 64.152.73.15 64.156.198. 64.162.116.132 64.246.0.17$ 64.251.30. 65.57.107.254 65.75.134.180 65.75.136.90 65.75.171.160 65.98.67.74 65.110.40.170 65.110.62.100 65.197.137.34 66.17.157.53 66.90.67.1[1-3]$ 66.98.190.93 66.98.196.94 66.132.132.63 66.178.(?:1?[0-9]|47|6[2-9]|[7-9][0-9]). 66.194.6. 66.207.120.2(?:2[4-9]|3[0-9]) 66.225.212.203 66.225.215.32 66.230.218. 66.232.(?:15|17|21). 66.237.60.109 67.15.12.50 66.17.15.130 67.18.251.186 67.19.73.154 67.19.116.146 68.8.156.89 68.145.120.207 69.20.9.236 69.28.58. 69.28.227.2[0-2][0-9] 69.31.79. 69.41.174.31 69.41.248.242 69.44.60.201 69.50.176.146 69.61.1[25].100 78.129.202.15$ 79.143.182.232 80.24.47.77 80.56.92.43 80.88.(?:12[89]|13[0-2689]|14[2-6]|15[024]). 80.98.113.95 80.179.(?:10[1-7]|2[45][0-9]). 80.201.27.145 80.202.228.57 80.247.1[34][0-9]. 80.248.(?:6[4-6]|70) 80.250.3[67]. 80.255.43. 81.13.8.94 81.58.46.74 81.91.2(?:27|3[2-5]). 81.199.(?:6|75|8[03-5]|93|10[458]|125). 81.241.234. 82.128.(?:[12]?[0-9]|3[01]). 82.137.161.2$ 82.146.40.32 84.80.39.6 84.233.148.(?:1?[0-9]|20)$ 109.251.74.148 123.125.69. 128.9.216.196 128.194.135.8[0-3] 128.242.197.101 146.185.234. 159.226.22. 162.208.49. 165.254.10. 168.187.120.163 173.240.49. 174.122.51.251 188.143.232. 192.116. 192.132.210. 193.108.209.234 193.219.234.165 193.219.248. 193.220.(?:26|50|127|178|188). 194.67.3.223 194.87.0.56 194.50.116. 194.131.98. 195.11.231.210 195.42.160.[1-2][0-9]$ 195.44.181.17$ 195.154.146.225 195.154.174.164 195.166.138. 195.166.2(?:2[4-9]|[3-5][0-9]). 195.228.227.12$ 196.40.(?:30|75). 196.201.(?:6[4-9]|7[0-3]). 198.54.202.115 198.64.140.108 198.65.155.205 200.193.24.18$ 202.101.180. 202.108. 202.155.195. 203.194.160. 205.209.188.20$ 207.202.170.3[4-9] 208.53.138. 208.80.19[2-9]. 210.82.95. 210.218.195.129 211.161.20. 211.234.112.191 212.22.90.220 212.24.149.10 212.45.4.(?:4[49]|5[0-5]) 212.52.1(?:39|5[36]). 212.98.161.170 212.123.6.7$ 212.165.132.(?:12[8-9]|1[3-9][0-9]|2[0-5][0-9]) 212.165.141.11$ 212.165.157. 212.199.251. 213.31.4[0-2]. 213.136.(?:9[67]|10[04-6]|11[56]|12[67]). 213.150.192. 213.154.[6-9][0-9]. 213.180.9.170 213.181.(?:6[46]|81). 213.185.1[01][0-9]. 213.234.252.35 213.255.(?:19[2-8]|211|254). 216.32.83.235 216.97.147.13 216.104.207.7$ 216.127.82.9[7-9] 216.139.1(?:76|8[0159]). 216.147.132.1(?:4[4-9]|5[0-9]) 216.185.5[7-9]. 216.189.30 216.248.177.131 217.10.169. 217.73.16[45]. 217.78.(?:6[4-9]|7[0-9]). 217.107.216. 217.116.48.132 217.177.15. 217.194.1(?:4[7-9]|5[4-7]). 218.0.72. 218.0.77. 218.6.8.17 218.12.182. 218.70.8[56]. 218.88.137. 219.112.7. 209.159.170.235 220.73.165.139 220.113.168. 221.12.(?:[89]|1[0-7])[0-9]. 221.148.44.[6-9][0-9] 222.182.}; @banned_user_agents = split( ' ', <<'EOB' ); ^.Browse\s ^.Eval ^.Surf .+Harvest \)\sXX$ 0\(compatible; autoemailspider Baiduspider Boston.Project compatible\s; \(compatible;.MSIE.6.0\)$ DTS.Agent efp\@gmx.net Email.Extractor eXtractor HTTrack LWP Mozilla\/4.0.\(http:\/\/www.fast-search-engine.com\/\) MSIE.4.0;.Windows.NT.5.1; MSIE.4.5;.Windows MSIE.5.00;\) \(NaverRobot\) prospector robot\@monkia.com.tw;\+http:\/\/gais.cs.ccu.edu.tw\/robot Sosospider statcrawler www.aihit.com www.puritysearch.net www.sitebot.org ^\w{21,}$ ^[a-z]{12,}$ ^ANT.Chassis ^ASSORT ^attache ^ATHENS ^autohttp ^Baiduspider ^bew ^booch ^Brick.House.Browse ^Bridgetown\sLabs ^Bullseye ^CherryPicker ^China.Local.Browse ^combine ^CosmixCrawler ^Cowbot ^Crescent ^cURL ^curl ^Demo\sBot ^devsoft's\shttp\scomponent\sv1\.0 ^Deweb ^Digger ^Digimarc ^DIIbot ^disco ^DISCoFinder ^ecollector ^Educate\sSearch ^EmailCollector ^EmailSiphon ^EmailWolf ^EO\sBrowse ^ExtractorPro ^fastlwspider ^FEZhead ^Fetch ^First.Browse.of ^Franklin.(?:Locator|Box) ^Full\sWeb\sBot ^Gaisbot ^Generic$ ^Getleft ^GetURL ^GetWebPage ^go-ahead-got-it ^Green.Research,.Inc. ^Holiday.Shopping,.Inc ^ia_archiver ^IBM_Planetwide ^icsbot ^IE\/ ^IE.\d.\d.Compatible.*Browser$ ^Illinois.State.Tech.Labs$ ^IncyWincy ^Indiana.U.Web ^Industry\sProgram ^Inter-Coastal.Info.Server ^Internet\sExplore\s5.x ^ISC.Systems ^IUFW\sWeb ^IUPUI.Research.Bot ^IUS.Sp ^Just.a.Browser$ ^KWebGet ^[Ll]achesis ^leech ^Lincoln.State ^Mac\sFinder ^Mail\sSweeper ^MCspider ^Mediapartners-Google ^MFC\sFoundation\sClass\sLibrary ^Microcomputers.Etc ^Microsoft.Internet.Explorer ^Microsoft.URL ^MicrosoftPrototypeCrawler ^microsoftwildhare ^Missauga.Locate ^Missigua\sLocator ^Mo.College ^Monster ^Mozilla\s\/\s4\.0$ ^Mozilla.*NEWT ^Mozilla\(IE.Compatible\)$ ^Mozilla\/0 ^Mozilla\/2.0.\(compatible;.Ask.Jeeves\)$ ^Mozilla\/3\.0\s\(compatible\) ^Mozilla\/3.0.+Indy\sLibrary ^Mozilla\/3.Mozilla\/2.01 ^mozilla\s4.0$ ^Mozilla\/4.0\sefp@gmx.net ^Mozilla\/4.0\(WIN98\) ^Mozilla\/4.0\s\(compatible:\sFDSE\srobot\)$ ^Mozilla\/4\.0$ ^Mirror ^Missouri.College.Browse ^MSIE\s[56]\.0$ ^MyApp ^mySCOUT ^NASA.Search ^NaverBot ^Net.Vampire ^netattache ^NetCarta ^NG\/ ^nicerspro ^NICErsPRO ^NPBot ^Nu-Nu ^OpaL ^Openfind ^OpenTextSiteCrawler ^PackRat ^pavuk ^PicSpider ^PlantyNet_WebRobot ^Plucker ^Port.Huron.Labs ^Production\sBot ^Program\sShareware ^PushSite ^QuepasaCreep ^RepoMonkey ^RIN\. ^River.Valley.Inc ^Rover ^Rsync ^Schmozilla ^ScoutAbout ^ScSpider ^searchterms\.it ^Shai ^sherlock ^sitecheck ^Smith.and.Douglas ^Spegla ^SpiderBot ^Sqworm ^SuperBot ^SurfWalker ^tarspider ^teleport\spro\/1\.28 ^Telesoft ^Templeton ^test\/0\.1$ ^TurnitinBot ^Under.the.Rainbow ^University.of.Illinois.Web ^UtilMind ^vspider ^w3mir ^web.by.mail ^Web.hacker ^[Ww]eb[Bb]andit ^WebBrowser$ ^WebCopier ^WebCopy ^WebEMailExtrac ^WebMiner ^WebSauger ^Website.Downloader ^WebSnake ^WebStripper ^webvac ^webwalk ^WebZIP ^Wells.Search ^WEP\sSearch ^WhosTalking ^WUMPUS ^WWW-Mechanize ^www\.pl ^XGET ^Zeus EOB # that was from http://www.neilgunton.com/spambot_trap/bad_agents.txt # as of March 23, 2003, but: # - excluded: libwww-perl MSIECrawler ^reget ^wget # - included at the beginning of 'sub recode': ^Mozilla/4.0$ ^[A-Z]+$ NT;\)$ # - included: \)\sXX$ 0\(compatible; autoemailspider Boston.Project # compatible\s; \(compatible;.MSIE.6.0\) efp\@gmx.net # Mozilla\/4.0.\(http:\/\/www.fast-search-engine.com\/\) # MSIE.4.0;.Windows.NT.5.1; MSIE.4.5;.Windows MSIE.5.00;\) # robot\@monkia.com.tw;\+http:\/\/gais.cs.ccu.edu.tw\/robot statcrawler # ^\w{21,}$ ^[a-z]{12,}$ # ^ANT.Chassis ^Baiduspider ^booch ^Brick.House.Browse ^Bridgetown\sLabs # ^China.Local.Browse ^combine ^CosmixCrawler ^Cowbot ^cURL ^Demo\sBot # ^dloader(NaverRobot) ^Educate\sSearch ^First.Browse.of # ^Franklin.(?:Locator|Box) ^Full\sWeb\sBot ^Gaisbot ^Generic$ # ^Green.Research,.Inc. .+Harvest ^Holiday.Shopping,.Inc ^icsbot ^IE\/ # ^IE.\d.\d.Compatible.*Browser$ ^Illinois.State.Tech.Labs$ ^Indiana.U.Web # ^Industry\sProgram ^Inter-Coastal.Info.Server ^ISC.Systems ^IUFW\sWeb # ^IUPUI.Research.Bot ^IUS.Sp ^Just.a.Browser$ ^[Ll]achesis ^Lincoln.State # ^Mac\sFinder ^Mail\sSweeper ^Mediapartners-Google # ^MFC\sFoundation\sClass\sLibrary ^Microcomputers.Etc # ^Microsoft.Internet.Explorer ^MicrosoftPrototypeCrawler ^microsoftwildhare # ^Missauga.Locate ^Missigua\sLocator ^Missouri.College.Browse ^Mo.College # ^Mozilla$ ^Mozilla\(IE.Compatible\)$ ^Mozilla\/0 # ^Mozilla\/2.0.\(compatible;.Ask.Jeeves\)$ ^Mozilla\/3\.0\s(compatible) # ^mozilla\s4.0$ ^Mozilla\/4.0\s\(compatible:\sFDSE\srobot\)$ # ^Mozilla\/4.0\(WIN98\) ^Mozilla\/[45].0$ ^MSIE\s6\.0$ ^MyApp ^mySCOUT # ^NASA.Search ^NaverBot ^NG\/ ^NPBot ^Nu-Nu ^PicSpider ^PlantyNet_WebRobot # ^Port.Huron.Labs ^Production\sBot ^Program\sShareware ^River.Valley.Inc # ^QuepasaCreep ^Schmozilla ^ScSpider ^sherlock ^Smith.and.Douglas ^Sqworm # ^test\/0\.1$ ^TurnitinBot ^Under.the.Rainbow ^University.of.Illinois.Web # ^vspider ^WebBrowser$ ^WebSauger ^Website.Downloader ^Wells.Search # ^WEP\sSearch ^WWW-Mechanize ^Zeus # - included according to Sun Zoom Spark: # eXtractor ^ArribaPacketRat ^NICErsPRO ^Web.hacker ^[Ww]eb[Bb]andit # - included according to http://www.leekillough.com/robots.html : ^Digger # - according to http://www.sendfakemail.com/fakemail/antispam.html : # included: Email.Extractor # excluded: ^digout4uagent Harvest ^WebReaper $SIG{'__DIE__'} = $SIG{'__WARN__'} = sub { if ( $_[0] !~ /Filehandle STDOUT (?:re)?opened(?: as IN)? only for input/ # see comments below after "open( IN" and open( ERRLOG, ">>$root/cgi-errors.log" ) and flock( ERRLOG, 2 )) { print ERRLOG scalar gmtime, " $_[0]"; close ERRLOG; } }; $AllHostnames = qr/^(?:$AllDomains|(?:\d{1,3}\.){3}\d{1,3})$/io; $ref1 = $ENV{'HTTP_REFERER'}; $ref2 = $ENV{'REQUEST_URI'}; $host = $ENV{'HTTP_HOST'} || ''; $_ = $ENV{'QUERY_STRING'} || ''; $lat = /lat/i; $selat = $lat && defined( $ref1 ) && $ref1 =~ m{^http://}i && $ref1 !~ m{^http://(?:www\.)?$AllDomains}i; $ParkedRedirectToRoot = $host =~ $ParkedDomains && $ref2 ne '/' && ! -e $host; $ev = ( $ref2 =~ m{^/EV/?$}i and $host ne $MainDomain ); if ( $host and $host !~ $AllHostnames or $selat or $ParkedRedirectToRoot or $ev or /\w{3}\?/ ) { # Teleport Pro fetches /?win?koi?koi etc. $host =~ s/^www\.//i; $host = $MainDomain if $host and ( $host !~ $AllHostnames or $ev ); if ( $ev ) { $ref2 = '/EV/'; } elsif ( $ParkedRedirectToRoot ) { $ref2 = '/'; } $_ = "http://$host$ref2#"; /^(.+?)[#?]/; # +? means "not greedy" s|([#?])|/$1| unless $1 =~ m{(?:/|\.pl)$}; chop; s/^([^?]+\?\w{3})\?.*$/$1/; s/\?.+$// if $selat; # найденное поисковиками показывать кириллицей print "Status: 301 Moved Permanently\nLocation: $_\nURI: $_\n", "Content-type: text/html\n\n", "
' . ( ! $win && ! $lat ? 'KOI' : 'KOI' ) . " \n" . ( $win && ! $lat ? 'WIN' : 'WIN') . " \n" . ( $lat ? 'LAT' : 'LAT' ) . ' |
Ваш browser или программа для скачивания (download) сайта была идентифицирована как спамерская адресособиралка. Используйте другой browser для просмотра этой странички (http://$host$ref2).