T0pCyber / hawk

Powershell Based tool for gathering information related to O365 intrusions and potential Breaches
https://cloudforensicator.com/
MIT License
667 stars 108 forks source link

Error entering haveibeenpwned.com apikey #107

Closed sternyz closed 1 year ago

sternyz commented 1 year ago

Describe the bug When entering my hibp api key the first time running Get-HawkUserPWNCheck, getting a 'Cannot index into a null array' error

To Reproduce Steps to reproduce the behavior:

  1. Get-HawkUserPWNCheck -user user@domain.com
  2. prompted for the haveibeenpawned.com apikey:
  3. enter key
  4. Cannot index into a null array error

Expected behavior Key accepted, user email address run through Get-HawkUserPWNCheck

Screenshots 2023-07-13_14-03-05

MSFT-SeanG commented 1 year ago

Reviewed this.

Please use the "-Email" switch, rather than "-User" when running the cmdlet. Null value is coming from lack of value in the Email field.

@T0pCyber -- Noting this for further improvements & prompting for entry of the UPN, rather than only relying on switch.