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

Validate input to zdns #284

Closed
vishalmohanty opened this issue Feb 17, 2022 · 1 comment · Fixed by #356
Closed

Validate input to zdns #284

vishalmohanty opened this issue Feb 17, 2022 · 1 comment · Fixed by #356
Assignees
Labels
Milestone

Comments

@vishalmohanty
Copy link
Contributor

Consider this input to the tool

» echo "google.com,censys.io" | ./zdns A --name-servers=8.8.8.8 | python -m json.tool

On this input, zdns keeps waiting without making any progress or terminating. We have to currently terminate it manually by using Ctrl+C.

» echo "google.com,censys.io" | ./zdns A --name-servers=8.8.8.8 | python -m json.tool
^CTraceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 192, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/tool.py", line 53, in <module>
    main()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/tool.py", line 44, in main
    objs = (json.load(infile), )
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/__init__.py", line 293, in load
    return loads(fp.read(),
KeyboardInterrupt

Validate input before passing it to zdns.

@vishalmohanty vishalmohanty self-assigned this Feb 17, 2022
@vishalmohanty
Copy link
Contributor Author

Define a validate function for each of the input params and pass the params for validation

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

Successfully merging a pull request may close this issue.

4 participants