Skip to content

Commit

Permalink
remove default value, adapt readme
Browse files Browse the repository at this point in the history
  • Loading branch information
security-companion committed Mar 27, 2024
1 parent 0090e9d commit 14eafc8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ A python tool to harvest haveibeenpwned.com via domain search

* add your domains to the domain search dashboard on haveibeenpwend.com
* purchase a subscription to get an API key
* rename the template.cfg file to hibp-harvester.cfg
* run python install -r requirements.txt
* run python hibp-harvester.py
* run pip install hibp-harvester
* run python src/hibp-harvester.py --api_key xxxx --wait_time 3
* open created csv-file eg. in Excel
* filter for single breach names so that you can inform users about eg. latest breach or filter for dates

Expand Down
7 changes: 3 additions & 4 deletions src/hibp_harvester.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def read_config(api_key, wait_time):
print(f"Config file {config_file_name} does not exist, please create it by using \
the template file {config_template_file_name}, using values from parameters")
# sys.exit(1)
config['DEFAULT']['API_KEY'] = api_key
config['DEFAULT']['WAIT_TIME_SECONDS'] = wait_time
config["DEFAULT"]["API_KEY"] = api_key
config["DEFAULT"]["WAIT_TIME_SECONDS"] = wait_time

return config

Expand Down Expand Up @@ -170,8 +170,7 @@ def save_breaches_to_file(breachLibrary):
)
@click.option(
"--wait_time",
default=3,
help="The wait time in seconds between requests to the API, default is 2 seconds",
help="The wait time in seconds between requests to the API, default is 3 seconds",
)
def main(api_key, wait_time):
config = read_config(api_key, wait_time)
Expand Down

0 comments on commit 14eafc8

Please sign in to comment.