Skip to content

Instantly share code, notes, and snippets.

View ciehanski's full-sized avatar

Ryan Ciehanski ciehanski

View GitHub Profile
@muff-in
muff-in / resources.md
Last active May 30, 2024 06:00
A curated list of Assembly Language / Reversing / Malware Analysis / Game Hacking-resources
@caongocthai
caongocthai / Naivebayes.go
Last active April 23, 2022 02:43
Sentiment Analysis: Naive Bayes Classifier from scratch in Golang
package main
// The string values of the 2 classes
// They can be "positive" >< "negative" as in this example
// They can also be "ham" >< "spam", i.e.
const (
positive = "positive"
negative = "negative"
)
@moloch--
moloch-- / Makefile
Last active April 26, 2023 00:55
Basic cross-platform reverse shell in Go
EXE = shell
SRC = .
LDFLAGS = -ldflags="-s -w"
windows:
GOOS=windows go build -o $(EXE)_win.exe $(LDFLAGS) $(SRC)
macos:
GOOS=darwin go build -o $(EXE)_macos $(LDFLAGS) $(SRC)
@Integralist
Integralist / GPG Security Best Practice.md
Last active June 21, 2024 03:24
[GPG Security Best Practice] #gpg #security #encryption

Concept

https://alexcabal.com/creating-the-perfect-gpg-keypair/

  1. Create a regular GPG keypair. By default GPG creates one signing subkey (your identity) and one encryption subkey (how you receive messages intended for you).

  2. Use GPG to add an additional signing subkey to your keypair. This new subkey is linked to the first signing key. Now we have three subkeys.

  3. This keypair is your master keypair. Store it in a protected place like your house or a safe-deposit box. Your master keypair is the one whose loss would be truly catastrophic.

@lgg
lgg / readme.md
Last active May 2, 2024 20:14
Keepass file format explained

Keepass file format explained

I’m currently working (I’m just at the beginning, and I’m quite slow) on a personal project that will use Keepass files (kdb and kdbx).
I tried to find some documentation about .kdb and .kdbx format, but I didn’t find anything, even in the Keepass official website. I you want to know how these file formats are structured, you must read Keepass’s source code. So I wrote this article that explains how Keepass file format are structured, maybe it will help someone.

@asukakenji
asukakenji / 0-go-os-arch.md
Last active June 27, 2024 13:32
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@kschaper
kschaper / infinite_loop.go
Last active March 21, 2024 14:02
CPU friendly infinite loop in Go
// CPU friendly
for {
select {
case <-time.After(time.Second):
// do something
}
}
// instead of busy loop
for {
@kafene
kafene / gpg-wkd.md
Last active June 2, 2024 20:45
Setting up WKD for self-hosted automatic key discovery

I just got this working so I figured I'd share what I found, since there's hardly any information about this anywhere online except an RFC, the GPG mailing list and one tutorial from the GnuPG blog.

You can use automatic key discovery with WKD (Web key directory) to make it easy for users to import your key, in GPG since version 2.1.12. Since this feature is fairly new, it isn't yet available in the current LTS release of Ubuntu (16.04; xenial), however it is available in Debian stable (stretch).

I couldn't add a DNS CERT or DANE / OPENPGPKEY record through my email service (which also hosts my nameservers). I tried making the PKA record - a foo._pka.example.com TXT record but GPG doesn't seem to recognize it and fails; I'm still investigating why.

So the last option for self-hosted auto-discovery was WKD.

First thing I had to do was add an email address to my key. My primary UID is just my name so the key represents my identity rather

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active June 27, 2024 09:17
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@jesselucas
jesselucas / changroup.go
Last active April 17, 2024 14:33
Simple solution for using a WaitGroup with select{}
package main
import (
"fmt"
"sync"
"time"
)
func main() {
// Create a wait group of any size