Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140308100248.TEBFD.1289340.imail@fed1rmwml302>
Date: Sat, 8 Mar 2014 10:02:48 -0500
From:  <jfoug@....net>
To: john-dev@...ts.openwall.com
Cc: magnum <john.magnum@...hmail.com>
Subject: Fwd:  was Re: [john-users] Fwd: jtr cygwin64

I have made this change in tty.c:

#if defined (__CYGWIN32__)
		FD_ZERO(&set); FD_SET(tty_fd, &set);
		tv.tv_sec = 0; tv.tv_usec = 0;
		//if (select(tty_fd + 1, &set, NULL, NULL, &tv) <= 0)
		if (!(select(tty_fd + 1, &set, NULL, NULL, &tv) && FD_ISSET(tty_fd, &set)))
			return -1;
#endif

and the problem goes away for both cygwin64 and cygwin32.  HOWEVER, I am not sure exactly why.  They select (without the !) was something I found online about doing a cvygwin replacement of kbhit() function (visual C specific).  I think our checking of <= 0 is where the problem is, but I am not sure exactly why, nor why it was happy in cygwin32, but fails in cygwin64.  Possibly we have not fully setup raw mode, or something else.   I do not have time to dig in too much today, but with the above 'simple' change, things are working, but I am just not sure it is right.    Heck, you can even comment out the select and it works fine also, so again, without digging in deeper, I am not sure what that select is intended to do.



Full original message with bug report left intact.

---- magnum <john.magnum@...hmail.com> wrote: 
> What could be the reason for the below? Running directly under cmd.exe 
> instead of bash.exe perhaps? Though I'd thought it should work anyway.
> 
> magnum
> 
> 
> -------- Original Message --------
> Subject: jtr cygwin64
> Date: Sat, 08 Mar 2014 05:23:26 -0500
> From: (offlist)
> To: magnum
> 
> Hi,
> thanks for adding cygwin64 target to jtr bleeding-jumbo. It compiles 
> without any error.
> I've found a bug during runtime. Jtr doesn't react at pressing any key.
> 
> What i mean:
> press any key for status: doesn't work
> press q to quit doesn't work
> press Crtl + q to quit is the only key combination that works
> Hope you can fix this. Sorry for my bad english.
> best regards, fatuma
> 
> 
> 
> 

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.