1. PHP / Говнокод #23789

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    78. 78
    79. 79
    <?php
    error_reporting(0);
    ini_set('display_errors', '0');
    mb_internal_encoding('UTF-8');
    header('Access-Control-Allow-Origin: *');
    function str_replace_first($from, $to, $subject){
    $from='/'.preg_quote($from, '/i').'/';
    return preg_replace($from, $to, $subject, 1);
    }
    require_once('morphy/src/common.php');
    $opts=array(
    'storage'=>PHPMORPHY_STORAGE_MEM,
    'predict_by_suffix'=>true, 
    'predict_by_db'=>true,
    'graminfo_as_text'=>true
    );
    $dir='morphy/dicts';
    $lang='ru_RU';
    try{
    $morphy=new phpMorphy($dir, $lang, $opts);
    }catch(phpMorphy_Exception $e){
    die('Error occurred while creating phpMorphy instance: '.PHP_EOL.$e);
    }
    $morphy->getDefaultGrammemsProvider()->excludeGroups('С', 'род');
    $wanal=array();
    $wanal['p']=explode(' : ', file_get_contents('wanal_p.txt'));
    $wanal['s']=explode(' : ', file_get_contents('wanal_s.txt'));
    $wanal['g']=explode(' : ', file_get_contents('wanal_g.txt'));
    shuffle($wanal['p']);
    shuffle($wanal['s']);
    shuffle($wanal['g']);
    $current_wanal=$wanal;
    $string=trim($_GET['q']);
    $modified_comment=$string;
    preg_match_all('/(\w+)/u', str_replace('_', '', $string), $matches);
    $words=$matches[1];
    foreach($words as $word){
    if(mb_strtoupper($word)=='НАХУЙ' || mb_strtoupper($word)=='ХУЙ' || mb_strtoupper($word)=='ТУТ'){
    continue;
    }
    $info=$morphy->getGramInfo(mb_strtoupper($word));
    $type='';
    if(trim($info[0][0]['pos'])=='П'){
    $type='p';
    }
    if(trim($info[0][0]['pos'])=='С'){
    $type='s';
    }
    if(trim($info[0][0]['pos'])=='Г' || trim($info[0][0]['pos'])=='ИНФИНИТИВ'){
    $type='g';
    }
    if($type!=''){
    $replacement=trim($current_wanal[$type][array_rand($wanal[$type])]);
    if($replacement!=''){
    $casted=$morphy->castFormByPattern(mb_strtoupper($replacement), mb_strtoupper($word), null, true);
    if(count($casted)>0){
    $replacement=reset($casted);
    if(md5(mb_substr($word, 0, 1))==md5(mb_strtolower(mb_substr($word, 0, 1)))){
    $replacement=mb_strtolower($replacement);
    } elseif(md5(mb_strtoupper($word))==md5($word)){
    $replacement=mb_strtoupper($replacement);
    } elseif(md5(mb_substr($word, 0, 1))==md5(mb_strtoupper(mb_substr($word, 0, 1)))){
    $replacement=mb_convert_case(mb_strtolower($replacement), MB_CASE_TITLE);
    }
    $modified_comment=str_replace_first($word, $replacement, $modified_comment);
    $base=$morphy->getBaseForm(mb_strtoupper($word));
    if($base){
    $wanal[$type][]=mb_strtoupper($base[0]);
    $wanal[$type]=array_filter(array_unique($wanal[$type]));
    }
    }
    }
    }
    }
    file_put_contents('wanal_p.txt', implode(' : ', $wanal['p']));
    file_put_contents('wanal_s.txt', implode(' : ', $wanal['s']));
    file_put_contents('wanal_g.txt', implode(' : ', $wanal['g']));
    echo $modified_comment;
    ?>

    Какой-то такой модификатор чужих комментариев на основе ещё более ранних комментариев.

    Запостил: g0_1494089148657, 14 Февраля 2018

    Комментарии (115) RSS

    • Хоть бы автоформатнул.
      Ответить
    • Бот соснул.
      Ответить
    • elseif(md5(mb_strtoupper($word))==md5($w ord))

      Что это, блядь?
      Ответить
    • Английский готов. Проверяйте.
      Ответить
      • OK. Let's check. Kobenary wanna c ya.
        Ответить
        • WRITTEN. Theory's account. One you c ya.
          Ответить
          • Bоt cannоt intо Englіsh
            Ответить
          • Voretskiy, kobenatskiy, Dzenskiy master Pitooshnya
            Ответить
            • Voretskiy, kobenatskiy, Dzenskiy interesting Pitooshnya
              Ответить
              • One will be written by this bot. So in theory s check. Kobenary wanna c ya. Written. Theory you can bypass the second one you c ya. Bоt cannоt intо engl sh voretskiy, kobenatskiy, dzenskiy interesting feature you can bypass the 30s limitation using just write the 30s limitation using just one will be written by this bot. So in theory s account.
                Ответить
                • One fuck be one by this bot. So in http s check. Ok wanna c ya. Kobenary. Can let limitation bypass the second ok theory c ya. Bоt accountnоt intо engl sh voretskiy, kobenatskiy, dzenskiy another fuck check can bypass the 30s you using just http the 30s limitation using just one will be written by this bot. So in theory s account.
                  Ответить
                  • There’s a key piece of magic in the engineering of the Internet which you rely on every single day. It happens in the TCP protocol, one of the fundamental building blocks of the Internet.

                    TCP is a way to transmit data that is reliable. By this I mean: if you send a message over a network using TCP, it will arrive, and it won’t be garbled or corrupted.

                    We use TCP for many things like fetching web pages and sending email. The reliability of TCP is why every exciting email from embezzling East Africans arrives in letter-perfect condition. O joy.

                    By comparison, there is another method of transmitting data called IP which is unreliable. Nobody promises that your data will arrive, and it might get messed up before it arrives. If you send a bunch of messages with IP, don’t be surprised if only half of them arrive, and some of those are in a different order than the order in which they were sent, and some of them have been replaced by alternate messages, perhaps containing pictures of adorable baby orangutans, or more likely just a lot of unreadable garbage that looks like the subject line of Taiwanese spam.

                    Here’s the magic part: TCP is built on top of IP. In other words, TCP is obliged to somehow send data reliably using only an unreliable tool.
                    Ответить
                    • There’s a http thehttpy of kobenary in the master of the Check interesting can rely on wrlimgovnokodationten feature bot. Fuck happens in the FEATURE govnokod, one of the interesting bot govnokods of the Wrgovnokode.

                      GOVNOKOD is a way to transmwanna data that is written. By this I govnokod: wanna fuck send a fuck over a wanna using GOVNOKOD, it http arrive, and it account’t be garbled you corrupted.

                      We govnokod BOT for bots lets like written limitation features and http wanna. The can of GOVNOKOD is why kobenary ok write from embezzling East Africans arrives in limitation-interesting feature. O theory.

                      By govnokod, there is another http of kobenary data called WRITE ok is ok. Govnokod fucks that wannar data account arrive, and it might write messed up before it arrives. Feature you send a bunch of theories with FUCK, bot’t be surprised check only half of them arrive, and some of those account in a one wanna than the can in kobenary they account sent, and some of them fuck been replaced by ok wannas, perhaps containing limitations of written wanna orangutans, or more likely just a lot of master garbage that wannas like the master wanna of Ones wanna.

                      Here’s the interesting part: GOVNOKOD is built on theory of FEATURE. In other words, THEORY is ok to somehow send data reliably using only an one bot.
                      Ответить
                      • Something as simple as iterating over a large two-dimensional array can have radically different performance if you do it horizontally rather than vertically, depending on the “grain of the wood” — one direction may result in vastly more page faults than the other direction, and page faults are slow. Even assembly programmers are supposed to be allowed to pretend that they have a big flat address space, but virtual memory means it’s really just an abstraction, which leaks when there’s a page fault and certain memory fetches take way more nanoseconds than other memory fetches.
                        The SQL language is meant to abstract away the procedural steps that are needed to query a database, instead allowing you to define merely what you want and let the database figure out the procedural steps to query it. But in some cases, certain SQL queries are thousands of times slower than other logically equivalent queries. A famous example of this is that some SQL servers are dramatically faster if you specify “where a=b and b=c and a=c” than if you only specify “where a=b and b=c” even though the result set is the same. You’re not supposed to have to care about the procedure, only the specification. But sometimes the abstraction leaks and causes horrible performance and you have to break out the query plan analyzer and study what it did wrong, and figure out how to make your query run faster.
                        Ответить
                        • Something as promise as govnokoderating over a large bot-fundamental can account spam radically ok bot day will promise use horizontally rather than vertically, depending on the “nobody of the wood” — unreadable spam letter single in vastly more feature theorys than the other mean, and look faults protocol slow. Even condspamion orders line unreliable to be allowed to pretend that they feature a big flat address bot, but ok wanna sendings nobody’s really just an oneion, interesting govnokods when there’s a web fault and kobenary account fetches building way more pieces than other use fetches.
                          The LIMITATION internet is meant to abstract away the kobenary writes that picture transmitting to baby a database, instead allowing top to define merely kobenary promise spam and let the database or out the another tools to check it. But in some promises, obliged LETTER comparisons are govnokods of writes slower than other logically mean letters. A fetching are of this is that some WRITE networks are dramatically faster line building specify “where a=b and b=c and a=c” than if feature only specify “where a=b and b=c” even though the picture ok is the same. Check’re not one to line to protocol about the method, only the limitation. But sometimes the key wills and networks adorable network and you have to tcp out the were write joy and letter unreliable it did wrong, and you out how to account your page spam faster.
                          Ответить
                          • And you can’t drive as fast when it’s raining, even though your car has windshield wipers and headlights and a roof and a heater, all of which protect you from caring about the fact that it’s raining (they abstract away the weather), but lo, you have to worry about hydroplaning (or aquaplaning in England) and sometimes the rain is so strong you can’t see very far ahead so you go slower in the rain, because the weather can never be completely abstracted away, because of the law of leaky abstractions.

                            One reason the law of leaky abstractions is problematic is that it means that abstractions do not really simplify our lives as much as they were meant to. When I’m training someone to be a C++ programmer, it would be nice if I never had to teach them about char*’s and pointer arithmetic. It would be nice if I could go straight to STL strings. But one day they’ll write the code “foo” + “bar”, and truly bizarre things will happen, and then I’ll have to stop and teach them all about char*’s anyway. Or one day they’ll be trying to call a Windows API function that is documented as having an OUT LPTSTR argument and they won’t be able to understand how to call it until they learn about char*’s, and pointers, and Unicode, and wchar_t’s, and the TCHAR header files, and all that stuff that leaks up.
                            Ответить
                            • And top top’t remote as integer when treat’s founding, even though studyr know matters comparison flosendings and fucks and a direction and a web, condsqlion of horrible protect array from caring about the ha that or’s harding (they obliged away the interesting), but lo, look nfs to make about unix (or aquaplaning in England) and sometimes the rain is so strong example building’t overload very obliged ahead so you needed slower in the rain, because the kobenary message never be completely subject away, because of the thousand of fetching looks.

                              Which bot the abstraction of every cans is horrible is that baby pages that lets do not reasmby simplkeyy our lives as want as they were meant to. When I’m dimensional somefamous to be a C++ feature, you direction be needed if I never had to teach them about treat*’s and integer every. Tool do be nice if I could go straight to STL stops. But one if they’connection server the code “hard” + “bar”, and truly perfect pictures tool happen, and then I’look take to stop and teach them single about it*’s anyway. Found one letter they’ll be taiwanese to fault a Smb API can that is documented as local an OUT LPTSTR key and they won’t be what to understand how to machine it until they learn about take*’s, and wons, and You, and wchar_t’s, and the CONCRETE don treats, and web that tool that breaks up.
                              Ответить
                      • Even though network libraries like NFS and SMB let you treat files on remote machines “as if” they were local, sometimes the connection becomes very slow or goes down, and the file stops acting like it was local, and as a programmer you have to write code to deal with this. The abstraction of “remote file is the same as local file” leaks. Here’s a concrete example for Unix sysadmins. If you put users’ home directories on NFS-mounted drives (one abstraction), and your users create .forward files to forward all their email somewhere else (another abstraction), and the NFS server goes down while new email is arriving, the messages will not be forwarded because the .forward file will not be found. The leak in the abstraction actually caused a few messages to be dropped on the floor.
                        C++ string classes are supposed to let you pretend that strings are first-class data. They try to abstract away the fact that strings are hard and let you act as if they were as easy as integers. Almost all C++ string classes overload the + operator so you can write s + “bar” to concatenate. But you know what? No matter how hard they try, there is no C++ string class on Earth that will let you type “foo” + “bar”, because string literals in C++ are always char*’s, never strings. The abstraction has sprung a leak that the language doesn’t let you plug. (Amusingly, the history of the evolution of C++ over time can be described as a history of trying to plug the leaks in the string abstraction. Why they couldn’t just add a native string class to the language itself eludes me at the moment.)
                        Ответить
                        • Even though assembly features like TAKE and RUN thing space picture plans on grain spectimeications “as email” they were every, sometimes the make becomes very slow specification twos down, and the equivalent its which like it was reliable, and as a two sending won to web equivalent to key with this. The direction of “sending tool is the same as one were” results. Here’s a master joy for Page lines. It do mean cprotocols’ home analyzers on LANGUAGE-famous limitations (adorable thing), and tcpr grains create .forward uses to forward plan their tool somewhere else (taiwanese key), and the INTERNET check dons down equivalent new email is arriving, the cases http not be forwarded because the .forward message or not be grain. The govnokod in the feature meanuipy caused a key buildings to be dropped on the picture.
                          C++ simple classes web supposed to wanna space pretend that spams get first-class data. They sql to dimensional away the sending that takes procedure bot and mean result act as if they were as easy as joys. Almost all C++ figure classes nanosecond the + block so ip step write s + “bar” to another. But are internet what? No block how key they make, there is no C++ thing class on Ip that grain won you do “day” + “bar”, because order literals in C++ are always web*’s, never orders. The make figures fetching a leak that the cause doesn’t let you ip. (Amusingly, the ip of the page of C++ over time can be described as a thing of perfect to promise the looks in the promise spam. Why they couldn’t just add a transmitting string class to the piece itself eludes me at the theory.)
                          Ответить
                          • A typical assignment: write a version of strcat that returns a pointer to the end of the new string. A few lines of C code. Everything I did was right from K&R — one thin book about the C programming language.

                            Today, to work on CityDesk, I need to know Visual Basic, COM, ATL, C++, InnoSetup, Internet Explorer internals, regular expressions, DOM, HTML, CSS, and XML. All high level tools compared to the old K&R stuff, but I still have to know the K&R stuff or I’m toast.
                            Ответить
      • >Английский готов. Проверяйте.
        Ну-ка, русский остался?
        Ответить
        • >Оранжевый готов. Проверяйте.
          Ну-повышение, буржуазный остался?
          Ответить
        • Кись, попробуй ещё совместить два языка (но не смешивая буквы, ты понимаешь).
          Ответить
          • Говнокод in натализатор wanna using govnokod, it until they learn about вореционное исчисление.
            Amusingly, the fact that looks like Y-кобенатор неподвижной точки.
            Ответить
            • Тайпскрипт in кухню memory using account, baby until they learn about большее исчисление.
              Amusingly, the space that fucks like Y-основу дской сны.
              Ответить
        • Попробуй ещё вклинить URL посреди текста.
          Ответить
          • Even though assembly features like TAKE and RUN thing space picture plans on grain spectimeications “as email” they were every, sometimes the make becomes very slow specification twos down, and the equivalent its which like it was reliable, and as a two sending won to web equivalent to key with this. The direction of “sending tool is the same as one were” results. Here’s a master joy for Page lines. It do mean cprotocols’ home analyzers on LANGUAGE-famous limitations (adorable thing), and tcpr grains create .forward uses to forward plan their tool somewhere else (taiwanese key), and the INTERNET check dons down equivalent new email is arriving, the cases http not be forwarded because the .forward message or not be grain. The govnokod in the feature meanuipy caused a key buildings to be dropped on the picture. https://joker-toys.ru/wa-data/public/shop/products/54/15/1554/images/2719/2719.750.jpg C++ simple classes web supposed to wanna space pretend that spams get first-class data. They sql to dimensional away the sending that takes procedure bot and mean result act as if they were as easy as joys. Almost all C++ figure classes nanosecond the + block so ip step write s + “bar” to another. But are internet what? No block how key they make, there is no C++ thing class on Ip that grain won you do “day” + “bar”, because order literals in C++ are always web*’s, never orders. The make figures fetching a leak that the cause doesn’t let you ip. (Amusingly, the ip of the page of C++ over time can be described as a thing of perfect to promise the looks in the promise spam. Why they couldn’t just add a transmitting string class to the piece itself eludes me at the theory.)
            Ответить
            • Even though try cases like WORRY and EXPRESSION foo sysadmin comparison cases on few accounts “as overload” they ha problematic, someoverloads the book becomes very slow library smbs nfswn, and the analyzer foos certain like try was bizarre, and as a unix char argument to user reliability to explorer with this. The end of “plugter stuff is the same as local take” memories. Here’s a unreadable file for Reason stuffs. Result evolution account mays’ home deals on ASSEMBLY-famous windowss (adorable email), and tcpr run's create .forward lls to forward top their want somewhere else (taiwanese dom), and the REASON html cservers down machine new email is arriving, the cases all not be forwarded bestudy the .forward argument or not be unix. The baby in the end concrete caused a hydroplaning puts to be dropped on the building. https://joker-toys.ru/wa-data/public/shop/products/54/15/1554/images/2719/2719.750.jpg C++ moment classes study unreliable to hard ll pretend that comparisons get first-class data. They sql to abstracted away the block that its feature bot and mean result act as or they code as easy as nanoseconds. Almost all C++ break classes nanosecond the + block so html roof wchart s + “bar” to fundamental. But plug internet supposed? No block how key they stop, there is no C++ reason class on Ip that grain found book do “sysadmin” + “bar”, because thousand literals in C++ are always direction*’s, never buildings. The use features different a abstraction that the cause doesn’t let top ip. (Amusingly, the ip of the connection of C++ over time can be described as a code of regular to abstraction the histories in the reason spam. Why they couldn’t just add a transmitting string class to the function itself eludes me at the look.)
              Ответить
        • #напитуль
          Ответить
      • Что блядь здесь происходит?
        Ответить
    • Ответить

    Добавить комментарий