jwilk / python-afl

American Fuzzy Lop fork server and instrumentation for pure-Python code
https://jwilk.net/software/python-afl
MIT License
350 stars 33 forks source link

Usability improvents #1

Closed PhillipSz closed 8 years ago

PhillipSz commented 8 years ago

Tell the user that Cython/afl is required, and if it is not installed tell the user to do so. Don't just give an error tell the user what to do.

jwilk commented 8 years ago

For the record, this what you currently get if you try to build python-afl without Cython installed:

Traceback (most recent call last):
  File "setup.py", line 33, in <module>
    import Cython.Build
ImportError: No module named Cython.Build

And this is what you currently get if you run py-afl-fuzz without AFL proper installed:

/usr/local/bin/py-afl-fuzz: 13: exec: afl-fuzz: not found

In both cases, it's obvious to me what's wrong and how to fix it. But I'm probably biased.

But I've just realized that these prerequisites are not documented anywhere. I'll update the documentation shortly.

jwilk commented 8 years ago

In ff514a62139e230219319d75d41b7880a7749995, I documented build-time and runtime dependencies . In ff1cdaa3ac91d073e06bc5781609c6f3f632b330, I made the error message when afl-fuzz is missing more user-friendly. In 53f23eb7e181192b1af802b88fe7a7d417cbe83f, I modified setup.py to catch ImportError.

Are you satisfied with these changes?

PhillipSz commented 8 years ago

yeah, thanks a lot.

jwilk commented 8 years ago

I've released python-afl 0.5.4, which includes the aforementioned changes.