Advertisement
Guest User

Untitled

a guest
Aug 30th, 2016
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.08 KB | None | 0 0
  1. # Wash less spaces and colorized info
  2. --- a/wpsmon.c
  3. +++ b/wpsmon.c
  4. @@ -259,8 +259,8 @@
  5.  
  6. if (!header_printed) {
  7. if (o_file_p == 0) {
  8. - cprintf(INFO, "BSSID Channel RSSI WPS Version WPS Locked ESSID\n");
  9. - cprintf(INFO, "--------------------------------------------------------------------------------------\n");
  10. + cprintf(INFO, "\033[1;33mBSSID Channel RSSI Version Locked ESSID\033[0m\n");
  11. + cprintf(INFO, "\033[1;32m----------------------------------------------------------------------\033[0m\n");
  12. header_printed = 1;
  13. }
  14.  
  15. @@ -451,7 +451,7 @@
  16.  
  17.  
  18. if (o_file_p == 0) {
  19. - cprintf(INFO, "%17s %2d %.2d %d.%d %s %s\n", bssid, channel, rssi, (wps->version >> 4), (wps->version & 0x0F), lock_display, ssid);
  20. + cprintf(INFO, "%17s %2d %.2d %d.%d %s %s\n", bssid, channel, rssi, (wps->version >> 4), (wps->version & 0x0F), lock_display, ssid);
  21. } else {
  22. if (get_chipset_output == 1) {
  23. cprintf(INFO, "%17s|%2d|%.2d|%d.%d|%s|%s|%s|%s|%s\n", bssid, channel, rssi, (wps->version >> 4), (wps->version & 0x0F), lock_display, ssid, info_manufac, info_modelnum, info_modelserial);
  24.  
  25. # Colorized M1 M2 M3 M4 M5 M6 M7 messages
  26. --- a/exchange.c
  27. +++ b/exchange.c
  28. @@ -84,7 +84,7 @@
  29. id_response_sent = 1;
  30. break;
  31. case M1:
  32. - cprintf(VERBOSE, "[+] Received M1 message\n");
  33. + cprintf(VERBOSE, "[+] Received \033[1;35mM1\033[0m message\n");
  34. if (id_response_sent && !m2_sent) {
  35. tx_type = SEND_M2;
  36. m2_sent = 1;
  37. @@ -94,7 +94,7 @@
  38. }
  39. break;
  40. case M3:
  41. - cprintf(VERBOSE, "[+] Received M3 message\n");
  42. + cprintf(VERBOSE, "[+] Received \033[1;35mM3\033[0m message\n");
  43. if (m2_sent && !m4_sent) {
  44. if (globule->pixie_loop == 1) {
  45. tx_type = SEND_WSC_NACK;
  46. @@ -111,7 +111,7 @@
  47. }
  48. break;
  49. case M5:
  50. - cprintf(VERBOSE, "[+] Received M5 message\n");
  51. + cprintf(VERBOSE, "[+] Received \033[1;35mM5\033[0m message\n");
  52. if (get_key_status() == KEY1_WIP) {
  53. set_key_status(KEY2_WIP);
  54. }
  55. @@ -124,7 +124,7 @@
  56. }
  57. break;
  58. case M7:
  59. - cprintf(VERBOSE, "[+] Received M7 message\n");
  60. + cprintf(VERBOSE, "[+] Received \033[1;35mM7\033[0m message\n");
  61. //bug fix made by flatr0ze
  62. if (!m6_sent) {
  63. tx_type = SEND_WSC_NACK;
  64.  
  65. --- b/cracker.c
  66. +++ a/cracker.c
  67. @@ -87,12 +87,12 @@
  68. while (!reassociate()) {
  69. if (assoc_fail_count == MAX_ASSOC_FAILURES) {
  70. assoc_fail_count = 0;
  71. - cprintf(CRITICAL, "[!] WARNING: Failed to associate with %s (ESSID: %s)\n", bssid, get_ssid());
  72. + cprintf(CRITICAL, "[!] \033[1;31mWARNING\033[1;37m: Failed to associate with %s (ESSID: %s)\033[0m\n", bssid, get_ssid());
  73. } else {
  74. assoc_fail_count++;
  75. }
  76. }
  77. - cprintf(INFO, "[+] Associated with %s (ESSID: %s)\n", bssid, get_ssid());
  78. + cprintf(INFO, "[+] \033[1;32mAssociated with \033[1;33m%s (ESSID: %s)\033[0m\n", bssid, get_ssid());
  79.  
  80. /* Used to calculate pin attempt rates */
  81. start_time = time(NULL);
  82. @@ -125,7 +125,7 @@
  83. * Verify that the AP is not locked before attempting the next pin.
  84. */
  85. while (get_ignore_locks() == 0 && is_wps_locked()) {
  86. - cprintf(WARNING, "[!] WARNING: Detected AP rate limiting, waiting %d seconds before re-checking\n", get_lock_delay());
  87. + cprintf(WARNING, "[!] \033[1;33mWARNING\033[1;37m: Detected AP rate limiting, waiting %d seconds before re-checking\033[0m\n", get_lock_delay());
  88. pcap_sleep(get_lock_delay());
  89.  
  90. }
  91. @@ -143,7 +143,7 @@
  92. cprintf(CRITICAL, "[-] Failed to generate the next payload\n");
  93. break;
  94. } else {
  95. - cprintf(WARNING, "[+] Trying pin %s.\n", pin);
  96. + cprintf(WARNING, "[+] \033[1;32mTrying pin \033[1;36m%s\033[0m\n", pin);
  97. }
  98.  
  99. /*
  100. @@ -154,7 +154,7 @@
  101. while (!reassociate()) {
  102. if (assoc_fail_count == MAX_ASSOC_FAILURES) {
  103. assoc_fail_count = 0;
  104. - cprintf(CRITICAL, "[!] WARNING: Failed to associate with %s (ESSID: %s)\n", bssid, get_ssid());
  105. + cprintf(CRITICAL, "[!] \033[1;33mWARNING\033[1;37m: Failed to associate with %s (ESSID: %s)\033[0m\n", bssid, get_ssid());
  106. } else {
  107. assoc_fail_count++;
  108. }
  109. @@ -211,7 +211,7 @@
  110.  
  111. /* If we've had an excessive number of message failures in a row, print a warning */
  112. if (fail_count == WARN_FAILURE_COUNT) {
  113. - cprintf(WARNING, "[!] WARNING: %d failed connections in a row\n", fail_count);
  114. + cprintf(WARNING, "[!] \033[1;33mWARNING\033[1;37m: %d failed connections in a row\033[0m\n", fail_count);
  115. fail_count = 0;
  116. pcap_sleep(get_fail_delay());
  117. }
  118. @@ -387,7 +387,7 @@
  119. }
  120.  
  121.  
  122. - cprintf(INFO, "[+] %.2f%% complete. Elapsed time: %id%ih%im%is.\n", percentage, days, hours, minutes, seconds);
  123. + cprintf(INFO, "[+] \033[1;33m%.2f%% complete. Elapsed time: %id%ih%im%is.\033[0m\n", percentage, days, hours, minutes, seconds);
  124. if (last_display && attempts != last_attempts) {
  125. expected = ((now - last_display) / (attempts - last_attempts)) * (get_max_pin_attempts() - attempts);
  126. if (expected > 0) {
  127.  
  128. --- a/wps/wps_registrar.c
  129. +++ b/wps/wps_registrar.c
  130. @@ -1521,7 +1521,7 @@
  131. case SEND_M2:
  132. if (wps_get_dev_password(wps) >= 0) {
  133. msg = wps_build_m2(wps);
  134. - cprintf(VERBOSE, "[+] Sending M2 message\n");
  135. + cprintf(VERBOSE, "[+] Sending \033[1;35mM2\033[0m message\n");
  136. *op_code = WSC_MSG;
  137. break;
  138. }
  139. @@ -1533,17 +1533,17 @@
  140. break;
  141. case SEND_M4:
  142. msg = wps_build_m4(wps);
  143. - cprintf(VERBOSE, "[+] Sending M4 message\n");
  144. + cprintf(VERBOSE, "[+] Sending \033[1;35mM4\033[0m message\n");
  145. *op_code = WSC_MSG;
  146. break;
  147. case SEND_M6:
  148. msg = wps_build_m6(wps);
  149. - cprintf(VERBOSE, "[+] Sending M6 message\n");
  150. + cprintf(VERBOSE, "[+] Sending \033[1;35mM6\033[0m message\n");
  151. *op_code = WSC_MSG;
  152. break;
  153. case SEND_M8:
  154. msg = wps_build_m8(wps);
  155. - cprintf(VERBOSE, "[+] Sending M8 message\n");
  156. + cprintf(VERBOSE, "[+] Sending \033[1;35mM8\033[0m message\n");
  157. *op_code = WSC_MSG;
  158. break;
  159. case RECV_DONE:
  160. @@ -2429,7 +2429,7 @@
  161. static enum wps_process_res wps_process_m3(struct wps_data *wps,
  162. const struct wpabuf *msg,
  163. struct wps_parse_attr *attr) {
  164. - wpa_printf(MSG_DEBUG, "WPS: Received M3");
  165. + wpa_printf(MSG_DEBUG, "WPS: Received \033[1;35mM3\033[0m");
  166.  
  167. if (wps->state != RECV_M3) {
  168. wpa_printf(MSG_DEBUG, "WPS: Unexpected state (%d) for "
  169.  
  170. --- a/wps/wps_enrollee.c
  171. +++ b/wps/wps_enrollee.c
  172. @@ -113,7 +113,7 @@
  173. wpa_hexdump(MSG_DEBUG, "WPS: Enrollee Nonce",
  174. wps->nonce_e, WPS_NONCE_LEN);
  175.  
  176. - wpa_printf(MSG_DEBUG, "WPS: Building Message M1");
  177. + wpa_printf(MSG_DEBUG, "WPS: Building Message \033[1;35mM1\033[0m");
  178. msg = wpabuf_alloc(1000);
  179. if (msg == NULL)
  180. return NULL;
  181.  
  182. @@ -146,7 +146,7 @@
  183. static struct wpabuf * wps_build_m3(struct wps_data *wps) {
  184. struct wpabuf *msg;
  185.  
  186. - wpa_printf(MSG_DEBUG, "WPS: Building Message M3");
  187. + wpa_printf(MSG_DEBUG, "WPS: Building Message \033[1;35mM3\033[0m");
  188.  
  189. if (wps->dev_password == NULL) {
  190. wpa_printf(MSG_DEBUG, "WPS: No Device Password available");
  191.  
  192. @@ -174,7 +174,7 @@
  193. static struct wpabuf * wps_build_m5(struct wps_data *wps) {
  194. struct wpabuf *msg, *plain;
  195.  
  196. - wpa_printf(MSG_DEBUG, "WPS: Building Message M5");
  197. + wpa_printf(MSG_DEBUG, "WPS: Building Message \033[1;35mM5\033[0m");
  198.  
  199. plain = wpabuf_alloc(200);
  200. if (plain == NULL)
  201.  
  202. @@ -261,7 +261,7 @@
  203. static struct wpabuf * wps_build_m7(struct wps_data *wps) {
  204. struct wpabuf *msg, *plain;
  205.  
  206. - wpa_printf(MSG_DEBUG, "WPS: Building Message M7");
  207. + wpa_printf(MSG_DEBUG, "WPS: Building Message \033[1;35mM7\033[0m");
  208.  
  209. plain = wpabuf_alloc(500 + wps->wps->ap_settings_len);
  210. if (plain == NULL)
  211.  
  212. @@ -703,7 +703,7 @@
  213. const struct wpabuf *msg,
  214. struct wps_parse_attr *attr) {
  215.  
  216. - wpa_printf(MSG_DEBUG, "WPS: Received M2");
  217. + wpa_printf(MSG_DEBUG, "WPS: Received \033[1;35mM2\033[0m");
  218.  
  219. if (wps->state != RECV_M2) {
  220. wpa_printf(MSG_DEBUG, "WPS: Unexpected state (%d) for "
  221.  
  222. @@ -798,7 +798,7 @@
  223. struct wpabuf *decrypted;
  224. struct wps_parse_attr eattr;
  225.  
  226. - wpa_printf(MSG_DEBUG, "WPS: Received M4");
  227. + wpa_printf(MSG_DEBUG, "WPS: Received \033[1;35mM4\033[0m");
  228.  
  229. if (wps->state != RECV_M4) {
  230. wpa_printf(MSG_DEBUG, "WPS: Unexpected state (%d) for "
  231.  
  232. @@ -845,7 +845,7 @@
  233. struct wpabuf *decrypted;
  234. struct wps_parse_attr eattr;
  235.  
  236. - wpa_printf(MSG_DEBUG, "WPS: Received M6");
  237. + wpa_printf(MSG_DEBUG, "WPS: Received \033[1;35mM6\033[0m");
  238.  
  239. if (wps->state != RECV_M6) {
  240. wpa_printf(MSG_DEBUG, "WPS: Unexpected state (%d) for "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement