Marech Posted October 6, 2003 Report Share Posted October 6, 2003 Kaads varbuut zin un vareetu padaliities zinaashanaas: kaa var saglabaat failaa un no faila nolasiit paroli. Un te ir tas kods kuram man vajag to:) http://paste.php.lv/420 Link to comment Share on other sites More sharing options...
fassko Posted October 6, 2003 Report Share Posted October 6, 2003 saglabaa failaa katra rindaa vaardu un paroli un tad lai atpaziitu kas logojas iekssaa izciklee failunju un peec tam paarbaudi vai der ;) Link to comment Share on other sites More sharing options...
AntiXakep Posted October 7, 2003 Report Share Posted October 7, 2003 kads varetu aprakstit ka isti vajag ar to md5 funkciju rikoties! Piem. ja pirmo reizi kad tiek posteta parole ta saglabajas failaa sifreta veida un nakosajas reizes kad ieposte paroli md5 salidzina ar sifrejumu! Vel jautajums kad parole tiek pienemta ka varetu izdarit to ka tiek paradita administracijas lapa! (es sito te nerubit!) es priecigs ja manim kads palidzet! Ka sito varetu uztaisit! Link to comment Share on other sites More sharing options...
Little_Hacker Posted October 7, 2003 Report Share Posted October 7, 2003 nu kaa.. uzgjeneree paroli piem shaadi gjenere.php <code><font color="#000000"> <font color="#0000CC"><?php </font><font color="#006600">echo </font><font color="#0000CC">[url=http://lv.php.net/md5]md5[/url]</font><font color="#006600">(</font><font color="#0000CC">$parole</font><font color="#006600">); </font><font color="#0000CC">?> </font> </font> </code> var teikt paodod shaadu linku gjenere.php?parole=tava_parole taalak sho paroli iemet pienjemsim failaa parole.txt tagad taisam logoshanos index.php <code><font color="#000000"> <font color="#0000CC"><?php </font><font color="#006600">if (isset(</font><font color="#0000CC">$login</font><font color="#006600">)) { </font><font color="#0000CC">$fails </font><font color="#006600">= </font><font color="#0000CC">[url=http://lv.php.net/file]file[/url]</font><font color="#006600">(</font><font color="#CC0000">'parole.txt'</font><font color="#006600">); if (</font><font color="#0000CC">[url=http://lv.php.net/md5]md5[/url]</font><font color="#006600">(</font><font color="#0000CC">$parole</font><font color="#006600">) == </font><font color="#0000CC">$fails</font><font color="#006600">[</font><font color="#0000CC">0</font><font color="#006600">]) { echo </font><font color="#CC0000">'tu esi ielogojies'</font><font color="#006600">; } else { echo </font><font color="#CC0000">'parole nepareiza'</font><font color="#006600">; } } else { echo </font><font color="#CC0000">'<form action="" method="post"><input type="text" name="parole"><input type="submit"></form>'</font><font color="#006600">; } </font><font color="#0000CC">?> </font> </font> </code> Link to comment Share on other sites More sharing options...
AntiXakep Posted October 8, 2003 Report Share Posted October 8, 2003 Vakar lidz 23.00 nosedeju un un izdomaju kaut ko lidzigu! kad bus laiks iepostesu! :blink: Link to comment Share on other sites More sharing options...
AntiXakep Posted October 8, 2003 Report Share Posted October 8, 2003 gribejas paparasit kada sifresanas funkcija ir vis drosaka? Link to comment Share on other sites More sharing options...
Aleksejs Posted October 8, 2003 Report Share Posted October 8, 2003 Skatoties ko veelies shifreet :) Bet, ja nopietni, tad neatkariigi no taa, kaadu no modernajaam funkcijaam izveeleesies (DES ieskaitot), droshiibas probleemas visdriizaak nebuus saistiitas ar funkcijas izveeli, bet gan ar citaam lietaam. Link to comment Share on other sites More sharing options...
AntiXakep Posted October 9, 2003 Report Share Posted October 9, 2003 Skatoties ko veelies shifreet :)Bet, ja nopietni, tad neatkariigi no taa, kaadu no modernajaam funkcijaam izveeleesies (DES ieskaitot), droshiibas probleemas visdriizaak nebuus saistiitas ar funkcijas izveeli, bet gan ar citaam lietaam. Thank! Bet kas ir DES - dazos vardos! :blink: Link to comment Share on other sites More sharing options...
AntiXakep Posted October 9, 2003 Report Share Posted October 9, 2003 <?php $s_pass=''te ir sifretais pass''; $pass= $_POST[''parole'']; $sifrejums=md5($pass); if ($s_pass==$sifrejums){ echo ''ieksaaa esi''; } ?> <form action="<? PHP_SELF ?>" method="post"><input type="text" name="parole"><input type="submit"></form> Link to comment Share on other sites More sharing options...
Aleksejs Posted October 9, 2003 Report Share Posted October 9, 2003 DES ir Data Encryption Standard. DES pieder pie taa sauktajaam simetriskajaam, jeb slepenaas atsleegas (private key - as opposed to public key) shifreeshanas funkcijaam. Veel pie shii tipa funkcijaam pieder, piemeeram, Blowfish, Twofish, AES (Rijndael), IDEA, RC4 (ja nemaldos). MD5 nav shifreeshanas funkcija, bet gan hash funkcija (jauceejfunkcija, ja gribam izteikties literaari pareizi). Pie jauceejfunkcijaam pieder, piemeeram, SHA, HAVAL, RIPE-MD. Hash funkcijas no shifreeshanas funkcijaam atshkjiras ar to, ka hash funkcijas ir vienvirziena funkcijas un no to rezultaata nevar pateikt kaadi bija ievaddati, savukaart shifreeshanas funkciju pielietojums ir tieshi tajaa apstaklii, ka no to rezultaata zinot atsleegu ir iespeejams ieguut shifreeto tekstu. Tieshi shiis iipashiibas deelj parolju glabaashanaa biezhi izmanto hash funkcijas, jo nav vienkaarshas metodes, kaa dabuut, pirmtekstu (paroli). Ceru, ka izteicos saprotami. te: ir kriptograafijas terminu vaaardniica (eng) Link to comment Share on other sites More sharing options...
Recommended Posts