Advertisement
Guest User

Cisco Password Decrypter

a guest
Dec 16th, 2012
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. <?php
  2. function decrypt($pass) {
  3. $xarr = array (0x64, 0x73, 0x66, 0x64, 0x3b, 0x6b,
  4. 0x66, 0x6f, 0x41, 0x2c, 0x2e, 0x69,
  5. 0x79, 0x65, 0x77, 0x72, 0x6b, 0x6c,
  6. 0x64, 0x4a, 0x4b, 0x44, 0x48, 0x53,
  7. 0x55, 0x42);
  8. $z=0;
  9. $decrypted='';
  10. $unenc_lenght = (strlen($pass)-2)/2;
  11. $xorindex = (($pass[0]-0)*10)+($pass[1]-0);
  12. settype($xorindex, "integer");
  13. echo "Encrypted Password: <strong>".$pass."</strong><br />";
  14.  
  15. for ($i = 2 ; $i <= strlen($pass); $i=$i+2) {
  16. $val=(hexdec($pass[$i])*16)+hexdec($pass[$i+1]);
  17. settype($val, "integer");
  18. $passdec[$z]=chr($val ^ $xarr[$xorindex]);
  19. $z++;
  20. $xorindex++;
  21. }
  22.  
  23. for ($t=0;$t<=$unenc_lenght-1;$t++) {
  24. $decrypted .= $passdec[$t];
  25. }
  26.  
  27. echo "Decrypted Password: <strong>".$decrypted." </strong>";
  28. return(1);
  29. }
  30. ?>
  31.  
  32. <form action='<? $_SERVER['PHP_SELF']; ?>' method="post">
  33. <p>
  34. <input type="text" name="Password" size="40" />
  35. <input type="submit" name="Decrypt" value="Decrypt!" />
  36. </p>
  37. </form>
  38. <p>
  39. <?
  40. if ((isset($_POST[Decrypt])) and (strlen($_POST[Password])>0))
  41. decrypt($_POST[Password]);
  42. else
  43. echo " &nbsp; &nbsp; ";
  44. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement