@@ -224,7 +224,8 @@ def _draw_current_tab(self):
224224 # Draw value
225225 value_str = ""
226226 if option ['type' ] == 'bool' :
227- value_str = "[X]" if option ['value' ] else "[ ]"
227+ value = option ['value' ] if option ['value' ] is not None else option .get ('default' )
228+ value_str = "[X]" if value else "[ ]"
228229 else :
229230 value_str = str (option ['value' ]) if option ['value' ] else ""
230231 if option ['default' ] and not option ['value' ]:
@@ -367,7 +368,7 @@ def _export_config(self):
367368 for tab in self .tabs :
368369 for option in tab ['options' ]:
369370 dest = option ['dest' ]
370- value = option ['value' ] if option ['value' ] else option .get ('default' )
371+ value = option ['value' ] if option ['value' ] is not None else option .get ('default' )
371372
372373 if option ['type' ] == 'bool' :
373374 config [dest ] = bool (value )
@@ -526,7 +527,7 @@ def _run_sqlmap(self):
526527 for tab in self .tabs :
527528 for option in tab ['options' ]:
528529 dest = option ['dest' ]
529- value = option ['value' ] if option ['value' ] else option .get ('default' )
530+ value = option ['value' ] if option ['value' ] is not None else option .get ('default' )
530531
531532 if option ['type' ] == 'bool' :
532533 config [dest ] = bool (value )
@@ -580,10 +581,11 @@ def _show_console(self, configFile):
580581 close_fds = not IS_WIN
581582 )
582583
583- # Make it non-blocking
584- import fcntl
585- flags = fcntl .fcntl (process .stdout , fcntl .F_GETFL )
586- fcntl .fcntl (process .stdout , fcntl .F_SETFL , flags | os .O_NONBLOCK )
584+ if not IS_WIN :
585+ # Make it non-blocking
586+ import fcntl
587+ flags = fcntl .fcntl (process .stdout , fcntl .F_GETFL )
588+ fcntl .fcntl (process .stdout , fcntl .F_SETFL , flags | os .O_NONBLOCK )
587589
588590 output_win .nodelay (True )
589591 console_win .nodelay (True )
0 commit comments