sharsil / mailcat

Find existing email addresses by nickname using API/SMTP checking methods without user notification. Please, don't hesitate to improve cat's job! 🐱🔎 📬
Apache License 2.0
565 stars 77 forks source link

Gmail timed out connection error and No results found for known gmail, yahoo and other email providers #32

Open WhiteHatInspector opened 1 year ago

WhiteHatInspector commented 1 year ago

I am using pycharm to run the script but it doesn't work.

1st issue: Known email addresses are not found. e.g.jsmith and johnsmith bring back zero results to almost all providers (but for sure not gmail and yahoo) which is impossible. Sometimes running the script gives me results to these usernames for only some of the email providers (not gmail and yahoo), but then running it again doesn't show again these results.

2nd issue: Gmail, Yandex and mailDe always throw connection errors or timed out connection. This happen even if I use VPN services to change my IP. I have also tried changing timeout= parameter to 20,30,60 in the "server = aiosmtplib.SMTP(timeout=10, validate_certs=False)" line of code250 function but the issue persists. I get various messages, different each time like: a) Error while checking gmail: Timed out connecting to alt3.gmail-smtp-in.l.google.com. on port 25 b) Error while checking gmail: 421 Cannot connect to SMTP server 142.250.157.27 (142.250.157.27:25), connect error 10060 c) Error while checking gmail: Timed out waiting for server ready message

I checked powershell with "Test-NetConnection alt4.gmail-smtp-in.l.google.com -Port 25" and connection was successful as reply message was "TcpTestSucceeded : True"

My pycharm environment details are: PyCharm 2023.1 (Community Edition) Runtime version: 17.0.6+10-b829.5 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Python version: 3.9.1

pip freeze gives me the following: aiohttp==3.8.4 aiosignal==1.3.1 aiosmtplib==2.0.1 appdirs==1.4.4 async-timeout==4.0.2 attrs==22.2.0 beautifulsoup4==4.12.0 bs4==0.0.1 certifi==2022.12.7 charset-normalizer==3.1.0 colorama==0.4.6 cssselect==1.2.0 dnspython==2.3.0 fake-useragent==1.1.3 frozenlist==1.3.3 idna==3.4 importlib-metadata==6.1.0 importlib-resources==5.12.0 lxml==4.9.2 multidict==6.0.4 parse==1.19.0 pyee==8.2.2 pyppeteer==1.0.2 pyquery==2.0.0 requests==2.28.2 requests-html==0.10.0 sd-aiosmtplib==0.0.2 soupsieve==2.4 tqdm==4.65.0 urllib3==1.26.15 w3lib==2.1.1 websockets==10.4 yarl==1.8.2 zipp==3.15.0

The results are after the change from "server = aiosmtplib.esmtp.ESMTP(timeout=10)", which threw error: "Error while checking gmail: module ‘aiosmtplib.esmtp’ has no attribute ‘ESMTP’" to server = aiosmtplib.SMTP(timeout=10, validate_certs=False)

soxoj commented 1 year ago

Thank you for the issue. I tried to reproduce with your versions of libs but had no luck. I added a new option timeout, try to increase it and reproduce it, let's check.

Also, I have some thoughts about paralleling checks, cause now they are running simultaneously, and it could be a reason for handshake timeout (-p mailde -p yandex -p gmail running successfully).

Maybe I'll add something like a parallel executor with a limited queue as in Maigret, I should experiment a little bit to understand will it be helpful.

soxoj commented 1 year ago

@WhiteHatInspector, please, check mailcat version from this branch: https://github.com/sharsil/mailcat/tree/async-refactor