Initial commit

This commit is contained in:
Marc Koch 2025-08-14 13:53:51 +02:00
commit e79a1490a9
Signed by: marc
GPG Key ID: 12406554CFB028B9
22 changed files with 425 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.env

View File

@ -0,0 +1,23 @@
meta {
name: All breaches
type: http
seq: 2
}
get {
url: https://haveibeenpwned.com/api/v3/breaches
body: none
auth: inherit
}
headers {
hibp-api-key: {{hibp-api-key}}
}
settings {
encodeUrl: true
}
docs {
See: [Getting all breached sites in the system](https://haveibeenpwned.com/API/v3#AllBreaches)
}

View File

@ -0,0 +1,23 @@
meta {
name: All dataclasses
type: http
seq: 2
}
get {
url: https://haveibeenpwned.com/api/v3/dataclasses
body: none
auth: inherit
}
headers {
hibp-api-key: {{hibp-api-key}}
}
settings {
encodeUrl: true
}
docs {
See: [Getting all data classes](https://haveibeenpwned.com/API/v3#AllDataClasses)
}

View File

@ -0,0 +1,23 @@
meta {
name: Latest breach
type: http
seq: 2
}
get {
url: https://haveibeenpwned.com/api/v3/latestbreach
body: none
auth: inherit
}
headers {
hibp-api-key: {{hibp-api-key}}
}
settings {
encodeUrl: true
}
docs {
See: [Getting the most recently added breach](https://haveibeenpwned.com/API/v3#MostRecentBreach)
}

View File

@ -0,0 +1,27 @@
meta {
name: Single breach
type: http
seq: 2
}
get {
url: https://haveibeenpwned.com/api/v3/breach/{{breach_name}}
body: none
auth: inherit
}
headers {
hibp-api-key: {{hibp-api-key}}
}
vars:pre-request {
breach_name: VerificationsIO
}
settings {
encodeUrl: true
}
docs {
See: [Getting a single breached site by name](https://haveibeenpwned.com/API/v3#SingleBreach)
}

8
General Info/folder.bru Normal file
View File

@ -0,0 +1,8 @@
meta {
name: General Info
seq: 4
}
auth {
mode: inherit
}

9
LICENSE Normal file
View File

@ -0,0 +1,9 @@
MIT License
Copyright (c) 2025 marc
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.

View File

@ -0,0 +1,27 @@
meta {
name: All breaches for account
type: http
seq: 1
}
get {
url: https://haveibeenpwned.com/api/v3/breachedaccount/{{account}}
body: none
auth: inherit
}
headers {
hibp-api-key: {{hibp-api-key}}
}
vars:pre-request {
account: john.doe@example.org
}
settings {
encodeUrl: true
}
docs {
See: [Getting all breaches for an account](https://haveibeenpwned.com/API/v3#BreachesForAccount)
}

View File

@ -0,0 +1,27 @@
meta {
name: All breaches for domain
type: http
seq: 2
}
get {
url: https://haveibeenpwned.com/api/v3/breacheddomain/{{domain}}
body: none
auth: inherit
}
headers {
hibp-api-key: {{hibp-api-key}}
}
vars:pre-request {
domain: example.org
}
settings {
encodeUrl: true
}
docs {
See: [Getting all breached email addresses for a domain](https://haveibeenpwned.com/API/v3#BreachesForDomain)
}

View File

@ -0,0 +1,27 @@
meta {
name: All pastes for an account
type: http
seq: 2
}
get {
url: https://haveibeenpwned.com/api/v3/pasteaccount/{{email}}
body: none
auth: inherit
}
headers {
hibp-api-key: {{hibp-api-key}}
}
vars:pre-request {
email: john.doe@example.org
}
settings {
encodeUrl: true
}
docs {
See: [Getting all pastes for an account](https://haveibeenpwned.com/API/v3#PastesForAccount)
}

View File

@ -0,0 +1,27 @@
meta {
name: All stealder log domains for an email address
type: http
seq: 2
}
get {
url: https://haveibeenpwned.com/api/v3/stealerlogsbyemail/{{account}}
body: none
auth: inherit
}
headers {
hibp-api-key: {{hibp-api-key}}
}
vars:pre-request {
account: john.doe@example.org
}
settings {
encodeUrl: true
}
docs {
See: [Getting all stealer log domains for an email address](https://haveibeenpwned.com/API/v3#StealerLogsForEmail)
}

View File

@ -0,0 +1,27 @@
meta {
name: All stealder log email addresses for a website domain
type: http
seq: 2
}
get {
url: https://haveibeenpwned.com/api/v3/stealerlogsbywebsitedomain/{{domain}}?domain=example.org
body: none
auth: inherit
}
params:query {
domain: example.org
}
headers {
hibp-api-key: {{hibp-api-key}}
}
settings {
encodeUrl: true
}
docs {
See: [Getting all stealer log email addresses for a website domain](https://haveibeenpwned.com/API/v3#StealerLogsForWebsiteDomain)
}

View File

@ -0,0 +1,27 @@
meta {
name: All stealder log email addresses for an email domain
type: http
seq: 2
}
get {
url: https://haveibeenpwned.com/api/v3/stealerlogsbyemaildomain/{{domain}}
body: none
auth: inherit
}
headers {
hibp-api-key: {{hibp-api-key}}
}
vars:pre-request {
domain: example.org
}
settings {
encodeUrl: true
}
docs {
See: [Getting all stealer log email aliases for an email domain](https://haveibeenpwned.com/API/v3#StealerLogsForEmailDomain)
}

8
Our Breaches/folder.bru Normal file
View File

@ -0,0 +1,8 @@
meta {
name: Our Breaches
seq: 3
}
auth {
mode: inherit
}

5
README.md Normal file
View File

@ -0,0 +1,5 @@
# Bruno Collection for »Have I Been Pwned«
A [Bruno](https://www.usebruno.com/) collection with requests for the **Have I Been Pawned** API.
[Official API Documentation](https://haveibeenpwned.com/API/v3)

View File

@ -0,0 +1,65 @@
meta {
name: Search password by range
type: http
seq: 2
}
get {
url: https://api.pwnedpasswords.com/range/{{password_hashed_prefix}}
body: none
auth: inherit
}
headers {
hibp-api-key: {{hibp-api-key}}
}
vars:pre-request {
password: 123456
}
script:pre-request {
const CryptoJS = require('crypto-js');
const password = bru.interpolate("{{password}}");
const password_hashed = CryptoJS.SHA1(password).toString().toUpperCase();
const password_hashed_prefix = password_hashed.substring(0,5);
const password_hashed_suffix = password_hashed.substring(5);
bru.setVar("password_hashed_prefix", password_hashed_prefix)
bru.setVar("password_hashed_suffix", password_hashed_suffix)
}
script:post-response {
let data = res.getBody();
const suffix = bru.getVar("password_hashed_suffix")
const password = bru.interpolate("{{password}}");
const regex = new RegExp(`^(?<hash>${suffix}):(?<occurrences>\\d*)`, "m");
const match = data.match(regex)
const result = match ? {
password: password,
found: true,
occurrences: Number(match.groups.occurrences)
}
: {
password: password,
found: false,
occurrences: 0
};
res.setBody(JSON.stringify(result, null, 4)) // Bug: https://github.com/usebruno/bruno/issues/4748
}
settings {
encodeUrl: true
}
docs {
**The password is not sent to the server!** It is hashed locally and part of the hash is sent to HIBP.
See: [Searching by Range](https://haveibeenpwned.com/API/v3#SearchingPwnedPasswordsByRange)
}

View File

@ -0,0 +1,23 @@
meta {
name: All subscribed domains
type: http
seq: 4
}
get {
url: https://haveibeenpwned.com/api/v3/subscribeddomains
body: none
auth: inherit
}
headers {
hibp-api-key: {{hibp-api-key}}
}
settings {
encodeUrl: true
}
docs {
[Getting all subscribed domains](https://haveibeenpwned.com/API/v3#SubscribedDomains)
}

View File

@ -0,0 +1,23 @@
meta {
name: Subscription status
type: http
seq: 12
}
get {
url: https://haveibeenpwned.com/api/v3/subscription/status
body: none
auth: inherit
}
headers {
hibp-api-key: {{hibp-api-key}}
}
settings {
encodeUrl: true
}
docs {
See: [Subscription](https://haveibeenpwned.com/API/v3#SubscriptionStatus)
}

8
Subscription/folder.bru Normal file
View File

@ -0,0 +1,8 @@
meta {
name: Subscription
seq: 5
}
auth {
mode: inherit
}

9
bruno.json Normal file
View File

@ -0,0 +1,9 @@
{
"version": "1",
"name": "Have I Been Pwned",
"type": "collection",
"ignore": [
"node_modules",
".git"
]
}

5
collection.bru Normal file
View File

@ -0,0 +1,5 @@
docs {
A collection of requests for the **Have I Been Pawned** API.
[Official API Documentation](https://haveibeenpwned.com/API/v3)
}

View File

@ -0,0 +1,3 @@
vars:secret [
hibp-api-key
]