Skip to content

Instantly share code, notes, and snippets.

😎
I do what to do.

Moriyoshi Koizumi moriyoshi

😎
I do what to do.
Block or report user

Report or block moriyoshi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:bc20d99289b05c3dd7c5c7b7857330a2
IPL:HARD-RESET
memory test ... ok
flinstall OK
boot version: 1.0.0
PKG "3x3LIGHTNING"
CPU "Atheros/QCA9558"
Revision 113.0 CLOCK 720.0 MHz
HEAP MEMORY 262144 bytes
View gist:ddc1d7b9c2d3f4f192c39678c1d8d789
IPL:HARD-RESET
memory test ... ok
flinstall OK
boot version: 1.0.0
PKG "3x3LIGHTNING"
CPU "Atheros/QCA9558"
Revision 113.0 CLOCK 720.0 MHz
HEAP MEMORY 262144 bytes
View Dockerfile
FROM docker:dind
RUN apk add dumb-init
COPY start.sh /
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/start.sh"]
@moriyoshi
moriyoshi / xpproductkey.py
Created Sep 8, 2019
Recover a XP product key from the registry
View xpproductkey.py
import math
# HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId
# offset from 28 (0x1c) to 43 (0x2b)
b = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
digits = "BCDFGHJKMPQRTVWXY2346789"
def base24(b):
v = sum((256 ** i) * c for i, c in enumerate(b))
View lz4decodeframes.php
<?php
function lz4decodeframes($in) {
if (substr($in, 0, 4) !== "\x04\x22\x4d\x18") {
throw new Exception();
}
$o = 6;
$f = ord($in[4]);
if ($f & 8) {
$o += 8;
}
View LICENSE
Copyright (c) 2014 The Go Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
View contexts.go
import (
"context"
"sync/atomic"
"time"
)
type Contexts struct {
ReaderContext context.Context
ReaderCancel context.CancelFunc
WriterContext context.Context
@moriyoshi
moriyoshi / openssh-lpk.schema.ldif
Created Feb 4, 2018
Add SSH LDAP Public Key schema to Active Directory
View openssh-lpk.schema.ldif
dn: CN=sshPublicKey,CN=Schema,CN=Configuration,DC=testing,DC=example,DC=com
changetype: add
cn: sshPublicKey
name: sshPublicKey
lDAPDisplayName: sshPublicKey
adminDisplayName: sshPublicKey
objectClass: attributeSchema
attributeID: 1.3.6.1.4.1.24552.500.1.1.1.13
attributeSyntax: 2.5.5.10
schemaIDGUID:: +jduGq6aTj+LLL7JZhfWpw==
View Dockerfile
FROM alpine:3.6
RUN apk update && apk add nfs-utils openrc rsyslog
EXPOSE 2049 2050 2051 2052
VOLUME /export
RUN (\
echo '$ModLoad omstdout.so'; \
echo '$ModLoad imuxsock.so'; \
echo '$ModLoad imklog.so'; \
echo '*.* :omstdout:'; \
) > /etc/rsyslog.conf
View speech.py
#!/usr/bin/env python
import re
import json
from urllib.parse import urljoin
import urllib.request
TKK = [411121, 3613763667]
def Tj(a, b):
You can’t perform that action at this time.