TheresAFewConors/Sooty

WhoIs lookup endless loop

aki2419 opened this issue · 5 comments

Describe the bug
When using the Option 4: DNS lookup and select option 3: WHOIS Lookup, when entering any of the requested i.e. IP / Domain the result goes into endless loop, it does not exit after giving the output. See attached
WhoIs-1

Reproduction Steps
Steps to reproduce the behavior:

  1. Select Option 4: DNS Lookup
  2. Select option 3: WhoIs lookup
  3. Enter any value and check
    ...

Expected behavior
It should have thrown the output and given another prompt to select options, rather it goes into endless loop.

Screenshots
attached screenshot

Desktop Operating System:

  • OS: [e.g. Win10, Linux, etc.]

Additional context
Add any other context about the problem here.

@TheresAFewConors The same issue happens when we use Reputation Scanner

@aki2419 couple of questions as I cannot replicate it.

  • what's your python version?
C:\Users\USER>python --version
Python 3.7.4
  • Did you install in a virtual env of some sorts? Something like the following:
python -m venv venv

OR do you have a .venv or venv or something like that in the Sooty directory?

  • Whats your pip list output? Should look something like this:
(venv) C:\Users\USER\Sooty>pip list
Package           Version
----------------- ---------
appdirs           1.4.3
asn1crypto        0.24.0
astroid           2.3.3
attrs             19.3.0
black             19.10b0
certifi           2019.6.16
cffi              1.12.3
chardet           3.0.4
Click             7.0
colorama          0.4.1
cryptography      2.7
dnspython         1.16.0
idna              2.8
ipwhois           1.1.0
isort             4.3.21
lazy-object-proxy 1.4.3
mccabe            0.6.1
pathspec          0.6.0
pip               19.3.1
pycparser         2.19
pylint            2.4.4
pyOpenSSL         19.0.0
PySocks           1.7.0
python-dateutil   2.8.1
pywin32           224
regex             2019.11.1
requests          2.22.0
ruamel.yaml       0.16.5
ruamel.yaml.clib  0.2.0
setuptools        40.8.0
six               1.12.0
strictyaml        1.0.6
toml              0.10.0
typed-ast         1.4.0
urllib3           1.24.2
wget              3.2
win-inet-pton     1.1.0
wincertstore      0.2
wrapt             1.11.2

I tried it with the same 8.8.8.8 value seen in your screenshot and got a different output, seems to be working correctly here:

image

Are you able to correctly ping the IP?

The issue you're having seems to be that the IP is not found, so it then attempts to resolve the address as a backup, and looping again however that is causing the loop as it can't reach the IP given.

EDIT:
Managed to reproduce the bug by keying in an IP that is not reachable.

image

This is something that will need to be fixed, its more of an unlikely use case but an issue nonetheless.

@TheresAFewConors Thank you.. that makes sense now... Since ping is blocked at my workplace i can see that it must be looping to reach the destination.. Just a suggestion, for such scenarios can you change the code such that it will try 3 times and then exit out of the loop...

@aki2419 Applied a fix that prevents the loop from occurring in the WhoIs lookup. The issue with the reputation check was originating from the WhoIs bug also. Both are now fixed.