XSStrike icon indicating copy to clipboard operation
XSStrike copied to clipboard

Fix for error while reading UTF-8 encoded custom text file via the -f flag

Open computerauditor opened this issue 1 month ago • 0 comments

I was unable to raise a pull request hence reporting this fix via issue!!! Tested while using python version 3.11.9 XSS-strike is having issues while reading custom xss payload file via -f flag , hence i modified the old "reader" function in the core/utils.py

Old code:

def reader(path):
    with open(path, 'r') as f:
        result = [line.rstrip(
                    '\n').encode('utf-8').decode('utf-8') for line in f]
    return result

Modified code:

def reader(path):
    with open(path, 'r', encoding='utf-8') as f:
        result = [line.rstrip('\n') for line in f]
    return result

Modify this at line 203 to 207 (reader function) in core/utils.py

computerauditor avatar May 29 '24 08:05 computerauditor