Chagnes to add spraying user as pass, and to enable install via pipx #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
USER AS PASS
Added some logic that if the -p flag is set to useraspass it will spray the username without the domain as the password.
ENABLE PIPX INSTALLS
Wrapped everything in a main() function then at the end added
if __name__ == "__main__":
main()
to the end so it still runs normally if called directly, this is needed because an entry point function needs to be specified in the pyproject.toml file to allow for pipx installs.
Added a pyproject.toml file, now you can install it with pipx install git+htps://githubuser/repository
TO TEST BEFORE MERGING INTO YOUR OWN REPO DO THE FOLLOWING
install pipx for your distribution
Debian based: sudo apt install pipx git
Arch based: sudo pacman -S python-pipx git
add pipx stuff to your path
pipx ensurepath
install my fork with pipx
pipx install pipx install git+https://github.com/Pyro57000/MSOLSpray
BUY WHY
pipx is a really cool way to install python based applications, it automatically creates a venv for each application and installs all the dependencies in that venv, then adds the tool to your path as a command, so after you install anything with pipx you just run the name in your terminal to call it, for example if you set up my repo for testing as layed out above you can now use msolspray.py by just calling MSOLSpray in the terminal, no need to specify python, no need to add the .py to the end, just MSOLSpray and your flags, the venv is loaded automatically, the tool is run and you're reverted back to your default shell after execution is done without needing to think.