4e4en Posted December 30, 2006 Report Share Posted December 30, 2006 vai varat lūdzu palīdzēt izveidot pretēju funkciju šai function O0OO0000OO($l1ll1) { $ll1l1 = 1496; $l11l1 = 0; $l1111 = $ll1l1; $l1lll = strlen($l1ll1); for($l111l = 0; $l111l < strlen($l1ll1); $l111l++) { if($l1111 == 0) { $l11l1 = 1; } elseif($l1111 == $ll1l1) { $l11l1 = 0; } if($l11l1 == 0) { $l1111--; } elseif($l11l1 == 1) { $l1111++; } $l1l1l1 .= substr($l1ll1, $l111l, $l111l+1) ^ chr( $l1111 * ($l1lll + 1) ); $l1lll--; } return $l1l1l1; } Link to comment Share on other sites More sharing options...
bubu Posted December 30, 2006 Report Share Posted December 30, 2006 Pašam slinkums? Būtu vismaz pats kodam normālu identāciju salicis, un mainīgos pārsaucis par sakarīgiem vārdiem.. Link to comment Share on other sites More sharing options...
4e4en Posted December 30, 2006 Author Report Share Posted December 30, 2006 neuzminēji, pratiņš pa īsu... Link to comment Share on other sites More sharing options...
bubu Posted December 30, 2006 Report Share Posted December 30, 2006 Pie tam: skripts ir kļūdains - mainīgais $l1l1l1 netiek nekur inicializēts. Haha, kurš vispār "šifrē" datus izmantojo XOR. XOR taču ir simetriska fja. Tā tava funkcija kā arī nokodē stringu, tāpat arī atkodē: $source = "ASJDHAJKDH123123"; $encoded = O0OO0000OO($source); $decoded = O0OO0000OO($encoded); echo $source == $decoded; Link to comment Share on other sites More sharing options...
4e4en Posted December 30, 2006 Author Report Share Posted December 30, 2006 paldies par pūlem :) Link to comment Share on other sites More sharing options...
v3rb0 Posted December 30, 2006 Report Share Posted December 30, 2006 būtu vismaz varibli no variabliem, rekursiju, kko ar klasēm un citas ne tik triviālas php fīčas salicis. tādus ar aplamiem mainīgo nosaukumiem un identāciju pakaļā pat 'melnstrādnieki' lauž vaļā ar notepada search & replace :) Link to comment Share on other sites More sharing options...
4e4en Posted December 30, 2006 Author Report Share Posted December 30, 2006 (edited) tur jau tā lieta, ka tas ir sīkums, bet ne izšķirošais... ši funkcija ir galvas jaukšanai, līdz tiks klāt pašam šifr�“šanas dzin�“jam.... galu galā neesmu jau pirmo reizi ar pīpi uz jumta :) Edited December 30, 2006 by 4e4en Link to comment Share on other sites More sharing options...
bubu Posted December 30, 2006 Report Share Posted December 30, 2006 Man izskatās, ka esi gan. Link to comment Share on other sites More sharing options...
blackhalt Posted January 1, 2007 Report Share Posted January 1, 2007 Ar šito `kodu` jau gadu internetā lielies :) Link to comment Share on other sites More sharing options...
Recommended Posts