-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
MyPy CI failures #1488
MyPy CI failures #1488
Conversation
I need to take a look at page_from_response later. I run |
Also damn, I tried to do a quiet commit for formatting. You can review with shift + click over the other commits when reviewing though. |
As far as I understand it that is to know when to stop iterating, I could be wrong on that but would need Matt to chime in. |
With regards to more checks to run, can you fix the flake8 ci failures from this PR please? |
I think it might be appropriate to also add |
Yeah sounds good 👍
On 24 Jul 2023, at 03:13, yoon ***@***.***> wrote:
I think it might be appropriate to also add E203, W503 to .flake8 ignore.
They are both whitespace before ':' and line break before binary operator respectively.
Both of those make for more readable code when slicing with an expression and long binary sequences like in some conditionals.
—
Reply to this email directly, view it on GitHub<#1488 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AA3V2QRBPHQYPKE43ZSQUUDXRXK5NANCNFSM6AAAAAA2U4C6XY>.
You are receiving this because you commented.Message ID: ***@***.***>
|
I wouldn't be too worried about running these workflows yet; I still haven't fixed |
@@ -848,7 +848,6 @@ async def handler(lst): | |||
print('\n[*] Virtual hosts:') | |||
print('------------------') | |||
for data in host_ip: | |||
from theHarvester.discovery import bingsearch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from theHarvester.discovery import *
already exists at the top of the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some times it's needed as it does not actually work without that, if you tested it and it still works then am happy for it to be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested it out myself after making this change yet, only ran pytest
after. I'll give it a shot tomorrow. There's still more I've got to go through it looks like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LMK if you got a command I can run that results in some vhosts. I tried a few stuff with keeping and removing the import, but both resulsts didn't have any vhosts to show. I can experiment with harvesting more a bit later.
Looks like the workflow isn't pointing to
|
Ah can you update it please and give it the --config flag as that is what is missing, thanks for pointing that out |
It looks like expected behavior of method next_page_or_end is to return |
Hopefully all checks pass this time around.
both with and without the looped import. |
Give apple.com and or Microsoft.com
On 24 Jul 2023, at 18:09, yoon ***@***.***> wrote:
❯ flake8 --config .flake8 theHarvester
❯ mypy --pretty theHarvester/*/*.py
Success: no issues found in 51 source files
❯ pytest
====================================== test session starts ======================================
platform darwin -- Python 3.9.6, pytest-7.4.0, pluggy-1.2.0
rootdir: /Users/yunis/repos/theHarvester
configfile: pytest.ini
testpaths: tests
plugins: asyncio-0.21.1, anyio-3.7.1, typeguard-2.13.3
asyncio: mode=auto
collected 16 items
tests/test_myparser.py . [ 6%]
tests/discovery/test_anubis.py ... [ 25%]
tests/discovery/test_certspotter.py ... [ 43%]
tests/discovery/test_githubcode.py ..... [ 75%]
tests/discovery/test_otx.py .. [ 87%]
tests/discovery/test_threatminer.py .. [100%]
====================================== 16 passed in 46.83s ======================================
Hopefully all checks pass this time around.
I have just once concern about removing import shadowed by loop variable<https://github.com/laramies/theHarvester/pull/1488/commits/8f7dd9d75c09fc1a09cd21b6e69f64e5eec4e1ef>](https://github.com/laramies/theHarvester/pull/1488/files#diff-e026ff479beedd53324b4e852f868c2a3ac337d2185a49c4346168cb0f472079L851).
When I run python3 theHarvester.py -v -d google.com -b all, my output is
...
zxkitk.feedproxy.ghs.google.com:142.250.204.83
zyy53f.feedproxy.ghs.google.com
[*] Virtual hosts:
------------------
both with and without the looped import.
It's great that it doesn't give me a NameError from removing the import.
However, I'd like to ensure that a source and domain that result in virtual hosts also result in those same virtual hosts with the looped import removed.
Otherwise, LGTM 🤷
—
Reply to this email directly, view it on GitHub<#1488 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AA3V2QVYDIAZUZGZ5VVMRSLXR2T2ZANCNFSM6AAAAAA2U4C6XY>.
You are receiving this because you commented.Message ID: ***@***.***>
|
No luck with either domain. |
I see #1341 but I cannot reproduce the reference before assignment. |
Yeah sounds good to me |
File: theHarvester/lib/stash.py
File: theHarvester/screenshot/screenshot.py
File: theHarvester/lib/core.py
File: theHarvester/discovery/takeover.py
File: theHarvester/discovery/dnsdumpster.py
File: theHarvester/discovery/constants.py
File: theHarvester/discovery/zoomeyesearch.py
File: theHarvester/discovery/securitytrailssearch.py
File: theHarvester/discovery/intelxsearch.py
File: theHarvester/discovery/githubcode.py
File: theHarvester/discovery/bingsearch.py
File: theHarvester/discovery/censysearch.py