Giter Site home page Giter Site logo

kennethehmsen / haveibeenpwned Goto Github PK

View Code? Open in Web Editor NEW

This project forked from originaluko/haveibeenpwned

0.0 1.0 0.0 45 KB

Identify pwned accounts and passwords via the "Have I been pwned?" (https://haveibeenpwned.com) API.

License: MIT License

PowerShell 100.00%

haveibeenpwned's Introduction

HaveIBeenPwned

Identify pwned accounts and passwords via the "Have I been pwned?" (https://haveibeenpwned.com) API.

This module has been updated to the HIBP v3 API which now requires authorisation in the form of an API Key. https://haveibeenpwned.com/API/v3#APIVersion

Use of some of these functions requires an API key. This module does not come with an API key. An API key can be obtained from https://haveibeenpwned.com/API/Key

Requirements

At a minimum, make sure you have installed the following:

  1. Windows PowerShell 3+ or PowerShell Core
  2. (optional) Windows Management Framework 5.1

Installation & Execution

Option 1: PowerShellGallery

Module can be installed from the PowerShellGalley (requires PowerShell 5+)

  1. Install-Module -Name HaveIBeenPwned
Option 2: Manual
  1. Download the latest version to your desktop.
  2. Open a PowerShell console.
  3. Run Set-ExecutionPolicy using the parameter RemoteSigned or Bypass.
  4. Import the Module

Usage Instructions

HIBP v3 API now requires the use of an API Key. Make sure you are using one. The API Key can be stored as a variable and specified with the -apiKey parameter.

Examples:

Get-PwnedAccount -EmailAdddress [email protected] -apiKey "xxxxxxxxxxxxxxx"
Retuns all accounts that have been pwned via the supplied email address / username.

Get-PwnedAccount -csv c:\temp\emailaddress.csv -apiKey "xxxxxxxxxxxxxxx"
Imports a list of email addresses in csv format. Each email address being a seperate row.

Get-PwnedPassword -Password monkey
Identifies if the password has been found. *No API key required

Get-PwnedPassword -Password monkey -Padding false
Identifies if the password has been found with response padding removed. *No API key required

$Password = Read-host -AsSecureString
Get-PwnedPassword -SecureString $Password Identifies if the password, in the SecureString variable $Password, has been found

Get-PwnedPassword -SHA1 AB87D24BDC7452E55738DEB5F868E1F16DEA5ACE
Identifies if the SHA1 hash of the password has been found. *No API key required

Further examples for each function can be found by typing
Get-Help {function name} -Examples

Future

Testing with an API Key!

Issues

The HIBP API now requires the use of a UserAgent. Old versions didn't specify this by default. Always make sure you're running the latest version.

If using the CSV import functionality of Get-PwnedAccount. The default 1500 millisecond delay between checking pwned accounts may not be large enough and cause rate-limiting. Increasing the rate limit can be achieved with parameter "RateLimit" and increasing the value above 1500.

Licensing

The MIT License (MIT)

Copyright (c) 2019 ukotic.net

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

haveibeenpwned's People

Contributors

originaluko avatar plaintextcity avatar humanequivalentunit avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.