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

add --config parameter to allow specifying a configuration file #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

buzzdeee
Copy link
Contributor

@buzzdeee buzzdeee commented Mar 3, 2022

Allowing to specify a configuration file allows multiple cron jobs, or a wrapper around the script to create a number of groups in GoPhish based on different LDAP filters.

The --config parameter defaults to the given config.json.

Updated the documentation to reflect the changes, and document the config file parameters.

While there, as it seems easier to handle, I changed the way GoLDAP works. It doesn't create an
intermediary CSV file anymore. It uses the ldap_to_gophish_mapping to create a JSON blob from the
attributes retrieved from LDAP. It then checks the GoPhish API if a group with the same name already
exists, if not, it's POSTing to create a new group, otherwise PUTing to update the existing group.

Updated README.md to reflect the changes.

Hope you like it, let me know if I shall change/update some bits here or there.
If you don't like it, feel free to dismiss the MR.

json formatted config file. Default to config.json, given as
an example file in the repo.

Additionally, it doesn't create a temporary CSV file anymore.
It checks the GoPhish API if a group with the same name exists,
and if so, updates it, otherwise creates a new group.
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

Successfully merging this pull request may close these issues.

None yet

1 participant