Skip to content

Instantly share code, notes, and snippets.

View reitowo's full-sized avatar
😽
saving the world

reito reitowo

😽
saving the world
View GitHub Profile
@reitowo
reitowo / win_af_unix_connectex.cpp
Created April 10, 2025 15:40
win_af_unix_connectex.cpp
#include <iostream>
#include <winsock2.h>
#include <windows.h>
#include <ws2tcpip.h>
#include <afunix.h>
#include <stdlib.h>
#include <stdio.h>
#include <MSWSock.h>
#include <string>
  1. NCRYPT_USE_PER_BOOT_KEY_FLAG will be erased after reboot, even persisted with name.
  2. NCRYPT_USE_PER_BOOT_KEY_FLAG will not take effect, if same named key was already created with NCRYPT_REQUIRE_VBS_FLAG only.
  3. Same, if a key was created with NCRYPT_USE_PER_BOOT_KEY_FLAG and was created again with NCRYPT_OVERWRITE_KEY_FLAG without NCRYPT_USE_PER_BOOT_KEY_FLAG, this flag will not be overwritten, and the key will keep being erased across boots.
@reitowo
reitowo / main.go
Created June 22, 2025 18:04 — forked from arianvp/main.go
TPM2 Activation and Attestation flow in Go
package main
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/subtle"
"crypto/x509"
"log"
"math/big"
@reitowo
reitowo / index.html
Created July 1, 2025 11:16
Electron Spout
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
@reitowo
reitowo / iframe.html
Created July 15, 2025 15:28
transferable
<!-- Empty -->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<!-- You can also require other files to run in this process -->
<script>