Skip to content

Closes #15. Add JSON output support #50

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

Merged
merged 7 commits into from
Oct 4, 2017
Merged

Conversation

xuvez
Copy link
Contributor

@xuvez xuvez commented Oct 3, 2017

No description provided.

@codingo
Copy link
Owner

codingo commented Oct 3, 2017

I've resolved one bug with this but it doesn't appear to work against our test bench when tested with Windows. Stack trace below:

Traceback (most recent call last): File "VHostScan.py", line 114, in <module> main() File "VHostScan.py", line 109, in main output.output_json(arguments.output_json) File "C:\Users\codingo\VHostScan\lib\helpers\output_helper.py", line 59, in output_json file.write_file(json.dumps(list)) File "C:\Python34\lib\json\__init__.py", line 230, in dumps return _default_encoder.encode(obj) File "C:\Python34\lib\json\encoder.py", line 192, in encode chunks = self.iterencode(o, _one_shot=True) File "C:\Python34\lib\json\encoder.py", line 250, in iterencode return _iterencode(o, 0) File "C:\Python34\lib\json\encoder.py", line 173, in default raise TypeError(repr(o) + " is not JSON serializable") TypeError: b'<!DOCTYPE html>\n<html>\n <head>\n <title>Debian</title>\n </head>\n <body>\n <h1>Debian</h1>\n <p>This copy of Debian is not genuine.</p>\n <p>You may be a victim of software counterfeiting.</p>\n </body>\n</html>\n' is not JSON serializable

It looks to me like this is to do with the host.content field containing HTML and some further casting will need to be done to allow this to be serialized back to json. Given that some wordlists could be exceptionally large and I don't see many users utilising this data you could always drop this field from the output to minimize the data being written (writing everything for every scanned result is going to make a large output very quickly).

Copy link
Owner

@codingo codingo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good here, however opened #52 for some further improvements to the output

@codingo codingo merged commit 5d383d6 into codingo:master Oct 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants