Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| input { | |
| } | |
| filter { | |
| } | |
| output { |
| #!/bin/bash | |
| set -o errexit | |
| set -o nounset | |
| if [[ ${#} -ne 1 ]] | |
| then | |
| echo "Usage: ${0} upstart-conf-file" >&2 | |
| exit 1 | |
| fi |
| import requests | |
| #http://docs.python-requests.org/en/latest/user/quickstart/#post-a-multipart-encoded-file | |
| url = "http://localhost:5000/" | |
| fin = open('simple_table.pdf', 'rb') | |
| files = {'file': fin} | |
| try: | |
| r = requests.post(url, files=files) | |
| print r.text |
| #!/usr/bin/python | |
| import socket | |
| import sys | |
| if (len(sys.argv) != 2 or not sys.argv[1].isdigit()): | |
| print 'Usage: listen <port>', | |
| exit() | |
| p = int(sys.argv[1]) | |
| l = [] |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| # Build Bro from Source on CentOS 7 | |
| ## Install EPEL | |
| sudo yum -y install epel-release | |
| ## Install runtime dependencies - These will be needed once the RPM is built | |
| sudo yum -y install libpcap openssl-libs bind-libs zlib bash python libcurl gawk GeoIP jemalloc | |
| ## Install the build dependencies | |
| sudo yum -y install @development libpcap-devel openssl-devel bind-devel zlib-devel cmake git perl libcurl-devel GeoIP-devel python-devel jemalloc-devel swig rpmdevtools |
| #!/usr/bin/env python | |
| """hover.py: Provides dynamic DNS functionality for Hover.com using their unofficial API. | |
| This script is based off one by Dan Krause: https://gist.github.com/dankrause/5585907""" | |
| __author__ = "Andrew Barilla" | |
| __credits__ = ["Andrew Barilla", "Dan Krause"] | |
| __license__ = "GPL" | |
| __version__ = "1.0" | |
| __maintainer__ = "Andrew Barilla" |
| # knife cheat | |
| ## Search Examples | |
| knife search "name:ip*" | |
| knife search "platform:ubuntu*" | |
| knife search "platform:*" -a macaddress | |
| knife search "platform:ubuntu*" -a uptime | |
| knife search "platform:ubuntu*" -a virtualization.system | |
| knife search "platform:ubuntu*" -a network.default_gateway |
| Puts on glasses: | |
| (•_•) | |
| ( •_•)>⌐■-■ | |
| (⌐■_■) | |
| Takes off glasses ("mother of god..."): | |
| (⌐■_■) | |
| ( •_•)>⌐■-■ |
| # See details in this blog entry: | |
| # http://www.echothrust.com/blogs/monitoring-pf-logs-gource | |
| ssh sensor01 "stdbuf -i0 -o0 -e0 tail -F -n +1 /var/opt/bro/logs/current/conn.log | stdbuf -i0 -o0 -e0 /opt/bro/bin/bro-cut -F\| ts id.orig_h id.resp_h id.resp_p proto" | stdbuf -i0 -o0 -e0 awk -F\| -vOFS=\| '{ gsub(/\..+/, "", $1); print $1, $2, "A", "/"$3"/"$2"/"$2":"$5"."$4,"#FF00ff"}' | ./gource --multi-sampling --no-vsync --title "bro conn activity" --key --realtime --highlight-users --highlight-dirs --user-friction 0.2 --user-scale 0.8 --log-format custom --disable-auto-rotate -i 0 - |