bitsadmin / wesng

Windows Exploit Suggester - Next Generation
BSD 3-Clause "New" or "Revised" License
4.13k stars 554 forks source link

output file issue - TypeError: 'newline' #30

Closed A2-Dev closed 5 years ago

A2-Dev commented 5 years ago

Let me thank you for your work in making this tool. I checked closed and open issues and could not find anything related to the error i have, so i apologize if this has already been covered somewhere else.

Python2.7

Z:\disco>python wes.py sysinf.txt qfe.txt -e -o z:\disco\wesout.txt Windows Exploit Suggester 0.96 ( https://github.com/bitsadmin/wesng/ ) [+] Parsing systeminfo output [+] Parsing quick fix engineering (qfe) output [+] Operating System

  • Name: Windows 10 Version 1803 for x64-based Systems
  • Generation: 10
  • Build: 17134
  • Version: 1803
  • Architecture: x64-based
  • Installed hotfixes (12): \ [+] Loading definitions
  • Creation date of definitions: 20190723 [+] Determining missing patches [+] Applying display filters [+] Found vulnerabilities [+] Writing 5 results to z:\disco\wesout.txt Traceback (most recent call last): File "wes.py", line 776, in main() File "wes.py", line 208, in main store_results(args.outputfile, filtered) File "wes.py", line 648, in store_results with open(outputfile, 'w', newline='') as f: TypeError: 'newline' is an invalid keyword argument for this function`

I've also tried the same command with:

-o wesout.txt -o .\wesout.txt

bitsadmin commented 5 years ago

Thanks A2-Dev, for your bugreport! This bug indeed hadn't been found yet.

I just fixed the issue in commit 47ff43c in the dev branch.

Download the latest wes.py from the dev branch and the issue will be resolved. Later I will merge the dev to the main branch. In case meanwhile you encounter any other issues, let me know!