Skip to content

Instantly share code, notes, and snippets.

@JimWestergren
JimWestergren / checkPawnedPasswords.php
Last active December 22, 2023 23:06
Simple method to check the Pwned Passwords API using PHP
<?php
/**
* Simple method to use the API from https://www.troyhunt.com/ive-just-launched-pwned-passwords-version-2/
* Written by Jim Westergren and released to public domain
* @return int count
*/
function checkPawnedPasswords(string $password) : int
{
$sha1 = strtoupper(sha1($password));
$data = file_get_contents('https://api.pwnedpasswords.com/range/'.substr($sha1, 0, 5));
@Enegnei
Enegnei / Revision-Controlled_Journalism_V2.md
Last active March 6, 2022 06:18
Revision-Controlled Journalism - VERSION 2

Revision-Controlled Journalism

Janine Römer | einzelgaengerin@protonmail.ch

VERSION 2 – February 1st 2018

A form of online journalism which utilizes version control systems (VCS) for the purposes of contemporaneous time-stamping and tracking changes to a story.

Ideally, this model would be implemented using open-source intelligence (OSINT), open-source software (OSS), and “copyleft” or Creative Commons (CC) licensing within an open participatory network.

THE 'FAKE NEWS' PROBLEM