Skip to content

Instantly share code, notes, and snippets.

View hainh's full-sized avatar

Hai Nguyen Hong hainh

  • Ha Noi, Vietnam
View GitHub Profile
@hainh
hainh / extract_otp_secrets.md
Created June 1, 2023 16:50
Extract OTP secret from Google Authenticator in a simple way

This show how to extract OTP secret from Google Authenticator

  1. Export your account from Authenticator app then use other phone to scan the QR code displayed
  2. Your text from QR code has form of: otpauth-migration://offline?data=thisIsSomeDataInBase64AndUrlEncoded%2B%3D
  3. Convert the data (all after otpauth-migration://offline?data=) to base64 by F12 in Chrome/Edge, in Developer console enter the following: decodeURIComponent('thisIsSomeDataInBase64AndUrlEncoded%2B%3D') image
  4. Copy the result string (without quotes) to https://protobuf-decoder.netlify.app/ you will get image
  5. Notice content at Byte range 0-12 is your secret key, copy that string 23 f8 58 9a 0d a6 93 f1 22 ec to https://cryptii.com/pipes/hex-to-base32 ![image](https://user-images.githubusercontent.com/2195141/24266984

Repo 1: started from 1/1/2016 to 1/1/2020.

Repo 2: copied from last commit of repo 1 and continues till now

###Concatenating repo 2 to tail of repo 1:

From repo 2, add remote to repo 1:

git remote add old file://to/repo1/
git fet old
foreach ($ext in $args) {
if ($ext.startswith(".")) {
$path = "HKLM\SOFTWARE\Classes\" + $ext;
reg add $path /v PerceivedType /t REG_SZ /d text
}
}
@hainh
hainh / h.py
Last active October 18, 2020 08:32 — forked from rongyi/stardict2txt.py
convert a stardict dictionary to txt
# ----------------------------------------------------------------------------------------------
# HULK - HTTP Unbearable Load King
#
# this tool is a dos tool that is meant to put heavy load on HTTP servers in order to bring them
# to their knees by exhausting the resource pool, its is meant for research purposes only
# and any malicious usage of this tool is prohibited.
#
# author : Barry Shteiman , version 1.0
# ----------------------------------------------------------------------------------------------
import urllib2