Accueil > > > CRYPTEUR/DÉCRYPTEUR DE TEXTE AVEC MOT DE PASSE À 4 CHIFFRES !!!
CRYPTEUR/DÉCRYPTEUR DE TEXTE AVEC MOT DE PASSE À 4 CHIFFRES !!!
Information sur la source
Description
Bonjour tout le monde, aujourduit, je poste un crypteur/décrypteur de texte avec un mot de passe à 4 chiffres (qui sert en fait à une clé de cryptage). Exemple: "Bonjour, je m'appel Thomas, j'ai 12 ans et mon pseudo est thomvaill." crypté avec le mot de passe 1225 donne: "B°+~°^¤, ~* %'`==*[ T|°%`§, ~'`{ 12 `+§ */ %°+ =§*^£° *§/ /|°%\ `{[[." Et pour décrypter ce message, je serai obligé de mettre le mot de passe 1225, si je donne un autre mot de passe, sa sera illisible. Par ex, je met le mot de passe: 1234, sa donne: "Boqjosp, je r'annel Thoraw, j'ai 12 aqw et roq nwesdo ewt thorvaill." Voila le travail ! Mais, vous allez voir la longeur de la source, j'ai passé beaucoups de temps dessus !!!
Source
- //Voila la source, un peut grande, je sais (779 lignes !!!)(exscusez moi LoL) mais, il y a aussi le ZIP !
-
- <!-- Crée par Thomas VAILLANT: thomas.vaillant-76@laposte.net -->
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Crypteur de texte par Thomas VAILLANT</title>
- </head>
-
- <body>
- <?php
- @$action=$_GET['action'];
-
- if($action == ""){ //Si il n'y a pas d'action, on écrit la page ci-dessous (pour que l'utilisateur puisse crypter/décrypter son texte)
- echo("<h1><strong>Bienvenue sur le crypteur de texte !</strong></h1>");
- echo("<p>Entrez votre texte à crypter dans le champ ci-dessous: </p>");
- echo("<form name=form-crypt method=post action=index.php?action=crypt>");
- echo(" <textarea name=textacrypter cols=50 id=text></textarea>");
- echo(" <br>");
- echo("ATTENTION: Les lettre en majuscules, les lettres avec des accents et les chiffres ne serons pas cryptés ! <br> ATTENTION: Ne pas utiliser les caractères suivants: * $ £ } ] @ ` | [ { # ~ & ¤ µ % ° + = ^ \ / ² § car il y aurait des conflits <br>");
- echo("Et entrez un mot de passe avec à QUATRE CHIFFRES (ex: 0106 , 9999 ect...)<br>");
- echo("Mot de passe: <input name=mdpcrypt1 type=text id=mdpcrypt1 value=0 size=1 maxlength=1><input name=mdpcrypt2 type=text id=mdpcrypt2 value=0 size=1 maxlength=1><input name=mdpcrypt3 type=text id=mdpcrypt3 value=0 size=1 maxlength=1><input name=mdpcrypt4 type=text id=mdpcrypt4 value=0 size=1 maxlength=1> <br>");
- echo(" <input name=crypter type=submit id=crypter value=Crypter !>");
- echo("</form>");
- echo("<hr>");
- echo("<p>Entrez votre texte à décrypter dans le champ ci-dessous: </p>");
- echo("<form name=form-decrypt method=post action=index.php?action=decrypt>");
- echo(" <textarea name=textadecrypter cols=50 id=text></textarea>");
- echo("Mot de passe: <input name=mdpdecrypt1 type=text id=mdpdecrypt1 value=0 size=1 maxlength=1><input name=mdpdecrypt2 type=text id=mdpdecrypt2 value=0 size=1 maxlength=1><input name=mdpdecrypt3 type=text id=mdpdecrypt3 value=0 size=1 maxlength=1><input name=mdpdecrypt4 type=text id=mdpdecrypt4 value=0 size=1 maxlength=1> <br>");
- echo(" <input name=decrypter type=submit id=decrypter value=Décrypter !>");
- echo("</form>");
-
-
-
-
-
- echo("<br><br><br> Crée par <a href=mailto:thomas.vaillant-76@laposte.net> © Thomas VAILLANT © </a>");
- }
-
- if($action == "crypt"){ //Si l'action est "crypt", on écrit le programme de cryptage
- $textacrypter=$_POST['textacrypter']; //On récupère le texte non crypté de l'utilisateur
- $mdpcrypt1=$_POST['mdpcrypt1']; //On récupère le premier chiffre du mot de passe à utiliser pour crypter le texte (qui va en fait servire de clé de cryptage)
- $mdpcrypt2=$_POST['mdpcrypt2']; //On récupère le deuxième chiffre du mot de passe à utiliser pour crypter le texte (qui va en fait servire de clé de cryptage)
- $mdpcrypt3=$_POST['mdpcrypt3']; //On récupère le troisième chiffre du mot de passe à utiliser pour crypter le texte (qui va en fait servire de clé de cryptage)
- $mdpcrypt4=$_POST['mdpcrypt4']; //On récupère le quatrième chiffre du mot de passe à utiliser pour crypter le texte (qui va en fait servire de clé de cryptage)
-
- //<---------------------------------------------------------------------------------------------------->
- // CREATION DE LA CLE DE CRYPTAGE:
-
- //Alphabé de $mdpcrypt1:
- if($mdpcrypt1 == 0){
- $a="*";
- $b="£";
- $c="}";
- $d="]";
- $e="@";
- $f="`";
- }
- if($mdpcrypt1 == 1){
- $a="`";
- $b="]";
- $c="}";
- $d="£";
- $e="*";
- $f="@";
- }
- if($mdpcrypt1 == 2){
- $a="@";
- $b="`";
- $c="]";
- $d="}";
- $e="£";
- $f="*";
- }
- if($mdpcrypt1 == 3){
- $a="£";
- $b="}";
- $c="@";
- $d="*";
- $e="`";
- $f="]";
- }
- if($mdpcrypt1 == 4){
- $a="}";
- $b="`";
- $c="£";
- $d="@";
- $e="]";
- $f="*";
- }
- if($mdpcrypt1 == 5){
- $a="@";
- $b="]";
- $c="}";
- $d="£";
- $e="`";
- $f="*";
- }
- if($mdpcrypt1 == 6){
- $a="}";
- $b="`";
- $c="]";
- $d="@";
- $e="*";
- $f="£";
- }
- if($mdpcrypt1 == 7){
- $a="*";
- $b="£";
- $c="}";
- $d="]";
- $e="@";
- $f="`";
- }
- if($mdpcrypt1 == 8){
- $a="@";
- $b="}";
- $c="`";
- $d="*";
- $e="£";
- $f="]";
- }
- if($mdpcrypt1 == 9){
- $a="]";
- $b="@";
- $c="`";
- $d="£";
- $e="*";
- $f="}";
- }
-
- //Alphabé de $mdpcrypt2:
- if($mdpcrypt2 == 0){
- $g="&";
- $h="~";
- $i="#";
- $j="{";
- $k="[";
- $l="|";
- }
- if($mdpcrypt2 == 1){
- $g="|";
- $h="{";
- $i="#";
- $j="[";
- $k="&";
- $l="~";
- }
- if($mdpcrypt2 == 2){
- $g="#";
- $h="|";
- $i="{";
- $j="~";
- $k="&";
- $l="[";
- }
- if($mdpcrypt2 == 3){
- $g="&";
- $h="~";
- $i="#";
- $j="{";
- $k="[";
- $l="|";
- }
- if($mdpcrypt2 == 4){
- $g="#";
- $h="[";
- $i="{";
- $j="~";
- $k="&";
- $l="|";
- }
- if($mdpcrypt2 == 5){
- $g="|";
- $h="{";
- $i="[";
- $j="&";
- $k="~";
- $l="#";
- }
- if($mdpcrypt2 == 6){
- $g="#";
- $h="&";
- $i="~";
- $j="[";
- $k="{";
- $l="|";
- }
- if($mdpcrypt2 == 7){
- $g="{";
- $h="&";
- $i="|";
- $j="~";
- $k="[";
- $l="#";
- }
- if($mdpcrypt2 == 8){
- $g="|";
- $h="#";
- $i="~";
- $j="[";
- $k="{";
- $l="&";
- }
- if($mdpcrypt2 == 9){
- $g="&";
- $h="#";
- $i="|";
- $j="~";
- $k="[";
- $l="{";
- }
-
- //Alphabé de $mdpcrypt3:
- if($mdpcrypt3 == 0){
- $m="¤";
- $n="+";
- $o="=";
- $p="°";
- $q="%";
- $r="µ";
- }
- if($mdpcrypt3 == 1){
- $m="+";
- $n="µ";
- $o="%";
- $p="=";
- $q="¤";
- $r="°";
- }
- if($mdpcrypt3 == 2){
- $m="%";
- $n="+";
- $o="°";
- $p="=";
- $q="µ";
- $r="¤";
- }
- if($mdpcrypt3 == 3){
- $m="µ";
- $n="=";
- $o="°";
- $p="¤";
- $q="+";
- $r="%";
- }
- if($mdpcrypt3 == 4){
- $m="=";
- $n="°";
- $o="%";
- $p="µ";
- $q="+";
- $r="¤";
- }
- if($mdpcrypt3 == 5){
- $m="+";
- $n="%";
- $o="µ";
- $p="¤";
- $q="=";
- $r="°";
- }
- if($mdpcrypt3 == 6){
- $m="°";
- $n="¤";
- $o="=";
- $p="µ";
- $q="+";
- $r="%";
- }
- if($mdpcrypt3 == 7){
- $m="¤";
- $n="%";
- $o="=";
- $p="+";
- $q="°";
- $r="µ";
- }
- if($mdpcrypt3 == 8){
- $m="µ";
- $n="°";
- $o="%";
- $p="¤";
- $q="+";
- $r="=";
- }
- if($mdpcrypt3 == 9){
- $m="°";
- $n="+";
- $o="=";
- $p="%";
- $q="¤";
- $r="µ";
- }
-
- //Alphabé de $mdpcrypt4 (il n'y a pas assé de carractères pour crypter X, Y, Z donc, il ne serons pas cryptés):
- if($mdpcrypt4 == 0){
- $s="^";
- $t="²";
- $u="/";
- $v="\ ";
- $w="§";
- }
- if($mdpcrypt4 == 1){
- $s="²";
- $t="§";
- $u="/";
- $v="\ ";
- $w="^";
- }
- if($mdpcrypt4 == 2){
- $s="\ ";
- $t="²";
- $u="/";
- $v="^";
- $w="§";
- }
- if($mdpcrypt4 == 3){
- $s="/";
- $t="\ ";
- $u="§";
- $v="^";
- $w="²";
- }
- if($mdpcrypt4 == 4){
- $s="^";
- $t="/";
- $u="²";
- $v="\ ";
- $w="§";
- }
- if($mdpcrypt4 == 5){
- $s="§";
- $t="/";
- $u="^";
- $v="\ ";
- $w="²";
- }
- if($mdpcrypt4 == 6){
- $s="²";
- $t="^";
- $u="\ ";
- $v="§";
- $w="/";
- }
- if($mdpcrypt4 == 7){
- $s="\ ";
- $t="/";
- $u="²";
- $v="§";
- $w="^";
- }
- if($mdpcrypt4 == 8){
- $s="^";
- $t="/";
- $u="§";
- $v="\ ";
- $w="²";
- }
- if($mdpcrypt4 == 9){
- $s="^";
- $t="§";
- $u="^";
- $v="\\";
- $w="/ ";
- }
- // FIN DE LA CREATION DE LA CLE DE CRYPTAGE
- //<---------------------------------------------------------------------------------------->
-
- //On crypte avec la clé (en utilisant des str_replace() ):
- //Ex d'un str_replace: str_replace("lettre à remplacer","par cette lettre","le texte ou l'on doit remplacer");
-
- $textacrypter = str_replace("a",$a,$textacrypter);
- $textacrypter = str_replace("b",$b,$textacrypter);
- $textacrypter = str_replace("c",$c,$textacrypter);
- $textacrypter = str_replace("d",$d,$textacrypter);
- $textacrypter = str_replace("e",$e,$textacrypter);
- $textacrypter = str_replace("f",$f,$textacrypter);
- $textacrypter = str_replace("g",$g,$textacrypter);
- $textacrypter = str_replace("h",$h,$textacrypter);
- $textacrypter = str_replace("i",$i,$textacrypter);
- $textacrypter = str_replace("j",$j,$textacrypter);
- $textacrypter = str_replace("k",$k,$textacrypter);
- $textacrypter = str_replace("l",$l,$textacrypter);
- $textacrypter = str_replace("m",$m,$textacrypter);
- $textacrypter = str_replace("n",$n,$textacrypter);
- $textacrypter = str_replace("o",$o,$textacrypter);
- $textacrypter = str_replace("p",$p,$textacrypter);
- $textacrypter = str_replace("q",$q,$textacrypter);
- $textacrypter = str_replace("r",$r,$textacrypter);
- $textacrypter = str_replace("s",$s,$textacrypter);
- $textacrypter = str_replace("t",$t,$textacrypter);
- $textacrypter = str_replace("u",$u,$textacrypter);
- $textacrypter = str_replace("v",$v,$textacrypter);
- $textacrypter = str_replace("w",$w,$textacrypter);
-
- //On écrit le texte crypté de l'utilisateur:
- echo("Voici votre texte crypté: <br>");
- echo("<textarea name=textcryptenew cols=50 id=text>$textacrypter</textarea> Pour prendre votre texte crypté, faites un copié/collé !");
- echo("<br> ATTENTION: Si vous voulez décrypter votre texte, n'oubliez pas votre mot de passe ! (Votre mot de passe est: $mdpcrypt1$mdpcrypt2$mdpcrypt3$mdpcrypt4 )");
- echo("<br> <a href=index.php?action= >Retourner à l'index</a>");
-
-
-
-
-
- echo("<br><br><br> Crée par <a href=mailto:thomas.vaillant-76@laposte.net> © Thomas VAILLANT © </a>");
- }
- if($action == "decrypt"){ //Si l'action est: decrypt, on écrit le programme de décryptage:
- $textadecrypter=$_POST['textadecrypter']; //On récupère le texte à décrypter
- $mdpdecrypt1=$_POST['mdpdecrypt1']; //On récupère le premier chiffre du mot de passe à utiliser pour decrypter le texte (qui va en fait servire de clé de decryptage)
- $mdpdecrypt2=$_POST['mdpdecrypt2']; //On récupère le deuxième chiffre du mot de passe à utiliser pour decrypter le texte (qui va en fait servire de clé de decryptage)
- $mdpdecrypt3=$_POST['mdpdecrypt3']; //On récupère le troisième chiffre du mot de passe à utiliser pour decrypter le texte (qui va en fait servire de clé de decryptage)
- $mdpdecrypt4=$_POST['mdpdecrypt4']; //On récupère le quatrième chiffre du mot de passe à utiliser pour decrypter le texte (qui va en fait servire de clé de decryptage)
-
- //<------------------------------------------------------------------------------------------------>
- // CREATION DE LA CLE DE DECRYPTAGE:
-
- //Alphabé de $mdpdecrypt1:
- if($mdpdecrypt1 == 0){
- $a="*";
- $b="£";
- $c="}";
- $d="]";
- $e="@";
- $f="`";
- }
- if($mdpdecrypt1 == 1){
- $a="`";
- $b="]";
- $c="}";
- $d="£";
- $e="*";
- $f="@";
- }
- if($mdpdecrypt1 == 2){
- $a="@";
- $b="`";
- $c="]";
- $d="}";
- $e="£";
- $f="*";
- }
- if($mdpdecrypt1 == 3){
- $a="£";
- $b="}";
- $c="@";
- $d="*";
- $e="`";
- $f="]";
- }
- if($mdpdecrypt1 == 4){
- $a="}";
- $b="`";
- $c="£";
- $d="@";
- $e="]";
- $f="*";
- }
- if($mdpdecrypt1 == 5){
- $a="@";
- $b="]";
- $c="}";
- $d="£";
- $e="`";
- $f="*";
- }
- if($mdpdecrypt1 == 6){
- $a="}";
- $b="`";
- $c="]";
- $d="@";
- $e="*";
- $f="£";
- }
- if($mdpdecrypt1 == 7){
- $a="*";
- $b="£";
- $c="}";
- $d="]";
- $e="@";
- $f="`";
- }
- if($mdpdecrypt1 == 8){
- $a="@";
- $b="}";
- $c="`";
- $d="*";
- $e="£";
- $f="]";
- }
- if($mdpdecrypt1 == 9){
- $a="]";
- $b="@";
- $c="`";
- $d="£";
- $e="*";
- $f="}";
- }
-
- //Alphabé de $mdpdecrypt2:
- if($mdpdecrypt2 == 0){
- $g="&";
- $h="~";
- $i="#";
- $j="{";
- $k="[";
- $l="|";
- }
- if($mdpdecrypt2 == 1){
- $g="|";
- $h="{";
- $i="#";
- $j="[";
- $k="&";
- $l="~";
- }
- if($mdpdecrypt2 == 2){
- $g="#";
- $h="|";
- $i="{";
- $j="~";
- $k="&";
- $l="[";
- }
- if($mdpdecrypt2 == 3){
- $g="&";
- $h="~";
- $i="#";
- $j="{";
- $k="[";
- $l="|";
- }
- if($mdpdecrypt2 == 4){
- $g="#";
- $h="[";
- $i="{";
- $j="~";
- $k="&";
- $l="|";
- }
- if($mdpdecrypt2 == 5){
- $g="|";
- $h="{";
- $i="[";
- $j="&";
- $k="~";
- $l="#";
- }
- if($mdpdecrypt2 == 6){
- $g="#";
- $h="&";
- $i="~";
- $j="[";
- $k="{";
- $l="|";
- }
- if($mdpdecrypt2 == 7){
- $g="{";
- $h="&";
- $i="|";
- $j="~";
- $k="[";
- $l="#";
- }
- if($mdpdecrypt2 == 8){
- $g="|";
- $h="#";
- $i="~";
- $j="[";
- $k="{";
- $l="&";
- }
- if($mdpdecrypt2 == 9){
- $g="&";
- $h="#";
- $i="|";
- $j="~";
- $k="[";
- $l="{";
- }
-
- //Alphabé de $mdpdecrypt3:
- if($mdpdecrypt3 == 0){
- $m="¤";
- $n="+";
- $o="=";
- $p="°";
- $q="%";
- $r="µ";
- }
- if($mdpdecrypt3 == 1){
- $m="+";
- $n="µ";
- $o="%";
- $p="=";
- $q="¤";
- $r="°";
- }
- if($mdpdecrypt3 == 2){
- $m="%";
- $n="+";
- $o="°";
- $p="=";
- $q="µ";
- $r="¤";
- }
- if($mdpdecrypt3 == 3){
- $m="µ";
- $n="=";
- $o="°";
- $p="¤";
- $q="+";
- $r="%";
- }
- if($mdpdecrypt3 == 4){
- $m="=";
- $n="°";
- $o="%";
- $p="µ";
- $q="+";
- $r="¤";
- }
- if($mdpdecrypt3 == 5){
- $m="+";
- $n="%";
- $o="µ";
- $p="¤";
- $q="=";
- $r="°";
- }
- if($mdpdecrypt3 == 6){
- $m="°";
- $n="¤";
- $o="=";
- $p="µ";
- $q="+";
- $r="%";
- }
- if($mdpdecrypt3 == 7){
- $m="¤";
- $n="%";
- $o="=";
- $p="+";
- $q="°";
- $r="µ";
- }
- if($mdpdecrypt3 == 8){
- $m="µ";
- $n="°";
- $o="%";
- $p="¤";
- $q="+";
- $r="=";
- }
- if($mdpdecrypt3 == 9){
- $m="°";
- $n="+";
- $o="=";
- $p="%";
- $q="¤";
- $r="µ";
- }
-
- //Alphabé de $mdpdecrypt4:
- if($mdpdecrypt4 == 0){
- $s="^";
- $t="²";
- $u="/";
- $v="\ ";
- $w="§";
- }
- if($mdpdecrypt4 == 1){
- $s="²";
- $t="§";
- $u="/";
- $v="\ ";
- $w="^";
- }
- if($mdpdecrypt4 == 2){
- $s="\ ";
- $t="²";
- $u="/";
- $v="^";
- $w="§";
- }
- if($mdpdecrypt4 == 3){
- $s="/";
- $t="\ ";
- $u="§";
- $v="^";
- $w="²";
- }
- if($mdpdecrypt4 == 4){
- $s="^";
- $t="/";
- $u="²";
- $v="\ ";
- $w="§";
- }
- if($mdpdecrypt4 == 5){
- $s="§";
- $t="/";
- $u="^";
- $v="\ ";
- $w="²";
- }
- if($mdpdecrypt4 == 6){
- $s="²";
- $t="^";
- $u="\ ";
- $v="§";
- $w="/";
- }
- if($mdpdecrypt4 == 7){
- $s="\ ";
- $t="/";
- $u="²";
- $v="§";
- $w="^";
- }
- if($mdpdecrypt4 == 8){
- $s="^";
- $t="/";
- $u="§";
- $v="\ ";
- $w="²";
- }
- if($mdpdecrypt4 == 9){
- $s="^";
- $t="§";
- $u="^";
- $v="\\";
- $w="/ ";
- }
- // FIN DE LA CLE DE DECRYPTAGE
- //<-------------------------------------------------------------------------------------------->
-
-
-
- $textadecrypter = str_replace($a,"a",$textadecrypter);
- $textadecrypter = str_replace($b,"b",$textadecrypter);
- $textadecrypter = str_replace($c,"c",$textadecrypter);
- $textadecrypter = str_replace($d,"d",$textadecrypter);
- $textadecrypter = str_replace($e,"e",$textadecrypter);
- $textadecrypter = str_replace($f,"f",$textadecrypter);
- $textadecrypter = str_replace($g,"g",$textadecrypter);
- $textadecrypter = str_replace($h,"h",$textadecrypter);
- $textadecrypter = str_replace($i,"i",$textadecrypter);
- $textadecrypter = str_replace($j,"j",$textadecrypter);
- $textadecrypter = str_replace($k,"k",$textadecrypter);
- $textadecrypter = str_replace($l,"l",$textadecrypter);
- $textadecrypter = str_replace($m,"m",$textadecrypter);
- $textadecrypter = str_replace($n,"n",$textadecrypter);
- $textadecrypter = str_replace($o,"o",$textadecrypter);
- $textadecrypter = str_replace($p,"p",$textadecrypter);
- $textadecrypter = str_replace($q,"q",$textadecrypter);
- $textadecrypter = str_replace($r,"r",$textadecrypter);
- $textadecrypter = str_replace($s,"s",$textadecrypter);
- $textadecrypter = str_replace($t,"t",$textadecrypter);
- $textadecrypter = str_replace($u,"u",$textadecrypter);
- $textadecrypter = str_replace($v,"v",$textadecrypter);
- $textadecrypter = str_replace($w,"w",$textadecrypter);
-
- //On écrit le texte décrypté de l'utilisateur:
-
- echo("Voici votre texte décrypté: <br>");
- echo("<textarea name=textdecryptenew cols=50 id=text>$textadecrypter</textarea>");
- echo("<br> <a href=index.php?action= >Retourner à l'index</a>");
-
-
-
-
-
- echo("<br><br><br> Crée par <a href=mailto:thomas.vaillant-76@laposte.net> © Thomas VAILLANT © </a>");
- }
- ?>
- </body>
- </html>
- <!-- Crée par Thomas VAILLANT: thomas.vaillant-76@laposte.net -->
//Voila la source, un peut grande, je sais (779 lignes !!!)(exscusez moi LoL) mais, il y a aussi le ZIP !
<!-- Crée par Thomas VAILLANT: thomas.vaillant-76@laposte.net -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Crypteur de texte par Thomas VAILLANT</title>
</head>
<body>
<?php
@$action=$_GET['action'];
if($action == ""){ //Si il n'y a pas d'action, on écrit la page ci-dessous (pour que l'utilisateur puisse crypter/décrypter son texte)
echo("<h1><strong>Bienvenue sur le crypteur de texte !</strong></h1>");
echo("<p>Entrez votre texte à crypter dans le champ ci-dessous: </p>");
echo("<form name=form-crypt method=post action=index.php?action=crypt>");
echo(" <textarea name=textacrypter cols=50 id=text></textarea>");
echo(" <br>");
echo("ATTENTION: Les lettre en majuscules, les lettres avec des accents et les chiffres ne serons pas cryptés ! <br> ATTENTION: Ne pas utiliser les caractères suivants: * $ £ } ] @ ` | [ { # ~ & ¤ µ % ° + = ^ \ / ² § car il y aurait des conflits <br>");
echo("Et entrez un mot de passe avec à QUATRE CHIFFRES (ex: 0106 , 9999 ect...)<br>");
echo("Mot de passe: <input name=mdpcrypt1 type=text id=mdpcrypt1 value=0 size=1 maxlength=1><input name=mdpcrypt2 type=text id=mdpcrypt2 value=0 size=1 maxlength=1><input name=mdpcrypt3 type=text id=mdpcrypt3 value=0 size=1 maxlength=1><input name=mdpcrypt4 type=text id=mdpcrypt4 value=0 size=1 maxlength=1> <br>");
echo(" <input name=crypter type=submit id=crypter value=Crypter !>");
echo("</form>");
echo("<hr>");
echo("<p>Entrez votre texte à décrypter dans le champ ci-dessous: </p>");
echo("<form name=form-decrypt method=post action=index.php?action=decrypt>");
echo(" <textarea name=textadecrypter cols=50 id=text></textarea>");
echo("Mot de passe: <input name=mdpdecrypt1 type=text id=mdpdecrypt1 value=0 size=1 maxlength=1><input name=mdpdecrypt2 type=text id=mdpdecrypt2 value=0 size=1 maxlength=1><input name=mdpdecrypt3 type=text id=mdpdecrypt3 value=0 size=1 maxlength=1><input name=mdpdecrypt4 type=text id=mdpdecrypt4 value=0 size=1 maxlength=1> <br>");
echo(" <input name=decrypter type=submit id=decrypter value=Décrypter !>");
echo("</form>");
echo("<br><br><br> Crée par <a href=mailto:thomas.vaillant-76@laposte.net> © Thomas VAILLANT © </a>");
}
if($action == "crypt"){ //Si l'action est "crypt", on écrit le programme de cryptage
$textacrypter=$_POST['textacrypter']; //On récupère le texte non crypté de l'utilisateur
$mdpcrypt1=$_POST['mdpcrypt1']; //On récupère le premier chiffre du mot de passe à utiliser pour crypter le texte (qui va en fait servire de clé de cryptage)
$mdpcrypt2=$_POST['mdpcrypt2']; //On récupère le deuxième chiffre du mot de passe à utiliser pour crypter le texte (qui va en fait servire de clé de cryptage)
$mdpcrypt3=$_POST['mdpcrypt3']; //On récupère le troisième chiffre du mot de passe à utiliser pour crypter le texte (qui va en fait servire de clé de cryptage)
$mdpcrypt4=$_POST['mdpcrypt4']; //On récupère le quatrième chiffre du mot de passe à utiliser pour crypter le texte (qui va en fait servire de clé de cryptage)
//<---------------------------------------------------------------------------------------------------->
// CREATION DE LA CLE DE CRYPTAGE:
//Alphabé de $mdpcrypt1:
if($mdpcrypt1 == 0){
$a="*";
$b="£";
$c="}";
$d="]";
$e="@";
$f="`";
}
if($mdpcrypt1 == 1){
$a="`";
$b="]";
$c="}";
$d="£";
$e="*";
$f="@";
}
if($mdpcrypt1 == 2){
$a="@";
$b="`";
$c="]";
$d="}";
$e="£";
$f="*";
}
if($mdpcrypt1 == 3){
$a="£";
$b="}";
$c="@";
$d="*";
$e="`";
$f="]";
}
if($mdpcrypt1 == 4){
$a="}";
$b="`";
$c="£";
$d="@";
$e="]";
$f="*";
}
if($mdpcrypt1 == 5){
$a="@";
$b="]";
$c="}";
$d="£";
$e="`";
$f="*";
}
if($mdpcrypt1 == 6){
$a="}";
$b="`";
$c="]";
$d="@";
$e="*";
$f="£";
}
if($mdpcrypt1 == 7){
$a="*";
$b="£";
$c="}";
$d="]";
$e="@";
$f="`";
}
if($mdpcrypt1 == 8){
$a="@";
$b="}";
$c="`";
$d="*";
$e="£";
$f="]";
}
if($mdpcrypt1 == 9){
$a="]";
$b="@";
$c="`";
$d="£";
$e="*";
$f="}";
}
//Alphabé de $mdpcrypt2:
if($mdpcrypt2 == 0){
$g="&";
$h="~";
$i="#";
$j="{";
$k="[";
$l="|";
}
if($mdpcrypt2 == 1){
$g="|";
$h="{";
$i="#";
$j="[";
$k="&";
$l="~";
}
if($mdpcrypt2 == 2){
$g="#";
$h="|";
$i="{";
$j="~";
$k="&";
$l="[";
}
if($mdpcrypt2 == 3){
$g="&";
$h="~";
$i="#";
$j="{";
$k="[";
$l="|";
}
if($mdpcrypt2 == 4){
$g="#";
$h="[";
$i="{";
$j="~";
$k="&";
$l="|";
}
if($mdpcrypt2 == 5){
$g="|";
$h="{";
$i="[";
$j="&";
$k="~";
$l="#";
}
if($mdpcrypt2 == 6){
$g="#";
$h="&";
$i="~";
$j="[";
$k="{";
$l="|";
}
if($mdpcrypt2 == 7){
$g="{";
$h="&";
$i="|";
$j="~";
$k="[";
$l="#";
}
if($mdpcrypt2 == 8){
$g="|";
$h="#";
$i="~";
$j="[";
$k="{";
$l="&";
}
if($mdpcrypt2 == 9){
$g="&";
$h="#";
$i="|";
$j="~";
$k="[";
$l="{";
}
//Alphabé de $mdpcrypt3:
if($mdpcrypt3 == 0){
$m="¤";
$n="+";
$o="=";
$p="°";
$q="%";
$r="µ";
}
if($mdpcrypt3 == 1){
$m="+";
$n="µ";
$o="%";
$p="=";
$q="¤";
$r="°";
}
if($mdpcrypt3 == 2){
$m="%";
$n="+";
$o="°";
$p="=";
$q="µ";
$r="¤";
}
if($mdpcrypt3 == 3){
$m="µ";
$n="=";
$o="°";
$p="¤";
$q="+";
$r="%";
}
if($mdpcrypt3 == 4){
$m="=";
$n="°";
$o="%";
$p="µ";
$q="+";
$r="¤";
}
if($mdpcrypt3 == 5){
$m="+";
$n="%";
$o="µ";
$p="¤";
$q="=";
$r="°";
}
if($mdpcrypt3 == 6){
$m="°";
$n="¤";
$o="=";
$p="µ";
$q="+";
$r="%";
}
if($mdpcrypt3 == 7){
$m="¤";
$n="%";
$o="=";
$p="+";
$q="°";
$r="µ";
}
if($mdpcrypt3 == 8){
$m="µ";
$n="°";
$o="%";
$p="¤";
$q="+";
$r="=";
}
if($mdpcrypt3 == 9){
$m="°";
$n="+";
$o="=";
$p="%";
$q="¤";
$r="µ";
}
//Alphabé de $mdpcrypt4 (il n'y a pas assé de carractères pour crypter X, Y, Z donc, il ne serons pas cryptés):
if($mdpcrypt4 == 0){
$s="^";
$t="²";
$u="/";
$v="\ ";
$w="§";
}
if($mdpcrypt4 == 1){
$s="²";
$t="§";
$u="/";
$v="\ ";
$w="^";
}
if($mdpcrypt4 == 2){
$s="\ ";
$t="²";
$u="/";
$v="^";
$w="§";
}
if($mdpcrypt4 == 3){
$s="/";
$t="\ ";
$u="§";
$v="^";
$w="²";
}
if($mdpcrypt4 == 4){
$s="^";
$t="/";
$u="²";
$v="\ ";
$w="§";
}
if($mdpcrypt4 == 5){
$s="§";
$t="/";
$u="^";
$v="\ ";
$w="²";
}
if($mdpcrypt4 == 6){
$s="²";
$t="^";
$u="\ ";
$v="§";
$w="/";
}
if($mdpcrypt4 == 7){
$s="\ ";
$t="/";
$u="²";
$v="§";
$w="^";
}
if($mdpcrypt4 == 8){
$s="^";
$t="/";
$u="§";
$v="\ ";
$w="²";
}
if($mdpcrypt4 == 9){
$s="^";
$t="§";
$u="^";
$v="\\";
$w="/ ";
}
// FIN DE LA CREATION DE LA CLE DE CRYPTAGE
//<---------------------------------------------------------------------------------------->
//On crypte avec la clé (en utilisant des str_replace() ):
//Ex d'un str_replace: str_replace("lettre à remplacer","par cette lettre","le texte ou l'on doit remplacer");
$textacrypter = str_replace("a",$a,$textacrypter);
$textacrypter = str_replace("b",$b,$textacrypter);
$textacrypter = str_replace("c",$c,$textacrypter);
$textacrypter = str_replace("d",$d,$textacrypter);
$textacrypter = str_replace("e",$e,$textacrypter);
$textacrypter = str_replace("f",$f,$textacrypter);
$textacrypter = str_replace("g",$g,$textacrypter);
$textacrypter = str_replace("h",$h,$textacrypter);
$textacrypter = str_replace("i",$i,$textacrypter);
$textacrypter = str_replace("j",$j,$textacrypter);
$textacrypter = str_replace("k",$k,$textacrypter);
$textacrypter = str_replace("l",$l,$textacrypter);
$textacrypter = str_replace("m",$m,$textacrypter);
$textacrypter = str_replace("n",$n,$textacrypter);
$textacrypter = str_replace("o",$o,$textacrypter);
$textacrypter = str_replace("p",$p,$textacrypter);
$textacrypter = str_replace("q",$q,$textacrypter);
$textacrypter = str_replace("r",$r,$textacrypter);
$textacrypter = str_replace("s",$s,$textacrypter);
$textacrypter = str_replace("t",$t,$textacrypter);
$textacrypter = str_replace("u",$u,$textacrypter);
$textacrypter = str_replace("v",$v,$textacrypter);
$textacrypter = str_replace("w",$w,$textacrypter);
//On écrit le texte crypté de l'utilisateur:
echo("Voici votre texte crypté: <br>");
echo("<textarea name=textcryptenew cols=50 id=text>$textacrypter</textarea> Pour prendre votre texte crypté, faites un copié/collé !");
echo("<br> ATTENTION: Si vous voulez décrypter votre texte, n'oubliez pas votre mot de passe ! (Votre mot de passe est: $mdpcrypt1$mdpcrypt2$mdpcrypt3$mdpcrypt4 )");
echo("<br> <a href=index.php?action= >Retourner à l'index</a>");
echo("<br><br><br> Crée par <a href=mailto:thomas.vaillant-76@laposte.net> © Thomas VAILLANT © </a>");
}
if($action == "decrypt"){ //Si l'action est: decrypt, on écrit le programme de décryptage:
$textadecrypter=$_POST['textadecrypter']; //On récupère le texte à décrypter
$mdpdecrypt1=$_POST['mdpdecrypt1']; //On récupère le premier chiffre du mot de passe à utiliser pour decrypter le texte (qui va en fait servire de clé de decryptage)
$mdpdecrypt2=$_POST['mdpdecrypt2']; //On récupère le deuxième chiffre du mot de passe à utiliser pour decrypter le texte (qui va en fait servire de clé de decryptage)
$mdpdecrypt3=$_POST['mdpdecrypt3']; //On récupère le troisième chiffre du mot de passe à utiliser pour decrypter le texte (qui va en fait servire de clé de decryptage)
$mdpdecrypt4=$_POST['mdpdecrypt4']; //On récupère le quatrième chiffre du mot de passe à utiliser pour decrypter le texte (qui va en fait servire de clé de decryptage)
//<------------------------------------------------------------------------------------------------>
// CREATION DE LA CLE DE DECRYPTAGE:
//Alphabé de $mdpdecrypt1:
if($mdpdecrypt1 == 0){
$a="*";
$b="£";
$c="}";
$d="]";
$e="@";
$f="`";
}
if($mdpdecrypt1 == 1){
$a="`";
$b="]";
$c="}";
$d="£";
$e="*";
$f="@";
}
if($mdpdecrypt1 == 2){
$a="@";
$b="`";
$c="]";
$d="}";
$e="£";
$f="*";
}
if($mdpdecrypt1 == 3){
$a="£";
$b="}";
$c="@";
$d="*";
$e="`";
$f="]";
}
if($mdpdecrypt1 == 4){
$a="}";
$b="`";
$c="£";
$d="@";
$e="]";
$f="*";
}
if($mdpdecrypt1 == 5){
$a="@";
$b="]";
$c="}";
$d="£";
$e="`";
$f="*";
}
if($mdpdecrypt1 == 6){
$a="}";
$b="`";
$c="]";
$d="@";
$e="*";
$f="£";
}
if($mdpdecrypt1 == 7){
$a="*";
$b="£";
$c="}";
$d="]";
$e="@";
$f="`";
}
if($mdpdecrypt1 == 8){
$a="@";
$b="}";
$c="`";
$d="*";
$e="£";
$f="]";
}
if($mdpdecrypt1 == 9){
$a="]";
$b="@";
$c="`";
$d="£";
$e="*";
$f="}";
}
//Alphabé de $mdpdecrypt2:
if($mdpdecrypt2 == 0){
$g="&";
$h="~";
$i="#";
$j="{";
$k="[";
$l="|";
}
if($mdpdecrypt2 == 1){
$g="|";
$h="{";
$i="#";
$j="[";
$k="&";
$l="~";
}
if($mdpdecrypt2 == 2){
$g="#";
$h="|";
$i="{";
$j="~";
$k="&";
$l="[";
}
if($mdpdecrypt2 == 3){
$g="&";
$h="~";
$i="#";
$j="{";
$k="[";
$l="|";
}
if($mdpdecrypt2 == 4){
$g="#";
$h="[";
$i="{";
$j="~";
$k="&";
$l="|";
}
if($mdpdecrypt2 == 5){
$g="|";
$h="{";
$i="[";
$j="&";
$k="~";
$l="#";
}
if($mdpdecrypt2 == 6){
$g="#";
$h="&";
$i="~";
$j="[";
$k="{";
$l="|";
}
if($mdpdecrypt2 == 7){
$g="{";
$h="&";
$i="|";
$j="~";
$k="[";
$l="#";
}
if($mdpdecrypt2 == 8){
$g="|";
$h="#";
$i="~";
$j="[";
$k="{";
$l="&";
}
if($mdpdecrypt2 == 9){
$g="&";
$h="#";
$i="|";
$j="~";
$k="[";
$l="{";
}
//Alphabé de $mdpdecrypt3:
if($mdpdecrypt3 == 0){
$m="¤";
$n="+";
$o="=";
$p="°";
$q="%";
$r="µ";
}
if($mdpdecrypt3 == 1){
$m="+";
$n="µ";
$o="%";
$p="=";
$q="¤";
$r="°";
}
if($mdpdecrypt3 == 2){
$m="%";
$n="+";
$o="°";
$p="=";
$q="µ";
$r="¤";
}
if($mdpdecrypt3 == 3){
$m="µ";
$n="=";
$o="°";
$p="¤";
$q="+";
$r="%";
}
if($mdpdecrypt3 == 4){
$m="=";
$n="°";
$o="%";
$p="µ";
$q="+";
$r="¤";
}
if($mdpdecrypt3 == 5){
$m="+";
$n="%";
$o="µ";
$p="¤";
$q="=";
$r="°";
}
if($mdpdecrypt3 == 6){
$m="°";
$n="¤";
$o="=";
$p="µ";
$q="+";
$r="%";
}
if($mdpdecrypt3 == 7){
$m="¤";
$n="%";
$o="=";
$p="+";
$q="°";
$r="µ";
}
if($mdpdecrypt3 == 8){
$m="µ";
$n="°";
$o="%";
$p="¤";
$q="+";
$r="=";
}
if($mdpdecrypt3 == 9){
$m="°";
$n="+";
$o="=";
$p="%";
$q="¤";
$r="µ";
}
//Alphabé de $mdpdecrypt4:
if($mdpdecrypt4 == 0){
$s="^";
$t="²";
$u="/";
$v="\ ";
$w="§";
}
if($mdpdecrypt4 == 1){
$s="²";
$t="§";
$u="/";
$v="\ ";
$w="^";
}
if($mdpdecrypt4 == 2){
$s="\ ";
$t="²";
$u="/";
$v="^";
$w="§";
}
if($mdpdecrypt4 == 3){
$s="/";
$t="\ ";
$u="§";
$v="^";
$w="²";
}
if($mdpdecrypt4 == 4){
$s="^";
$t="/";
$u="²";
$v="\ ";
$w="§";
}
if($mdpdecrypt4 == 5){
$s="§";
$t="/";
$u="^";
$v="\ ";
$w="²";
}
if($mdpdecrypt4 == 6){
$s="²";
$t="^";
$u="\ ";
$v="§";
$w="/";
}
if($mdpdecrypt4 == 7){
$s="\ ";
$t="/";
$u="²";
$v="§";
$w="^";
}
if($mdpdecrypt4 == 8){
$s="^";
$t="/";
$u="§";
$v="\ ";
$w="²";
}
if($mdpdecrypt4 == 9){
$s="^";
$t="§";
$u="^";
$v="\\";
$w="/ ";
}
// FIN DE LA CLE DE DECRYPTAGE
//<-------------------------------------------------------------------------------------------->
$textadecrypter = str_replace($a,"a",$textadecrypter);
$textadecrypter = str_replace($b,"b",$textadecrypter);
$textadecrypter = str_replace($c,"c",$textadecrypter);
$textadecrypter = str_replace($d,"d",$textadecrypter);
$textadecrypter = str_replace($e,"e",$textadecrypter);
$textadecrypter = str_replace($f,"f",$textadecrypter);
$textadecrypter = str_replace($g,"g",$textadecrypter);
$textadecrypter = str_replace($h,"h",$textadecrypter);
$textadecrypter = str_replace($i,"i",$textadecrypter);
$textadecrypter = str_replace($j,"j",$textadecrypter);
$textadecrypter = str_replace($k,"k",$textadecrypter);
$textadecrypter = str_replace($l,"l",$textadecrypter);
$textadecrypter = str_replace($m,"m",$textadecrypter);
$textadecrypter = str_replace($n,"n",$textadecrypter);
$textadecrypter = str_replace($o,"o",$textadecrypter);
$textadecrypter = str_replace($p,"p",$textadecrypter);
$textadecrypter = str_replace($q,"q",$textadecrypter);
$textadecrypter = str_replace($r,"r",$textadecrypter);
$textadecrypter = str_replace($s,"s",$textadecrypter);
$textadecrypter = str_replace($t,"t",$textadecrypter);
$textadecrypter = str_replace($u,"u",$textadecrypter);
$textadecrypter = str_replace($v,"v",$textadecrypter);
$textadecrypter = str_replace($w,"w",$textadecrypter);
//On écrit le texte décrypté de l'utilisateur:
echo("Voici votre texte décrypté: <br>");
echo("<textarea name=textdecryptenew cols=50 id=text>$textadecrypter</textarea>");
echo("<br> <a href=index.php?action= >Retourner à l'index</a>");
echo("<br><br><br> Crée par <a href=mailto:thomas.vaillant-76@laposte.net> © Thomas VAILLANT © </a>");
}
?>
</body>
</html>
<!-- Crée par Thomas VAILLANT: thomas.vaillant-76@laposte.net -->
Conclusion
J'atten vos commentaires et vos notes !!!
Sources du même auteur
Sources de la même categorie
Commentaires et avis
|
Derniers Blogs
IMAGINE CUP 2012, MAKE A SIGN EN FINALEIMAGINE CUP 2012, MAKE A SIGN EN FINALE par junarnoalg
Voilà qui est fait, la nouvelle est officielle ! L'équipe belge "Make a Sign" va au pays des kangourous défendre son projet dans la catégorie Software Design. http://www.imaginecup.com/CompetitionsContent/Competition/WorldwideFinalists.aspx V...
Cliquez pour lire la suite de l'article par junarnoalg KINECT 1.5 IS OUT !KINECT 1.5 IS OUT ! par Vko
La version 1.5 du Kinect For Microsoft vient tout juste de sortir ! Plein de nouveautés: Tracking de squelette en Near Mode Détection en position assise Détection faciale avec un SDK dédié Documentation et des guideline (enfin) Un out...
Cliquez pour lire la suite de l'article par Vko LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) par richardc
Mise à jour des Web API du 14 Mai
Réservez dès maintenant votre journée du 20 juin pour le Windows Azure Dev Camp 2012 à Paris
Mise à jour de Team Foundation Service
MechCommander 2 sur Windows 8
Entity Framework 5 Release Candidate e...
Cliquez pour lire la suite de l'article par richardc REACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITERREACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITER par Groc
Une mauvaise utilisation de rx lors de l'écriture d'une couche d'accès à des services peut conduire à des cas embarassants avec des erreurs mal gérées, des appels qui ne partent lorsqu'ils le devraient, et même des résultats incorrects . le tout nuis...
Cliquez pour lire la suite de l'article par Groc SHAREPOINT BLOG SITE, PROBLèME D'ARCHIVESSHAREPOINT BLOG SITE, PROBLèME D'ARCHIVES par junarnoalg
Dernièrement, nous avons migré le site
myTIC
vers un nouveau serveur SharePoint 2010. Dans les contenus que nous vouloins récupérer, nous avions un certain nombre de blogs.
Nous avons utilisé les commandes Power...
Cliquez pour lire la suite de l'article par junarnoalg
Logiciels
sDEVIS-FACTURES vlPRO (8.1.0.3)SDEVIS-FACTURES VLPRO (8.1.0.3)sDEVIS-FACTURES vlPRO a été mis au point pour les particuliers, créateurs, entrepreneurs, artisa... Cliquez pour télécharger sDEVIS-FACTURES vlPRO 974 Application Server (12.2.4.6)974 APPLICATION SERVER (12.2.4.6)Développez de puissantes applications dans un environnement de 'cloud computing', clusterisé, séc... Cliquez pour télécharger 974 Application Server vPicture (1.4.2.1)VPICTURE (1.4.2.1)Avec vPicture, hébergez vos images facilement et rapidement.
vPicture est un utilitaire simple, ... Cliquez pour télécharger vPicture Easy-Planning (2.2.1.6)EASY-PLANNING (2.2.1.6)Easy-Planning permet de créer des plannings sous la représentation de diagrammes et est adapté au... Cliquez pour télécharger Easy-Planning COM-BACKUP (2.0)COM-BACKUP (2.0)
COM-BACKUP est un logiciel de sauvegarde qui permet de planifier les sauvegardes de vos dossiers ...
Cliquez pour télécharger COM-BACKUP
|