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

Parsing error when comma is in URL passed via input file #1

Open
howeh4ck opened this issue Dec 16, 2022 · 0 comments
Open

Parsing error when comma is in URL passed via input file #1

howeh4ck opened this issue Dec 16, 2022 · 0 comments

Comments

@howeh4ck
Copy link

From Burp Suite, I copied all URL's from a target and pasted them in a file. I then used this as the input file for goodfaith. I found that the below URL was creating the error shown down below. When I removed the comma the program worked, as well as when I URL encoded the comma. I recommend there be an added function which URL encodes all commas found within the URL list passed to goodfaith.

Test URL: https://example.com/v1/test/?src=data:text/javascript;base64,YWxlcnQoMSk=

Error Message:

Program: TEST-001 failed to process.
Traceback (most recent call last):
  File "/home/test_user/.local/lib/python3.8/site-packages/goodfaith/core/scope.py", line 34, in parseUrlBase
    urlvalue = urlvalue.lstrip('[')
AttributeError: 'NoneType' object has no attribute 'lstrip'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/test_user/.local/lib/python3.8/site-packages/goodfaith/core/scope.py", line 116, in boundaryGuard
    dfAllURLs = processEnrichURLs(item, dfAllURLs)
  File "/home/test_user/.local/lib/python3.8/site-packages/goodfaith/core/scope.py", line 58, in processEnrichURLs
    dfAllURLs['baseurl'] = dfAllURLs['url'].apply(parseUrlBase)
  File "/home/test_user/.local/lib/python3.8/site-packages/pandas/core/series.py", line 4771, in apply
    return SeriesApply(self, func, convert_dtype, args, kwargs).apply()
  File "/home/test_user/.local/lib/python3.8/site-packages/pandas/core/apply.py", line 1105, in apply
    return self.apply_standard()
  File "/home/test_user/.local/lib/python3.8/site-packages/pandas/core/apply.py", line 1156, in apply_standard
    mapped = lib.map_infer(
  File "pandas/_libs/lib.pyx", line 2918, in pandas._libs.lib.map_infer
  File "/home/test_user/.local/lib/python3.8/site-packages/goodfaith/core/scope.py", line 48, in parseUrlBase
    baseurl = baseurl.scheme + '://' + baseurl.hostname + baseurl.path
TypeError: can only concatenate str (not "NoneType") to str

Scope processing completed.```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant