Bonjour j'ai un code source et je voulais savoir s'il était fiable ou non, car on m'a dit qu'il ne l'était pas.
Le voila :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
if(isset($_POST['methode'],$_POST['var'])
&& is_string($_POST['methode']) && is_string($_POST['var']))
{
	$var     = htmlentities($_POST['var']);
	$methode = htmlentities($_POST['methode']);
 
	echo $methode($var);
}
else
{
	echo '<h1>--- Hash de texte online ---</h1>
	<form method="post" action="index.php">
		Texte a hasher : <input type="text" name="var" />
		<input type="submit" name="methode" value="md5" />
		<input type="submit" name="methode" value="sha1" />
		<input type="submit" name="methode" value="crypt" />
	</form>';
}
?>
Alors est-il fiable ?