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

NullReferenceException when not providing target list #2

Open
AnubisSec opened this issue Oct 30, 2023 · 2 comments
Open

NullReferenceException when not providing target list #2

AnubisSec opened this issue Oct 30, 2023 · 2 comments

Comments

@AnubisSec
Copy link

In the line below, the program is doing a check against the "targets" option, which is init to null. This type of comparison can't be done with a variable that is null.

https://github.com/Hackcraft-Labs/SharpShares/blob/9ddfb3bd1af6387daca81c9fd7118df876dd2103/SharpShares/Program.cs#L21C47-L21C47

Just a heads up that this breaks execution flow when not providing a target list. Should do something like if (arguments.targets.Count != null) or whatever else seems appropriate.

P.S, Love the fork!

@FilipposM
Copy link
Member

Thanks @AnubisSec for the issue, you are correct. We are looking into it and we will make a patch.

HackcraftLabs added a commit that referenced this issue Oct 31, 2023
As mentioned by @AnubisSec in Issue #2, there was an error in the
argument parsing and verification, preventing the execution of
SharpShares when no target list is provided.

This should now be fixed and working as expected.
@naliferopoulos
Copy link
Member

This has been (hopefully) fixed in 7cf593a.

@AnubisSec Thank you for reporting this issue and for supporting the fork! In case you verify if this works as expected, please let us know! Thanks! :)

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

No branches or pull requests

3 participants