janstarke / rexgen

API Documentation
https://github.com/janstarke/rexgen/blob/master/doc/api.md
GNU General Public License v2.0
52 stars 21 forks source link

tons of stderr output (src/librexgen/string/simplestring.cpp) #25

Closed frank-dittrich closed 7 years ago

frank-dittrich commented 8 years ago

When building latest rexgen (commit 6618432d60e00b74c0ad8fde32d674bd6222f266) and then building latest John the Ripper (commit https://github.com/magnumripper/JohnTheRipper/commit/c84b0c435c598a0953994ae0a46b911b36d44de9), tons of stderr output will be produced.

(bleeding-jumbo)run $ echo test > test.lst
(bleeding-jumbo)run $ ./john --stdout --wordlist=test.lst --regex='1\02'
APPEND
0074
0065
0073
0074
1test2

The APPEND and each character's utf-16 representation (of the input word "test") seem to be debug output.

Those need to be suppressed in a default rexgen build.

(master)rexgen $ grep -n -C 2 "fprintf(stderr" src/librexgen/string/simplestring.cpp
46-
47-void SimpleString::append(const char* ch, size_t ch_len) {
48:  fprintf(stderr, "APPEND\n");
49- /* ensure that buffer is not full */
50- if (length > SIMPLESTRING_MAXLEN) {
--
61-     characters[length++] = ch[idx];
62-
63:    fprintf(stderr, "%04x\n", characters[length-1].codepoint);
64- }
65-}