1. Лучший говнокод

    В номинации:
    За время:
  2. Куча / Говнокод #29114

    0

    1. 1
    IT Оффтоп #214

    #184: https://govnokod.ru/28790 https://govnokod.xyz/_28790
    #185: https://govnokod.ru/28794 https://govnokod.xyz/_28794
    #186: https://govnokod.ru/28815 https://govnokod.xyz/_28815
    #187: https://govnokod.ru/28833 https://govnokod.xyz/_28833
    #188: https://govnokod.ru/28837 https://govnokod.xyz/_28837
    #189: https://govnokod.ru/28840 https://govnokod.xyz/_28840
    #190: https://govnokod.ru/28875 https://govnokod.xyz/_28875
    #191: https://govnokod.ru/28878 https://govnokod.xyz/_28878
    #192: https://govnokod.ru/28886 https://govnokod.xyz/_28886
    #193: https://govnokod.ru/28911 https://govnokod.xyz/_28911
    #194: https://govnokod.ru/28914 https://govnokod.xyz/_28914
    #195: https://govnokod.ru/28917 https://govnokod.xyz/_28917
    #196: https://govnokod.ru/28925 https://govnokod.xyz/_28925
    #197: https://govnokod.ru/28935 https://govnokod.xyz/_28935
    #198: https://govnokod.ru/28938 https://govnokod.xyz/_28938
    #199: https://govnokod.ru/28942 https://govnokod.xyz/_28942
    #200: https://govnokod.ru/28945 https://govnokod.xyz/_28945
    #201: https://govnokod.ru/28948 https://govnokod.xyz/_28948
    #202: https://govnokod.ru/28951 https://govnokod.xyz/_28951
    #203: https://govnokod.ru/28954 https://govnokod.xyz/_28954
    #204: https://govnokod.ru/28971 https://govnokod.xyz/_28971
    #205: https://govnokod.ru/28986 https://govnokod.xyz/_28986
    #206: https://govnokod.ru/28991 https://govnokod.xyz/_28991
    #207: https://govnokod.ru/29002 https://govnokod.xyz/_29002
    #208: https://govnokod.ru/29060 https://govnokod.xyz/_29060
    #209: https://govnokod.ru/29070 https://govnokod.xyz/_29070
    #210: https://govnokod.ru/29079 https://govnokod.xyz/_29079
    #211: https://govnokod.ru/29092 https://govnokod.xyz/_29092
    #212: https://govnokod.ru/29093 https://govnokod.xyz/_29093
    #213: https://govnokod.ru/29104 https://govnokod.xyz/_29104

    nepeKamHblu_nemyx, 01 Апреля 2025

    Комментарии (411)
  3. Си / Говнокод #29120

    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
    #include <stdio.h>
    #include <stddef.h>
    #include <stdlib.h>
    #include <limits.h>
    
    int gcc_rtm_virt_test(int a, int(*f)(int, int(*)(), float*), float fa[static (-1,0,1)]) {
        short s = sizeof (short) + sizeof 0;
        char b[12] = "0123456789";
    
        for (long ll = sizeof b; ll -= 4;) {
            b[ll]   = '0';
            b[ll-1] = '1';
            b[ll-2] = '2';
            b[ll-3] = '3';
        }
    
        return s - ((1 << 2) - (b[0] - '2'));
    }
    
    int gcc_rtm_cf32(int(*f0)(), int(*f1)()) {
        ptrdiff_t d = f1 - f0;
        // guess you know what you're doing
        if (! (d >> sizeof (ptrdiff_t) * CHAR_BIT - 1)) { 
            while (d--) {
                switch(*(unsigned short*)(f0 + d)) {
                    case 0xc3c9:
                        return 0;
                    case 0xb8:
                        if (!*(unsigned int*)(f0 + d + 1)) {
                            return 1;
                        } 
                        break;
                    case 0xC031:
                        return 2;
                }
            }
            return -1;
        };
    
        return -2;
    }
    
    int main() {
    
        switch (gcc_rtm_cf32(gcc_rtm_virt_test, gcc_rtm_cf32)) {
            case -1:
                fprintf(stderr, "Hey, added smth. special? Maybe -Og? \n"), abort();
                break;
            case 0:
                fprintf(stderr, "Hey, -O0 smells like a dead rat.. check your flags!\n"), abort();
                break;
            case 1:
                fprintf(stderr, "Hey, -O1 is still not allowed.. Would you do better?\n"), abort();
                break;
            case 2:
                fprintf(stdout, "Hey, finally you've captured [-O2 || -O3 || -Ofast || -Os] flag!");
                break;
            default:
                fprintf(stderr, "Hey, looks like you've got impl. defined crap, check PTRDIFF_T stuff.. \n"), abort();
                break;
        };
    
    }

    И далее по тексту..gcc'шники опять обкурились в рантайме. Зачэм так делоть, это прикольно?

    BCHARa, 10 Апреля 2025

    Комментарии (141)
  4. Куча / Говнокод #29125

    0

    1. 1
    IT Оффтоп #215

    #185: https://govnokod.ru/28794 https://govnokod.xyz/_28794
    #186: https://govnokod.ru/28815 https://govnokod.xyz/_28815
    #187: https://govnokod.ru/28833 https://govnokod.xyz/_28833
    #188: https://govnokod.ru/28837 https://govnokod.xyz/_28837
    #189: https://govnokod.ru/28840 https://govnokod.xyz/_28840
    #190: https://govnokod.ru/28875 https://govnokod.xyz/_28875
    #191: https://govnokod.ru/28878 https://govnokod.xyz/_28878
    #192: https://govnokod.ru/28886 https://govnokod.xyz/_28886
    #193: https://govnokod.ru/28911 https://govnokod.xyz/_28911
    #194: https://govnokod.ru/28914 https://govnokod.xyz/_28914
    #195: https://govnokod.ru/28917 https://govnokod.xyz/_28917
    #196: https://govnokod.ru/28925 https://govnokod.xyz/_28925
    #197: https://govnokod.ru/28935 https://govnokod.xyz/_28935
    #198: https://govnokod.ru/28938 https://govnokod.xyz/_28938
    #199: https://govnokod.ru/28942 https://govnokod.xyz/_28942
    #200: https://govnokod.ru/28945 https://govnokod.xyz/_28945
    #201: https://govnokod.ru/28948 https://govnokod.xyz/_28948
    #202: https://govnokod.ru/28951 https://govnokod.xyz/_28951
    #203: https://govnokod.ru/28954 https://govnokod.xyz/_28954
    #204: https://govnokod.ru/28971 https://govnokod.xyz/_28971
    #205: https://govnokod.ru/28986 https://govnokod.xyz/_28986
    #206: https://govnokod.ru/28991 https://govnokod.xyz/_28991
    #207: https://govnokod.ru/29002 https://govnokod.xyz/_29002
    #208: https://govnokod.ru/29060 https://govnokod.xyz/_29060
    #209: https://govnokod.ru/29070 https://govnokod.xyz/_29070
    #210: https://govnokod.ru/29079 https://govnokod.xyz/_29079
    #211: https://govnokod.ru/29092 https://govnokod.xyz/_29092
    #212: https://govnokod.ru/29093 https://govnokod.xyz/_29093
    #213: https://govnokod.ru/29104 https://govnokod.xyz/_29104
    #214: https://govnokod.ru/29114 https://govnokod.xyz/_29114

    nepeKamHblu_nemyx, 25 Апреля 2025

    Комментарии (79)
  5. Куча / Говнокод #29126

    0

    1. 1
    Пиздец-оффтоп #109

    #79: https://govnokod.ru/28736 https://govnokod.xyz/_28736
    #80: https://govnokod.ru/28740 https://govnokod.xyz/_28740
    #81: https://govnokod.ru/28750 https://govnokod.xyz/_28750
    #82: https://govnokod.ru/28779 https://govnokod.xyz/_28779
    #83: https://govnokod.ru/28788 https://govnokod.xyz/_28788
    #84: https://govnokod.ru/28795 https://govnokod.xyz/_28795
    #85: https://govnokod.ru/28808 https://govnokod.xyz/_28808
    #86: (vanished) https://govnokod.xyz/_28814
    #87: https://govnokod.ru/28817 https://govnokod.xyz/_28817
    #88: https://govnokod.ru/28836 https://govnokod.xyz/_28836
    #89: https://govnokod.ru/28843 https://govnokod.xyz/_28843
    #90: https://govnokod.ru/28874 https://govnokod.xyz/_28874
    #91: https://govnokod.ru/28880 https://govnokod.xyz/_28880
    #92: https://govnokod.ru/28884 https://govnokod.xyz/_28884
    #93: https://govnokod.ru/28889 https://govnokod.xyz/_28889
    #94: https://govnokod.ru/28895 https://govnokod.xyz/_28895
    #95: https://govnokod.ru/28904 https://govnokod.xyz/_28904
    #96: https://govnokod.ru/28912 https://govnokod.xyz/_28912
    #97: https://govnokod.ru/28918 https://govnokod.xyz/_28918
    #98: https://govnokod.ru/28932 https://govnokod.xyz/_28932
    #99: https://govnokod.ru/28936 https://govnokod.xyz/_28936
    #100: https://govnokod.ru/28940 https://govnokod.xyz/_28940
    #101: https://govnokod.ru/28949 https://govnokod.xyz/_28949
    #102: https://govnokod.ru/28978 https://govnokod.xyz/_28978
    #103: https://govnokod.ru/28982 https://govnokod.xyz/_28982
    #104: https://govnokod.ru/28989 https://govnokod.xyz/_28989
    #105: https://govnokod.ru/29052 https://govnokod.xyz/_29052
    #106: https://govnokod.ru/29069 https://govnokod.xyz/_29069
    #107: https://govnokod.ru/29086 https://govnokod.xyz/_29086
    #108: https://govnokod.ru/29102 https://govnokod.xyz/_29102

    nepeKamHblu_nemyx, 27 Апреля 2025

    Комментарии (63)
  6. Куча / Говнокод #29123

    0

    1. 1
    Просто оффтоп #42

    #12: https://govnokod.ru/27153 https://govnokod.xyz/_27153
    #13: https://govnokod.ru/27159 https://govnokod.xyz/_27159
    #14: https://govnokod.ru/27200 https://govnokod.xyz/_27200
    #15: https://govnokod.ru/27237 https://govnokod.xyz/_27237
    #16: (vanished) https://govnokod.xyz/_27282
    #17: https://govnokod.ru/27319 https://govnokod.xyz/_27319
    #18: https://govnokod.ru/27380 https://govnokod.xyz/_27380
    #19: (vanished) https://govnokod.xyz/_27500
    #20: https://govnokod.ru/27607 https://govnokod.xyz/_27607
    #21: https://govnokod.ru/27951 https://govnokod.xyz/_27951
    #22: https://govnokod.ru/28076 https://govnokod.xyz/_28076
    #23: https://govnokod.ru/28266 https://govnokod.xyz/_28266
    #24: https://govnokod.ru/28373 https://govnokod.xyz/_28373
    #25: https://govnokod.ru/28474 https://govnokod.xyz/_28474
    #26: https://govnokod.ru/28563 https://govnokod.xyz/_28563
    #27: https://govnokod.ru/28645 https://govnokod.xyz/_28645
    #28: (vanished) https://govnokod.xyz/_28664
    #29: https://govnokod.ru/28674 https://govnokod.xyz/_28674
    #30: https://govnokod.ru/28680 https://govnokod.xyz/_28680
    #31: https://govnokod.ru/28688 https://govnokod.xyz/_28688
    #32: https://govnokod.ru/28695 https://govnokod.xyz/_28695
    #33: https://govnokod.ru/28702 https://govnokod.xyz/_28702
    #34: (vanished) https://govnokod.xyz/_28708
    #35: https://govnokod.ru/28715 https://govnokod.xyz/_28715
    #36: https://govnokod.ru/28725 https://govnokod.xyz/_28725
    #37: https://govnokod.ru/28733 https://govnokod.xyz/_28733
    #38: (vanished) https://govnokod.xyz/_28748
    #39: https://govnokod.ru/28758 https://govnokod.xyz/_28758
    #40: https://govnokod.ru/28885 https://govnokod.xyz/_28885
    #41: https://govnokod.ru/29061 https://govnokod.xyz/_29061

    nepeKamHblu_nemyx, 19 Апреля 2025

    Комментарии (41)
  7. PHP / Говнокод #29124

    +1

    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
    if (!$_pwd_trusted && $resto && $has_image && BOARD_DIR === 'g' && strpos($_thread_sub, '/aicg/') !== false) {
            $_bot_headers = spam_filter_format_http_headers($com, $country, "$insfile$ext", $_threat_score, $_req_sig);
            log_spam_filter_trigger('block_aicg', BOARD_DIR, $resto, $host, 1, $_bot_headers);
            error(S_IPRANGE_BLOCKED_IMG . ' ' . S_IPRANGE_BLOCKED_TEMP . S_IPRANGE_BLOCKED_L1);
          }
          
          if (!$_pwd_trusted && $resto && $has_image && BOARD_DIR === 'vg' && strpos($_thread_com, '/lolg/') !== false) {
            $_bot_headers = spam_filter_format_http_headers($com, $country, "$insfile$ext", $_threat_score, $_req_sig);
            log_spam_filter_trigger('block_lolg', BOARD_DIR, $resto, $host, 1, $_bot_headers);
            error(S_IPRANGE_BLOCKED_IMG . ' ' . S_IPRANGE_BLOCKED_TEMP . S_IPRANGE_BLOCKED_L1);
            //show_post_successful_fake($resto);
            //return;
          }
          
          if (!$_pwd_trusted && $resto && $has_image && BOARD_DIR === 'vg' && strpos($_thread_com, '/overwatch') !== false) {
            $_bot_headers = spam_filter_format_http_headers($com, $country, "$insfile$ext", $_threat_score, $_req_sig);
            log_spam_filter_trigger('block_owg', BOARD_DIR, $resto, $host, 1, $_bot_headers);
            error(S_IPRANGE_BLOCKED_IMG . ' ' . S_IPRANGE_BLOCKED_TEMP . S_IPRANGE_BLOCKED_L1);
            //show_post_successful_fake($resto);
            //return;
          }
          
          if (false && !$_pwd_trusted && $resto && $has_image && BOARD_DIR === 'fa' && strpos($_thread_sub, 'Workwear General') !== false) {
            $_bot_headers = spam_filter_format_http_headers($com, $country, "$insfile$ext", $_threat_score, $_req_sig);
            log_spam_filter_trigger('block_denim', BOARD_DIR, $resto, $host, 1, $_bot_headers);
            error(S_IPRANGE_BLOCKED_IMG . ' ' . S_IPRANGE_BLOCKED_TEMP . S_IPRANGE_BLOCKED_L1);
            //show_post_successful_fake($resto);
            //return;
          }
          
          if (!$_pwd_known && $resto && $has_image && BOARD_DIR === 'vg' && strpos($_thread_sub, '/bag/') !== false && $browser_id === '04d2237a2') {
            $_bot_headers = spam_filter_format_http_headers($com, $country, "$insfile$ext", $_threat_score, $_req_sig);
            log_spam_filter_trigger('block_bag', BOARD_DIR, $resto, $host, 1, $_bot_headers);
            error(S_IPRANGE_BLOCKED_IMG . ' ' . S_IPRANGE_BLOCKED_TEMP . S_IPRANGE_BLOCKED_L1);
          }
          
          if (false && !$_pwd_known && !$resto && (BOARD_DIR === 'co' || BOARD_DIR === 'a') && $country !== 'XX' && $browser_id === '02b99990d' && ($country == 'GB' || $country == 'DE' || $country == 'AU' || strpos($_COOKIE['_tcs'], $_SERVER['HTTP_X_TIMEZONE']) === false)) {
            $_bot_headers = spam_filter_format_http_headers($com, $country, "$insfile$ext", $_threat_score, $_req_sig);
            log_spam_filter_trigger('block_peridot', BOARD_DIR, $resto, $host, 1, $_bot_headers);
            error(S_IPRANGE_BLOCKED_IMG . ' ' . S_IPRANGE_BLOCKED_TEMP . S_IPRANGE_BLOCKED_L1);
          }
          
          if (!$_pwd_trusted && $resto && $has_image && BOARD_DIR === 'vg' && strpos($_thread_sub, 'granblue') !== false) {
            $_bot_headers = spam_filter_format_http_headers($com, $country, "$insfile$ext", $_threat_score, $_req_sig);
            log_spam_filter_trigger('block_gbfg', BOARD_DIR, $resto, $host, 1, $_bot_headers);
            error(S_IPRANGE_BLOCKED_IMG . ' ' . S_IPRANGE_BLOCKED_TEMP . S_IPRANGE_BLOCKED_L1);
            //show_post_successful_fake($resto);
            //return;
          }
          
          if (!$_pwd_known && $resto && $has_image && BOARD_DIR === 'v' && strpos($_thread_sub, 'gamesdonequick') !== false && $_threat_score >= 0.09 && mt_rand(0, 9) >= 1) {
            $_bot_headers = spam_filter_format_http_headers($com, $country, "$insfile$ext", $_threat_score, $_req_sig);
            log_spam_filter_trigger('block_adgq', BOARD_DIR, $resto, $host, 1, $_bot_headers);
            show_post_successful_fake($resto);
            return;
          }
          
          if (!$_pwd_known && $resto && $has_image && BOARD_DIR === 'vg' && strpos($_thread_sub, '/zzz/') !== false && $_threat_score >= 0.09 && mt_rand(0, 9) >= 1) {
            $_bot_headers = spam_filter_format_http_headers($com, $country, "$insfile$ext", $_threat_score, $_req_sig);
            log_spam_filter_trigger('block_zzz', BOARD_DIR, $resto, $host, 1, $_bot_headers);
            show_post_successful_fake($resto);
            return;
          }
          
          if (!$_pwd_verified && $resto && $has_image && BOARD_DIR === 'vg' && strpos($_thread_sub, '/funkg/') !== false && $_threat_score >= 0.09) {
            $_bot_headers = spam_filter_format_http_headers($com, $country, "$insfile$ext", $_threat_score, $_req_sig);
            log_spam_filter_trigger('block_funkg', BOARD_DIR, $resto, $host, 1, $_bot_headers);
            show_post_successful_fake($resto);
            return;
          }

    4chan.org. Хардкод бан. Продолжение https://govnokod.ru/29122.

    Админы, берите на заметку на свои форумы.

    trusted, known это проверки на число постов, связанных с куки+айпи.

    lemur, 22 Апреля 2025

    Комментарии (28)
  8. PHP / Говнокод #29122

    +1

    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
    $css .= '<link rel="stylesheet" href="' . STATIC_SERVER . 'css/' . $mobilecss . '">';
    	
      // April 2024
      $css .= '<link rel="stylesheet" href="' . STATIC_SERVER . 'css/xa24extra.css">';
      
    	if (SHOW_COUNTRY_FLAGS) {
    		$css .= '<link rel="stylesheet" href="' . STATIC_SERVER . 'css/flags.' . CSS_VERSION_FLAGS . '.css">';
    	}
      
      if (ENABLE_BOARD_FLAGS) {
        $_flags_type = (defined('BOARD_FLAGS_TYPE') && BOARD_FLAGS_TYPE) ? BOARD_FLAGS_TYPE : BOARD_DIR;
        $css .= '<link rel="stylesheet" href="' . STATIC_SERVER . 'image/flags/' . $_flags_type . '/flags.' . CSS_VERSION_BOARD_FLAGS . '.css">';
      }
      
    	if( CODE_TAGS ) {
    		$css .= '<link rel="stylesheet" href="' . STATIC_SERVER . 'js/prettify/prettify.' . CSS_VERSION . '.css">';
    	}
    
    	// Various optional tags
    	if( USE_RSS == 1 ) {
    		$rss = '<link rel="alternate" title="RSS feed" href="/' . BOARD_DIR . '/index.rss" type="application/rss+xml">';
    	}
    
    	if( RTA == 1 ) {
    		$rta = '<meta name="rating" content="adult">';
    	}
    
    	if( defined( 'FAVICON' ) ) {
    		$favicon = '<link rel="shortcut icon" href="' . FAVICON . '">';
    	}
    	
    	$thread_unique_ips = 0;
    	$jsUniqueIps = '';
    	
    	if (SHOW_THREAD_UNIQUES) {
        if ($res) {
          $thread_unique_ips = get_unique_ip_count($res);
        }
        
        if ($thread_unique_ips) {
          $jsUniqueIps = 'var unique_ips = ' . $thread_unique_ips . ';';
        }
    	}
      
    	// js tags
    	$jsVersion   = TEST_BOARD ? JS_VERSION_TEST : JS_VERSION;
    	$comLen      = MAX_COM_CHARS;
    	$styleGroup  = style_group();
    	$maxFilesize = MAX_KB * 1024;
    	$maxLines    = MAX_LINES;
    	$jsCooldowns = json_encode(array(
    		'thread' => RENZOKU3,
    		'reply' => RENZOKU,
    		'image' => RENZOKU2
    	));
      
    	$tailSizeJs = '';
    	
      if ($res) {
        $tailSize = get_json_tail_size($res);
        
        if ($tailSize) {
          $tailSizeJs = ",tailSize = $tailSize";
        }
      }

    «Форчан» поломали.

    ISO, 15 Апреля 2025

    Комментарии (25)
  9. JavaScript / Говнокод #29121

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    // java types for typescript
    export type int = number;
    export type float= number;
    export type double = number;
    export type long = number;
    export type short = number;
    export type byte = number;
    export type char = string;
    export type boolean = boolean;
    export type void = void;

    veiny, 12 Апреля 2025

    Комментарии (24)
  10. Си / Говнокод #29119

    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
    void rtm_guard(void) {
        /*
            Don't even try to MS VC that stuff, zerobuffy 4eyes.
        */
        unsigned char buf0[0];
        unsigned a = 0xF001BA11;
        unsigned b = 0xF001BA11;
        unsigned c = 0x55550000;
        unsigned d = 0xF001BA11;
        unsigned e = 0xF001BA11;
        unsigned char buf1[0];
        ptrdiff_t diff = buf0 - buf1;
    
        const char* prnt;
        switch (diff) {
            case sizeof rtm_guard:
                prnt = "dear Nizhny Novgorod '-O1' lover";
                break;
            case sizeof (int):
                prnt = "'gcc -O0' bastard";
                break;
            default:
                prnt = "\b";
        };
    
        (diff == sizeof (int) || diff == sizeof rtm_guard) ?
        fprintf(stderr, "%s%s%s", 
                    "Hey you, ", prnt, ", what the hell are you trying to bang here w/o mandatory flags? Forgot something? \n"), abort() : 
        0;
    }

    Сodebomb в рантайме наложил. Но нафига? Присосаться хуком и послать курить джуника с лидом как рукопожато билдить?

    BCHARa, 08 Апреля 2025

    Комментарии (21)
  11. Куча / Говнокод #29127

    0

    1. 1
    Бесконечный оффтоп имени Гологуба #5

    #1: https://govnokod.ru/28992 https://govnokod.xyz/_28992
    #2: https://govnokod.ru/29053 https://govnokod.xyz/_29053
    #3: https://govnokod.ru/29075 https://govnokod.xyz/_29075
    #4: https://govnokod.ru/29110 https://govnokod.xyz/_29110

    nepeKamHblu_nemyx, 28 Апреля 2025

    Комментарии (20)