-
Лучший говнокод
- В номинации:
-
- За время:
-
-
+171
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
// Сначала я увидел такой самонадеянный способ "послать нахуй все инъекции" (magic_quotes_gpc при этом вообще не проверялись :-))
# Посылаем смело нахуй все инъекции
foreach($_GET as $name => $value){
$_GET[$name] = mysql_real_escape_string($value);
}
foreach($_POST as $name => $value){
$_POST[$name] = mysql_real_escape_string($value);
}
// А потом - следующее (обратите внимание на отсутствие кавычек для GET параметров)
$result = mysql_query("SELECT * FROM ".$_GET['index_country']." WHERE id = ".$_GET['index_to_edit']);
Хочется передать автору этого креатива большое спасибо за то, что доставил мне массу лулзов при нахождении этого и других багов :-) Если народ и дальше будет думать, что этого достаточно чтобы избавиться от инъекций, я без денег точно не останусь )))))))))))
skrostislav,
05 Апреля 2010
-
+167.8
- 1
- 2
- 3
if($_GET['admin']=='da'){
echo 'adminka_true';
}
А самое страшное, что писал это я...
Armanio,
03 Апреля 2010
-
−133.6
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
nettest() {
ping -c $1 $2 > /dev/null 2>&1
if [ "$?" -eq "0" ] ; then
true
else
false
fi
}
idroot() {
if [ "`id -u`" -eq "0" ] ; then
true
else
false
fi
}
greenc() {
printf "\033[1;32;40m$1"
}
redc() {
printf "\033[1;31;40m$1"
}
yellowc() {
printf "\033[1;33;40m$1"
}
whitec() {
printf "\033[1;37;40m$1"
}
normc() {
printf "\033[0;37;40m$1"
}
grayc() {
printf "\033[1;30;40m$1"
}
Мудак который это написал - я :))
Нужна была небольшая библиотека для скрипта.
buildworld,
28 Марта 2010
-
+72.7
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
#ifndef Binary_h
#define Binary_h
#define B0 0
#define B00 0
#define B000 0
#define B0000 0
#define B00000 0
#define B000000 0
#define B0000000 0
#define B00000000 0
#define B1 1
#define B01 1
#define B001 1
#define B0001 1
#define B00001 1
#define B000001 1
#define B0000001 1
#define B00000001 1
#define B10 2
#define B010 2
#define B0010 2
#define B00010 2
#define B000010 2
#define B0000010 2
#define B00000010 2
#define B11 3
#define B011 3
#define B0011 3
#define B00011 3
#define B000011 3
#define B0000011 3
#define B00000011 3
#define B100 4
#define B0100 4
#define B00100 4
#define B000100 4
#define B0000100 4
#define B00000100 4
#define B101 5
#define B0101 5
#define B00101 5
#define B000101 5
#define B0000101 5
#define B00000101 5
#define B110 6
#define B0110 6
#define B00110 6
#define B000110 6
#define B0000110 6
#define B00000110 6
#define B111 7
#define B0111 7
#define B00111 7
#define B000111 7
#define B0000111 7
#define B00000111 7
#define B1000 8
#define B01000 8
#define B001000 8
#define B0001000 8
#define B00001000 8
#define B1001 9
#define B01001 9
#define B001001 9
#define B0001001 9
#define B00001001 9
#define B1010 10
#define B01010 10
#define B001010 10
#define B0001010 10
#define B00001010 10
#define B1011 11
#define B01011 11
#define B001011 11
#define B0001011 11
#define B00001011 11
#define B1100 12
#define B01100 12
#define B001100 12
#define B0001100 12
#define B00001100 12
#define B1101 13
#define B01101 13
#define B001101 13
#define B0001101 13
#define B00001101 13
#define B1110 14
#define B01110 14
#define B001110 14
#define B0001110 14
#define B00001110 14
//и.т.д.до значения 255
файл binary.h из пакета arduino
danilissimus,
10 Марта 2010
-
+181.3
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
$str=тут запрос и всё такое сам поймёшь Например Ник или Пароль;
$col=strlen($str);
for($i=0; $i <= $col ;$i++)
{
$d=1;
$b= substr($str,$i,$d);
$d++;
if($b == chr(92)) { exit ("Hack attemp!!!"); }
}
http://www.askdev.ru/question/1427/Как-защититься-от-sql-инъекций/#answer2891
pingw33n,
10 Марта 2010
-
+145.7
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
<?php
do{
$id=$test['id'];
?>
...
<?php
}while($test = mysql_fetch_array($temp));
?>
creatizmo,
02 Марта 2010
-
+156.5
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
<?
function antimat ($string = "", $replace = "")
{
if (!$replace) $replace="[beep]";
$slovar = "уроды мудаки скоты чмо манда /* ...и много чего еще в том же духе*/ ";
$ar_slovar = explode(" ", $slovar);
$ar_string = explode(" ", $string);
$result = "";
foreach ($ar_string as $string) {
foreach ($ar_slovar as $slovar) {
if ($string==$slovar) $string = str_replace($slovar, $replace, $string);
}
$result.= $string." ";
}
return $result;
}//function
?>
Гениальная реализация антимата. Стояла на одном весьма солидном сайте, забавляя юзеров гостевой.
А вы не знали, что слова "команда" и "подстрахуй" - ужасно нецензурные?
wlad,
01 Марта 2010
-
+101.6
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
procedure GaussMas ( n:integer;a: Matr;var rezult:V10);
var
s,s1:extended;
m,i,j,k,km,jm:integer;
z,d: array [0..10] of Extended ;
label m2;
begin
//..............................
for i := 1 to n do
begin
for j := 1 to n do
if (a[i][j]>0.9) then
begin
rezult[j]:=a[i][m];
goto m2;
end;
m2: continue;
end;
end;
Процедура расчета матрицы по методу Гаусса.
Форматирование сохранено как есть.
Grizzly,
01 Февраля 2010
-
+168.4
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
<?php
set_time_limit (0);
for($i=0; $i<100; $i++) {
$xm=100-$i;
$to = '[email protected]';
$subject = "WebKill, письмо номер $i";
$message = "Привет Саня, это письмо номер $i, осталось получить ещё $xm писем :D";
$headers = 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
}
echo "Ok";
?>
флудилка от Уебкилла
xXx_totalwar,
25 Января 2010
-
+144.8
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
__inline BOOL
SearchOneDirectory(
IN LPSTR Directory,
IN LPSTR FileToFind,
IN LPSTR SourceFullName,
IN LPSTR SourceFilePart,
OUT PBOOL FoundInTree
)
{
//
// This was way too slow. Just say we didn't find the file.
//
*FoundInTree = FALSE;
return(TRUE);
}
Оптимизация by Microsoft. Шедевр из утёкших в 2004 году исходников Windows, заставило посмеятся, веселые у Микрософта заглушки
Sauron,
16 Января 2010