Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wfuzz doesn't work on non-terminal environments #155

Closed
ghost opened this issue Aug 28, 2019 · 3 comments
Closed

wfuzz doesn't work on non-terminal environments #155

ghost opened this issue Aug 28, 2019 · 3 comments
Labels

Comments

@ghost
Copy link

ghost commented Aug 28, 2019

wfuzz doesn't work on non-terminal environments

Version info:

wfuzz --version: 2.4
python3 --version: Python 3.7.3

Details

wfuzz doesn't work when environment is non-terminal or terminal emulator is detached.
I use SSH to run wfuzz on my server. It works normally when I run it directly but it doesn't work when I try to run it in the background then close the terminal.
I think it should check the environment before printing text.

To reproduce the issue:

ssh user@server
cd /tmp
nohup bash -c "sleep 10 && wfuzz -z file,/path/to/dict.txt -f result.txt -u https://example.com/FUZZ" &
exit

Wait 10 seconds...

ssh user@server
cd /tmp
cat nohup.out

Exception details will be saved to /tmp/nohup.out file.
Traceback of the exception is similar to the below one:

Traceback (most recent call last):
  File "/usr/local/bin/wfuzz", line 7, in <module>
    from wfuzz.wfuzz import main
  File "/usr/local/lib/python3.7/dist-packages/wfuzz/wfuzz.py", line 8, in <module>
    from .ui.console.mvc import Controller, KeyPress, View
  File "/usr/local/lib/python3.7/dist-packages/wfuzz/ui/console/mvc.py", line 143, in <module>
    class View:
  File "/usr/local/lib/python3.7/dist-packages/wfuzz/ui/console/mvc.py", line 144, in View
    widths = [10, 8, 6, 6, 9, getTerminalSize()[0] - 65]
  File "/usr/local/lib/python3.7/dist-packages/wfuzz/ui/console/output.py", line 80, in getTerminalSize
    tuple_xy = _getTerminalSize_linux()
  File "/usr/local/lib/python3.7/dist-packages/wfuzz/ui/console/output.py", line 154, in _getTerminalSize_linux
    return int(cr[1]), int(cr[0])
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

I think the problem is that function _getTerminalSize_linux() can't get size of the detached terminal emulator.

@xmendez
Copy link
Owner

xmendez commented Oct 11, 2019

Hi @0xcoderman,

Have you tried using -o raw?

Cheers

@xmendez xmendez added the bug label Oct 11, 2019
@laozhoubuluo
Copy link
Contributor

Hi @0xcoderman,

Have you tried using -o raw?

Cheers

-o raw couldn't work.

This seems a bug, I will make a PR to fix it.

@xmendez
Copy link
Owner

xmendez commented Nov 16, 2019

It should be fixed in 2.4.2

@xmendez xmendez closed this as completed Nov 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants