Skip to content

Instantly share code, notes, and snippets.

@blacknon
blacknon / ssh_term_x11forwarding.go
Last active August 21, 2023 08:51
goでx11フォワーディング付きでssh接続でシェルを利用する検証・サンプルコード(動く)
// Test only on Mac
package main
import (
"crypto/sha1"
"errors"
"fmt"
"io"
"math/rand"
@blacknon
blacknon / create-cloud-template.sh
Created August 17, 2023 01:24 — forked from chriswayg/create-cloud-template.sh
This script will download a cloud image of many Linux distros and create a Proxmox 6 KVM template from it.
#!/bin/bash
set -o errexit
clear
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n"
### HOW TO USE
### Pre-req:
### - run on a Proxmox 6 server
### - a dhcp server should be active on vmbr1
@blacknon
blacknon / notworking_ssh_term_x11forwarding.go
Last active August 14, 2023 07:59
goでx11フォワーディング付きでssh接続でシェルを利用する検証・サンプルコード(動かない)
package main
import (
"errors"
"fmt"
"os"
"os/signal"
"syscall"
"golang.org/x/crypto/ssh"
@blacknon
blacknon / google-dorks
Last active March 15, 2023 05:36 — forked from mehdichaouch/google-dorks
Listing of a number of useful Google dorks.
Explanations:
cache: If you include other words in the query, Google will highlight those words within
the cached document. For instance, [cache:www.google.com web] will show the cached
content with the word “web” highlighted. This functionality is also accessible by
clicking on the “Cached” link on Google’s main results page. The query [cache:] will
show the version of the web page that Google has in its cache. For instance,
[cache:www.google.com] will show Google’s cache of the Google homepage. Note there
can be no space between the “cache:” and the web page url.
------------------------------------------------------------------------------------------
@blacknon
blacknon / kaomoji.txt
Created February 25, 2023 02:35
ちょっと後で使いたくなりそうな顔文字系のメモ
`ʕ•͡ᴥ•ʔ ʕ•͡ᴥ•ʔ ʕ•͡ᴥ•ʔ`
@blacknon
blacknon / test_markdown.md
Last active February 18, 2023 05:24
test markdown

test_markdown

あいうえお. かきくけこ. さしすせそ.

@blacknon
blacknon / term_ssh.go
Last active February 13, 2023 03:18
Golang ssh client (support Control key)
package main
import (
"fmt"
"os"
"os/signal"
"syscall"
"golang.org/x/crypto/ssh"
"golang.org/x/crypto/ssh/terminal"
@blacknon
blacknon / aa.py
Last active February 12, 2023 10:17
#!/usr/bin/env python3
# -*- encoding: UTF-8 -*-
import itertools
options = {
"x": ["a", "b"],
"y": [10, 20, 30]}
keys = options.keys()
values = (options[key] for key in keys)
@blacknon
blacknon / yaruo_command_not_found_handle.sh
Last active February 12, 2023 09:40
コマンドがないとやる夫が煽ってくるcommand_not_found_handle
command_not_found_handle() {
####
# 変数の定義
####
# 変数(ASCII ART)定義
AA1="
          ____
       / \  /\ キリッ
     / (ー)(ー)\
    /  ⌒(__人__)⌒\     「$1」、
@blacknon
blacknon / example_p11_getsinger_bk5.go
Last active February 12, 2023 09:39
goで`github.com/miekg/pkcs11/p11`を使って、Yubikey内からsshのCryptoSignerを取得するサンプルコード
// Copyright (c) 2020 Blacknon. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
// `github.com/miekg/pkcs11/p11`を使って、Yubikey内からsshのCryptoSignerを取得するサンプルコード
package main
import (
"crypto/rsa"