Skip to content

Instantly share code, notes, and snippets.

@McJoppy
McJoppy / get-bots.php
Created July 9, 2018 04:08
Retrieve list of Bot user agents
<?php
// Original script https://gist.github.com/mateusz/990b37e4f37db299de4e
// Changed to replace whitespace with regex \s
echo "map \$http_user_agent \$limit_bots {\n";
echo " default \"\";\n\n";
$data = json_decode(file_get_contents("https://raw.githubusercontent.com/monperrus/crawler-user-agents/master/crawler-user-agents.json"), true);
$patterns = [];
foreach($data as $item) {
$patterns[] = str_replace(' ', '\s', $item['pattern']);
@McJoppy
McJoppy / AuthyToOtherAuthenticator.md
Created September 5, 2021 19:52 — forked from gboudreau/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My guess is that Brian used the