fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <stdint.h>
  4.  
  5. int main() {
  6. char local_58[] = {
  7. -0x1f, -0x59, 0x1e, -8, 'u', '#', '{', 'a', -0x47, -99, -4, 'Z', '[', -0x21, 'i',
  8. 0xd2, -2, 0x1b, -0x13, -0xc, -0x13, 'g', -0xc
  9. };
  10.  
  11. char password[28] = {0}; // 27文字 + NULL終端子
  12.  
  13. // check関数をシミュレート
  14. int local_1c = 0;
  15. int local_20 = 0;
  16.  
  17. for (uint32_t local_24 = 0; local_24 < 0x17; local_24++) {
  18. for (int local_28 = 0; local_28 < 8; local_28++) {
  19. if (local_20 == 0) {
  20. local_20 = 1;
  21. }
  22.  
  23. uint32_t local_30 = 1 << (7U - (char)local_28 & 0x1f);
  24. uint32_t local_34 = 1 << (7U - (char)local_20 & 0x1f);
  25.  
  26.  
  27. int expected_bit = (local_58[local_24] & local_30) != 0;
  28. password[local_1c] |= (expected_bit << (7 - local_20));
  29.  
  30. local_20++;
  31. if (local_20 == 8) {
  32. local_20 = 0;
  33. local_1c++;
  34. }
  35.  
  36. if (local_1c == 27) {
  37. break;
  38. }
  39. }
  40. if (local_1c == 27) {
  41. break;
  42. }
  43. }
  44.  
  45. printf("The password is: %s\n", password);
  46. return 0;
  47. }
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
The password is: picoCTF{0n3_bi7_4t_a_7im3}