Skip to content

Instantly share code, notes, and snippets.

@sffej
sffej / keybase.md
Created September 27, 2024 17:38 — forked from scelis/keybase.md

Keybase proof

I hereby claim:

  • I am scelis on github.
  • I am scelis (https://keybase.io/scelis) on keybase.
  • I have a public key whose fingerprint is 57F9 3313 8704 A915 DE95 0475 D8A2 3129 3CD8 305C

To claim this, I am signing this object:

@sffej
sffej / chpwd_update_git_vars.sh
Created September 27, 2024 17:36 — forked from scelis/chpwd_update_git_vars.sh
Add git information to your ZSH prompt.
update_current_git_vars
@sffej
sffej / main.go
Created September 19, 2024 22:55 — forked from buroz/main.go
Golang SOAP Request Example
package main
import (
"bytes"
"crypto/tls"
"encoding/xml"
"fmt"
"io/ioutil"
"net/http"
"strings"
@sffej
sffej / inspect_https-tls-ssl_certs.md
Created July 17, 2024 03:43 — forked from stonehippo/inspect_https-tls-ssl_certs.md
A couple of ways to look at web server HTTPS/TLS/SSL certificate data via the command line

Inspecting HTTPS (TLS, SSL) certificates from the command line

I needed to inspect an HTTPS site's current certs and wanted to do it from the command line. Here are a couple of commands that I used that worked quite well.

With nmap

nmap -p 443 --script ssl-cert [hostname]
@sffej
sffej / gist:6b9083c8093c4cbe9b15ffd74a64a936
Created June 13, 2024 23:56 — forked from allthingsdem/gist:63b3223a7d14ac1f2457
My long list of bad bots to block in htaccess, ready to copy and paste!
# Start Bad Bot Prevention
<IfModule mod_setenvif.c>
# SetEnvIfNoCase User-Agent ^$ bad_bot
SetEnvIfNoCase User-Agent "^12soso.*" bad_bot
SetEnvIfNoCase User-Agent "^192.comAgent.*" bad_bot
SetEnvIfNoCase User-Agent "^1Noonbot.*" bad_bot
SetEnvIfNoCase User-Agent "^1on1searchBot.*" bad_bot
SetEnvIfNoCase User-Agent "^3D_SEARCH.*" bad_bot
SetEnvIfNoCase User-Agent "^3DE_SEARCH2.*" bad_bot
SetEnvIfNoCase User-Agent "^3GSE.*" bad_bot
// Add ChatGPT Menu
const onOpen = () => {
const ui = SpreadsheetApp.getUi();
ui.createMenu("ChatGPT")
.addItem("💾 Save Responses as Text", "saveAsText")
.addItem("ChatGPT API Sheet by Sarah Tamsin 💜", "openUrl")
.addToUi();
};
@sffej
sffej / dockerhub-v2-api-organization.sh
Created June 13, 2024 02:57 — forked from kizbitz/dockerhub-v2-api-organization.sh
Get the list of images and tags for a Docker Hub organization account
#!/bin/bash
# Example for the Docker Hub V2 API
# Returns all images and tags associated with a Docker Hub organization account.
# Requires 'jq': https://stedolan.github.io/jq/
# set username, password, and organization
UNAME=""
UPASS=""
ORG=""
@sffej
sffej / xz-backdoor.md
Created April 4, 2024 19:35 — forked from thesamesam/xz-backdoor.md
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is still a new situation. There is a lot we don't know. We don't know if there are more possible exploit paths. We only know about this one path. Please update your systems regardless.

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

@sffej
sffej / bf.c
Created February 2, 2024 02:31 — forked from lifthrasiir/bf.c
/* The world's smallest Brainfuck interpreter in C, by Kang Seonghoon
* http://j.mearie.org/post/1181041789/brainfuck-interpreter-in-2-lines-of-c */
s[99],*r=s,*d,c;main(a,b){char*v=1[d=b];for(;c=*v++%93;)for(b=c&2,b=c%7?a&&(c&17
?c&1?(*r+=b-1):(r+=b-1):syscall(4-!b,b,r,1),0):v;b&&c|a**r;v=d)main(!c,&a);d=v;}
@sffej
sffej / gist:cc99915411ded5a319f9e182a5b31c05
Created January 26, 2024 01:13 — forked from relax-more/gist:487c5f2c0b80b64aa8de
memo: What is different ${...} and #{...} on spring