|
|
Дело было вечером, делать было нечего....
и родился такой монстр...@useragent[returnwhat]
^var[rawdata;^env[HTTP_USER_AGENT]]
#Что мы должны получить:
#Тип браузера: msie5, netscape40, opera511 etc. или search, ripper
^var[remote_browser;unknown]
#Операционка: linux, nt4, win2k, winme, win98
^var[remote_os;unknown]
#######################################################
# Тип операционки:
^macro[stringmatch;Windows 98;^var[remote_os;win98]]
^macro[stringmatch;Windows NT 5;^var[remote_os;win2k]]
^macro[stringmatch;Windows NT 4\.0;^var[remote_os;winnt]]
^macro[stringmatch;WinNT;^var[remote_os;winnt]]
^macro[stringmatch;Windows 3\.;^var[remote_os;win31]]
^macro[stringmatch;Win 9x 4\.90;^var[remote_os;winme]]
^macro[stringmatch;Windows NT^; DigExt;^var[remote_os;winnt]]
^macro[stringmatch;Win32;^var[remote_os;win98]]
^macro[stringmatch;Windows 95;^var[remote_os;win95]]
^macro[stringmatch;Win16;^var[remote_os;unknown]]
^macro[stringmatch;Win98;^var[remote_os;win98]]
^macro[stringmatch;Win95;^var[remote_os;win95]]
^macro[stringmatch;OS/2;^var[remote_os;os2]]
^macro[stringmatch;Windows ME;^var[remote_os;winme]]
^macro[stringmatch;Windows 2000;^var[remote_os;win2k]]
^macro[stringmatch;Linux;^var[remote_os;linux]]
^macro[stringmatch;BSD;^var[remote_os;freebsd]]
^macro[stringmatch;Macintosh;^var[remote_os;mac]]
^macro[stringmatch;Mac_PowerPC;^var[remote_os;]]
^macro[stringmatch;Mac;^var[remote_os;mac]]
^macro[stringmatch;PowerPC;^var[remote_os;mac]]
^macro[stringmatch;sunos;^var[remote_os;sunos]]
^macro[stringmatch;solaris;^var[remote_os;solaris]]
^macro[stringmatch;libwww;^var[remote_os;linux]]
^macro[stringmatch;Konqueror;^var[remote_os;linux]]
^macro[stringmatch;Lynx;^var[remote_os;linux]]
^macro[stringmatch;Unix;^var[remote_os;unix]]
^macro[stringmatch;X11;^var[remote_os;linux]]
^macro[stringmatch;Amiga;^var[remote_os;amiga]]
#Who the hell are they?! :
#ZyBorg/1.0 (ZyBorg@WISEnutbot.com; http://www.WISEnutbot.com)
#WebZIP/4.1 (http://www.spidersoft.com)
#Xenu's Link Sleuth 1.1d
#Website Quester - www.esalesbiz.com/extra/
#Mozilla/4.0 (compatible; MuscatFerret/2.0; http://www.webtop.com/)
#Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; sureseeker.com)
#Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; MSIECrawler)
#DA 4.0 (www.downloadaccelerator.com)
#DA 3.5 (www.lidan.com)
#Custo 1.1 (www.netwu.com)
#cosmos/0.8_(robot@xyleme.com)
#######################################################
# Тип броузера:
^macro[stringmatch;aport;^var[remote_browser;search]]
^macro[stringmatch;ArchitextSpider;^var[remote_browser;search]]
^macro[stringmatch;aspseek;^var[remote_browser;search]]
^macro[stringmatch;fast\.no;^var[remote_browser;search]]
^macro[stringmatch;findsame\.com;^var[remote_browser;search]]
^macro[stringmatch;Gaisbot;^var[remote_browser;search]]
^macro[stringmatch;Google;^var[remote_browser;search]]
^macro[stringmatch;ibm.com/cs/crawler;^var[remote_browser;search]]
^macro[stringmatch;Lycos;^var[remote_browser;search]]
^macro[stringmatch;Openfind;^var[remote_browser;search]]
^macro[stringmatch;Rambler;^var[remote_browser;search]]
^macro[stringmatch;XWareCrawler;^var[remote_browser;search]]
^macro[stringmatch;yahoo;^var[remote_browser;search]]
^macro[stringmatch;Yandex;^var[remote_browser;search]]
#^macro[stringmatch;;^var[remote_browser;]]
^macro[stringmatch;DISCo Pump;^var[remote_browser;ripper]]
^macro[stringmatch;DnloadMage;^var[remote_browser;ripper]]
^macro[stringmatch;Download Express;^var[remote_browser;ripper]]
^macro[stringmatch;esalesbiz.com;^var[remote_browser;ripper]]
^macro[stringmatch;FileHound;^var[remote_browser;ripper]]
^macro[stringmatch;FlashGet;^var[remote_browser;ripper]]
^macro[stringmatch;GetRight;^var[remote_browser;ripper]]
^macro[stringmatch;GetSmart;^var[remote_browser;ripper]]
^macro[stringmatch;Go!Zilla;^var[remote_browser;ripper]]
^macro[stringmatch;gozilla;^var[remote_browser;ripper]]
^macro[stringmatch;Java1;^var[remote_browser;ripper]]
^macro[stringmatch;JetCar;^var[remote_browser;ripper]]
^macro[stringmatch;LWP::Simple;^var[remote_browser;ripper]]
^macro[stringmatch;Mass Downloader;^var[remote_browser;ripper]]
^macro[stringmatch;MSIECrawler;^var[remote_browser;ripper]]
^macro[stringmatch;Net Vampire;^var[remote_browser;ripper]]
^macro[stringmatch;Net_Vampire;^var[remote_browser;ripper]]
^macro[stringmatch;NetCaptor;^var[remote_browser;ripper]]
^macro[stringmatch;Offline Explorer;^var[remote_browser;ripper]]
^macro[stringmatch;PHP;^var[remote_browser;ripper]]
^macro[stringmatch;ReGet;^var[remote_browser;ripper]]
^macro[stringmatch;Teleport Pro;^var[remote_browser;ripper]]
^macro[stringmatch;Web Downloader;^var[remote_browser;ripper]]
^macro[stringmatch;WebCopier;^var[remote_browser;ripper]]
^macro[stringmatch;WebDownloader;^var[remote_browser;ripper]]
^macro[stringmatch;WebReaper;^var[remote_browser;ripper]]
^macro[stringmatch;WebZIP;^var[remote_browser;ripper]]
^macro[stringmatch;WinBatch;^var[remote_browser;ripper]]
^macro[stringmatch;Xenu's Link Sleuth;^var[remote_browser;ripper]]
^macro[stringmatch;X-Uploader;^var[remote_browser;ripper]]
#######
^macro[stringmatch;AOL;^var[remote_browser;aol]]
^macro[stringmatch;MSN;^var[remote_browser;msn]]
^macro[stringmatch;Lotus;^var[remote_browser;lotus]]
^macro[stringmatch;Lynx;^var[remote_browser;lynx]]
^macro[stringmatch;Linx;^var[remote_browser;lynx]]
^macro[stringmatch;Links;^var[remote_browser;lynx]]
^macro[stringmatch;gecko;^var[remote_browser;mozilla]]
^macro[stringmatch;netscape6;^var[remote_browser;netscape6]]
^macro[stringmatch;Mozilla/4\.7;^var[remote_browser;netscape47]]
^macro[stringmatch;Mozilla/4\.6;^var[remote_browser;netscape46]]
^macro[stringmatch;Mozilla/4\.5;^var[remote_browser;netscape45]]
^macro[stringmatch;Mozilla/4\.7;^var[remote_browser;netscape47]]
^macro[stringmatch;Mozilla/4\.0;^var[remote_browser;netscape40]]
^macro[stringmatch;Gold;^var[remote_browser;netscape3]]
^macro[stringmatch;MSIE 6\.;^var[remote_browser;msie6]]
^macro[stringmatch;MSIE 5\.5;^var[remote_browser;msie55]]
^macro[stringmatch;MSIE 5\.;^var[remote_browser;msie5]]
^macro[stringmatch;MSIE 4\.;^var[remote_browser;msie4]]
^macro[stringmatch;MSIE 3\.;^var[remote_browser;msie3]]
^macro[stringmatch;MSIE 2\.;^var[remote_browser;msie2]]
^macro[stringmatch;MSIE 1\.;^var[remote_browser;msie1]]
^macro[stringmatch;Opera;^var[remote_browser;opera]]
^macro[stringmatch;совместимость;^var[remote_browser;opera]]
^macro[stringmatch;ЯНБЛЕЯРХЛНЯРЭ;^var[remote_browser;opera]]
#^macro[stringmatch;;^var[remote_browser;]]
^switch[$returnwhat;
^case[remote_browser;^var[remote_browser]]
^case[remote_os;^var[remote_os]]
^case[DEFAULT;^var[remote_browser]]
]
@end
@stringmatch[lookfor;return]
^eq[^match[$lookfor;i;^var[rawdata]];yes;$return]
@end Неюзабельность сего творения довольно очевидна, проще писать универсальный код ;-) Но, всё равно, мож пригодится...
|