Enemy Territory CFG Checker.
Hallo ik ben bezig met een script om een CFG voor enemy territory te controleren.
Nu heb ik geconstateerd dat er spam word verstuurd vanaf mijn script/Textarea.
Door de Spam heeft de website al 3x op de blacklist gezet.
Hoe kan ik dit verbeteren.
http://luukdebresser.nl/CFG_Checker dit is de link naar het werkende script waar ook de spam mail van ingevoerd kan worden.
Nu heb ik geconstateerd dat er spam word verstuurd vanaf mijn script/Textarea.
Door de Spam heeft de website al 3x op de blacklist gezet.
Hoe kan ik dit verbeteren.
Code (php)
1
2
3
4
5
6
7
8
9
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
94
95
96
97
98
99
100
2
3
4
5
6
7
8
9
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
94
95
96
97
98
99
100
<?php
function parse_gamecolors($string)
{
$string = str_replace('"', '^7"', $string);
$string = str_replace(";", '^7;', $string);
$string = str_replace(PHP_EOL, PHP_EOL.'^7', $string);
$string = preg_replace("/(\^)?$/", "^", $string);
$string = preg_replace("/\^\^/", "^^", $string);
$string = preg_replace("/(\^)?$/", "", $string);
$string = preg_replace("/\^</", "^|", $string);
$string = preg_replace("/\</", "<", $string);
$string = preg_replace("/\^>/", "^^", $string);
$string = preg_replace("/\>/", ">", $string);
$string = preg_replace("/\^\^/", "^>", $string);
$string = "<font color=\"#FFFFFF\">".$string."</font>";
$color_def = array
(
0 => "#000000", 1 => "#FF0000", 2 => "#00FF00", 3 => "#FFFF00",
4 => "#0000FF", 5 => "#00FFFF", 6 => "#FF00FF", 7 => "#FFFFFF",
8 => "#FF7F00", 9 => "#7F7F7F", 10 => "#BFBFBF", 11 => "#007F00",
12 => "#7FFF00", 13 => "#00007F", 14 => "#7F0000", 15 => "#7F4000",
16 => "#FF9933", 17 => "#007F7F", 18 => "#7F007F", 19 => "#007FFF",
20 => "#7F00FF", 21 => "#3399CC", 22 => "#CCFFCC", 23 => "#006633",
24 => "#FF0033", 25 => "#B21919", 26 => "#993300", 27 => "#CC9933",
28 => "#999933", 29 => "#FFFFBF", 30 => "#FFFF7F"
);
$color_chardef = array
(
"#000000" => array ( 0 => "0", 1 => "P", 2 => "p", 3 => "°", 4 => "Ð", 5 => "ð" ),
"#FF0000" => array ( 0 => "1", 1 => "Q", 2 => "q", 3 => "±", 4 => "Ñ", 5 => "ñ" ),
"#00FF00" => array ( 0 => "2", 1 => "R", 2 => "r", 3 => "²", 4 => "Ò", 5 => "ò" ),
"#FFFF00" => array ( 0 => "3", 1 => "S", 2 => "s", 3 => "³", 4 => "Ó", 5 => "ó" ),
"#0000FF" => array ( 0 => "4", 1 => "T", 2 => "t", 3 => "Ž", 4 => "Ô", 5 => "ô" ),
"#00FFFF" => array ( 0 => "5", 1 => "U", 2 => "u", 3 => "µ", 4 => "Õ", 5 => "õ" ),
"#FF00FF" => array ( 0 => "6", 1 => "V", 2 => "v", 3 => "¶", 4 => "Ö", 5 => "ö" ),
"#FFFFFF" => array ( 0 => "7", 1 => "W", 2 => "w", 3 => "·", 4 => "×", 5 => "÷" ),
"#FF7F00" => array ( 0 => "8", 1 => "X", 2 => "x", 3 => "ž", 4 => "Ø", 5 => "ø" ),
"#7F7F7F" => array ( 0 => "9", 1 => "Y", 2 => "y", 3 => "¹", 4 => "Ù", 5 => "ù" ),
"#BFBFBF" => array ( 0 => ":", 1 => "Z", 2 => "z", 3 => "º", 4 => "Ú", 5 => "ú",
6 => ";", 7 => "[", 8 => "{", 9 => "»", 10 => "Û", 11 => "û" ),
"#007F00" => array ( 0 => "<", 1 => "\\", 2 => "|", 3 => "Œ", 4 => "Ü", 5 => "ü" ),
"#7FFF00" => array ( 0 => "=", 1 => "]", 2 => "}", 3 => "œ", 4 => "Ý", 5 => "ý" ),
"#00007F" => array ( 0 => ">", 1 => "^", 2 => "~", 3 => "Ÿ", 4 => "Þ", 5 => "þ" ),
"#7F0000" => array ( 0 => "?", 1 => "_", 2 => "¿", 3 => "ß", 4 => "ÿ" ),
"#7F4000" => array ( 0 => "@", 1 => "`", 2 => "À", 3 => "à" ),
"#FF9933" => array ( 0 => "A", 1 => "a", 2 => "!", 3 => "¡", 4 => "Á", 5 => "á" ),
"#007F7F" => array ( 0 => "B", 1 => "b", 2 => "â", 3 => "¢", 4 => "Â" ),
"#7F007F" => array ( 0 => "C", 1 => "c", 2 => "#", 3 => "£", 4 => "Ã", 5 => "ã" ),
"#007FFF" => array ( 0 => "D", 1 => "d", 2 => "$", 3 => "€", 4 => "Ä", 5 => "ä" ),
"#7F00FF" => array ( 0 => "E", 1 => "e", 2 => "%", 3 => "¥", 4 => "Å", 5 => "å" ),
"#3399CC" => array ( 0 => "F", 1 => "f", 2 => "&", 3 => "Š", 4 => "Æ", 5 => "æ" ),
"#CCFFCC" => array ( 0 => "G", 1 => "g", 2 => "'", 3 => "§", 4 => "Ç", 5 => "ç" ),
"#006633" => array ( 0 => "H", 1 => "h", 2 => "(", 3 => "š", 4 => "È", 5 => "è" ),
"#FF0033" => array ( 0 => "I", 1 => "i", 2 => ")", 3 => "©", 4 => "É", 5 => "É" ),
"#B21919" => array ( 0 => "J", 1 => "j", 2 => "*", 3 => "ª", 4 => "Ê", 5 => "ê" ),
"#993300" => array ( 0 => "K", 1 => "k", 2 => "+", 3 => "«", 4 => "Ë", 5 => "ë" ),
"#CC9933" => array ( 0 => "L", 1 => "l", 2 => ",", 3 => "¬", 4 => "Ì", 5 => "ì" ),
"#999933" => array ( 0 => "M", 1 => "m", 2 => "-", 3 => "Í", 4 => "í" ),
"#FFFFBF" => array ( 0 => "N", 1 => "n", 2 => ".", 3 => "®", 4 => "Î", 5 => "î" ),
"#FFFF7F" => array ( 0 => "O", 1 => "o", 2 => "/", 3 => "¯", 4 => "Ï", 5 => "ï" )
);
for ($cd1 = 0; $cd1 < 31; $cd1++)
{
for ($cd2 = 0; $cd2 < count($color_chardef[$color_def[$cd1]]); $cd2++)
{
$string = str_replace("^". $color_chardef[$color_def[$cd1]][$cd2], "</FONT><FONT COLOR=\"" . $color_def[$cd1] . "\">", $string);
}
}
return $string;
}
function SecureData($string)
{
//$string = stripslashes($string);
$string = htmlspecialchars($string);
return $string;
}
if($_POST['action']=="check"){
$CFG = SecureData($_POST['cfg']);
//$CFG= htmlspecialchars($_POST['cfg']);
echo nl2br(parse_gamecolors($_POST['cfg']));
?>
<form action="cfg_checker.php" method="post">
<input type="hidden" name="action" value="check" />
<textarea name="cfg" style="width:743px; min-height:400px;"><?php echo $CFG; ?></textarea><br /><br />
<input type="submit" value="Check" style="margin:0 336px;" />
</form>
<?php
} else {
?>
<form action="cfg_checker.php" method="post">
<input type="hidden" name="action" value="check" />
<textarea name="cfg" style="width:743px; min-height:400px;"></textarea><br /><br />
<input type="submit" value="Check" style="margin:0 336px;" />
</form>
<?php
}
?>
function parse_gamecolors($string)
{
$string = str_replace('"', '^7"', $string);
$string = str_replace(";", '^7;', $string);
$string = str_replace(PHP_EOL, PHP_EOL.'^7', $string);
$string = preg_replace("/(\^)?$/", "^", $string);
$string = preg_replace("/\^\^/", "^^", $string);
$string = preg_replace("/(\^)?$/", "", $string);
$string = preg_replace("/\^</", "^|", $string);
$string = preg_replace("/\</", "<", $string);
$string = preg_replace("/\^>/", "^^", $string);
$string = preg_replace("/\>/", ">", $string);
$string = preg_replace("/\^\^/", "^>", $string);
$string = "<font color=\"#FFFFFF\">".$string."</font>";
$color_def = array
(
0 => "#000000", 1 => "#FF0000", 2 => "#00FF00", 3 => "#FFFF00",
4 => "#0000FF", 5 => "#00FFFF", 6 => "#FF00FF", 7 => "#FFFFFF",
8 => "#FF7F00", 9 => "#7F7F7F", 10 => "#BFBFBF", 11 => "#007F00",
12 => "#7FFF00", 13 => "#00007F", 14 => "#7F0000", 15 => "#7F4000",
16 => "#FF9933", 17 => "#007F7F", 18 => "#7F007F", 19 => "#007FFF",
20 => "#7F00FF", 21 => "#3399CC", 22 => "#CCFFCC", 23 => "#006633",
24 => "#FF0033", 25 => "#B21919", 26 => "#993300", 27 => "#CC9933",
28 => "#999933", 29 => "#FFFFBF", 30 => "#FFFF7F"
);
$color_chardef = array
(
"#000000" => array ( 0 => "0", 1 => "P", 2 => "p", 3 => "°", 4 => "Ð", 5 => "ð" ),
"#FF0000" => array ( 0 => "1", 1 => "Q", 2 => "q", 3 => "±", 4 => "Ñ", 5 => "ñ" ),
"#00FF00" => array ( 0 => "2", 1 => "R", 2 => "r", 3 => "²", 4 => "Ò", 5 => "ò" ),
"#FFFF00" => array ( 0 => "3", 1 => "S", 2 => "s", 3 => "³", 4 => "Ó", 5 => "ó" ),
"#0000FF" => array ( 0 => "4", 1 => "T", 2 => "t", 3 => "Ž", 4 => "Ô", 5 => "ô" ),
"#00FFFF" => array ( 0 => "5", 1 => "U", 2 => "u", 3 => "µ", 4 => "Õ", 5 => "õ" ),
"#FF00FF" => array ( 0 => "6", 1 => "V", 2 => "v", 3 => "¶", 4 => "Ö", 5 => "ö" ),
"#FFFFFF" => array ( 0 => "7", 1 => "W", 2 => "w", 3 => "·", 4 => "×", 5 => "÷" ),
"#FF7F00" => array ( 0 => "8", 1 => "X", 2 => "x", 3 => "ž", 4 => "Ø", 5 => "ø" ),
"#7F7F7F" => array ( 0 => "9", 1 => "Y", 2 => "y", 3 => "¹", 4 => "Ù", 5 => "ù" ),
"#BFBFBF" => array ( 0 => ":", 1 => "Z", 2 => "z", 3 => "º", 4 => "Ú", 5 => "ú",
6 => ";", 7 => "[", 8 => "{", 9 => "»", 10 => "Û", 11 => "û" ),
"#007F00" => array ( 0 => "<", 1 => "\\", 2 => "|", 3 => "Œ", 4 => "Ü", 5 => "ü" ),
"#7FFF00" => array ( 0 => "=", 1 => "]", 2 => "}", 3 => "œ", 4 => "Ý", 5 => "ý" ),
"#00007F" => array ( 0 => ">", 1 => "^", 2 => "~", 3 => "Ÿ", 4 => "Þ", 5 => "þ" ),
"#7F0000" => array ( 0 => "?", 1 => "_", 2 => "¿", 3 => "ß", 4 => "ÿ" ),
"#7F4000" => array ( 0 => "@", 1 => "`", 2 => "À", 3 => "à" ),
"#FF9933" => array ( 0 => "A", 1 => "a", 2 => "!", 3 => "¡", 4 => "Á", 5 => "á" ),
"#007F7F" => array ( 0 => "B", 1 => "b", 2 => "â", 3 => "¢", 4 => "Â" ),
"#7F007F" => array ( 0 => "C", 1 => "c", 2 => "#", 3 => "£", 4 => "Ã", 5 => "ã" ),
"#007FFF" => array ( 0 => "D", 1 => "d", 2 => "$", 3 => "€", 4 => "Ä", 5 => "ä" ),
"#7F00FF" => array ( 0 => "E", 1 => "e", 2 => "%", 3 => "¥", 4 => "Å", 5 => "å" ),
"#3399CC" => array ( 0 => "F", 1 => "f", 2 => "&", 3 => "Š", 4 => "Æ", 5 => "æ" ),
"#CCFFCC" => array ( 0 => "G", 1 => "g", 2 => "'", 3 => "§", 4 => "Ç", 5 => "ç" ),
"#006633" => array ( 0 => "H", 1 => "h", 2 => "(", 3 => "š", 4 => "È", 5 => "è" ),
"#FF0033" => array ( 0 => "I", 1 => "i", 2 => ")", 3 => "©", 4 => "É", 5 => "É" ),
"#B21919" => array ( 0 => "J", 1 => "j", 2 => "*", 3 => "ª", 4 => "Ê", 5 => "ê" ),
"#993300" => array ( 0 => "K", 1 => "k", 2 => "+", 3 => "«", 4 => "Ë", 5 => "ë" ),
"#CC9933" => array ( 0 => "L", 1 => "l", 2 => ",", 3 => "¬", 4 => "Ì", 5 => "ì" ),
"#999933" => array ( 0 => "M", 1 => "m", 2 => "-", 3 => "Í", 4 => "í" ),
"#FFFFBF" => array ( 0 => "N", 1 => "n", 2 => ".", 3 => "®", 4 => "Î", 5 => "î" ),
"#FFFF7F" => array ( 0 => "O", 1 => "o", 2 => "/", 3 => "¯", 4 => "Ï", 5 => "ï" )
);
for ($cd1 = 0; $cd1 < 31; $cd1++)
{
for ($cd2 = 0; $cd2 < count($color_chardef[$color_def[$cd1]]); $cd2++)
{
$string = str_replace("^". $color_chardef[$color_def[$cd1]][$cd2], "</FONT><FONT COLOR=\"" . $color_def[$cd1] . "\">", $string);
}
}
return $string;
}
function SecureData($string)
{
//$string = stripslashes($string);
$string = htmlspecialchars($string);
return $string;
}
if($_POST['action']=="check"){
$CFG = SecureData($_POST['cfg']);
//$CFG= htmlspecialchars($_POST['cfg']);
echo nl2br(parse_gamecolors($_POST['cfg']));
?>
<form action="cfg_checker.php" method="post">
<input type="hidden" name="action" value="check" />
<textarea name="cfg" style="width:743px; min-height:400px;"><?php echo $CFG; ?></textarea><br /><br />
<input type="submit" value="Check" style="margin:0 336px;" />
</form>
<?php
} else {
?>
<form action="cfg_checker.php" method="post">
<input type="hidden" name="action" value="check" />
<textarea name="cfg" style="width:743px; min-height:400px;"></textarea><br /><br />
<input type="submit" value="Check" style="margin:0 336px;" />
</form>
<?php
}
?>
Gewijzigd op 18/01/2012 15:54:49 door Luuk de Bresser
Zou je jouw code kunnen beperken tot relevante code?
Captcha installeren, of een eigen genereren.
of
Een tijd-limiet erop zetten. Dus de gebruikers bij het versturen een tijd in een sessie zetten ofzo en pas na zoveel tijd mag er een 2e gestuurd worden.
of
Een tijd-limiet erop zetten. Dus de gebruikers bij het versturen een tijd in een sessie zetten ofzo en pas na zoveel tijd mag er een 2e gestuurd worden.
@Aar Code is ingeperkt to de relevante code.
@Rick Captcha is al gekraakt en het zorgt er niet voor dat ze geen spam mail kunnen sturen.
@Rick Captcha is al gekraakt en het zorgt er niet voor dat ze geen spam mail kunnen sturen.
Ja alles wat gemaakt word kan gekraakt worden.
SPAM zal je denk ik altijd houden, maar dit zijn mijn oplossingen.
Het zal denk ik wel aanzienlijk verminderen..
SPAM zal je denk ik altijd houden, maar dit zijn mijn oplossingen.
Het zal denk ik wel aanzienlijk verminderen..
Maak een nieuw input veld aan, geef hem display:none mee en value 0. Controleer bij de afhandeling of de value is veranderd.
@rick Captcha is al gekraakt zelfs recaptcha is al te omzeilen.
Het moet toch mogelijk zijn.
Dat hun geen php/javascript code meer kunnen execute
Het moet toch mogelijk zijn.
Dat hun geen php/javascript code meer kunnen execute
Gewijzigd op 18/01/2012 15:59:34 door Luuk de Bresser
Ja dat is een stukje beveiliging in je script :P
htmldecode of htmlspecialcharacters
Kijk even daarop php.net
Die breekt alle code taal af naar gewone leestekens.
htmldecode of htmlspecialcharacters
Kijk even daarop php.net
Die breekt alle code taal af naar gewone leestekens.
htmlentities() en mysql_real_escape_string() handelt daar mee af.
Bedankt voor jullie hulp.
ik hoop dat het nu opgelost is maar dat weten we pas wanneer we weer op een blacklist komen.
ik hoop dat het nu opgelost is maar dat weten we pas wanneer we weer op een blacklist komen.
Wolfenstein Enemy Territory is een te vet spel, ondanks er niet zo heel veel spelers meer voor zijn. Speel het nog wekelijks ;)
Hertog Jan op 18/01/2012 17:43:17:
Wolfenstein Enemy Territory is een te vet spel, ondanks er niet zo heel veel spelers meer voor zijn. Speel het nog wekelijks ;)
Voor ET zijn nog redelijk veel mensen.
Ik heb eigen server en clan waar ik dit script ook voor scrijf.
Ik zie wel dat het afgelopen jaar veel mensen weg zijn gegaan bij ET dit om nieuwe spellen te gaan spelen zoals BF3 en MW3 maar die mensen komen uit eindelijk naar een paar maanden weer terug.




