Skip to content

Instantly share code, notes, and snippets.

View briceburg's full-sized avatar

Brice Burgess briceburg

  • toil over toil
  • albuquerque, nm
View GitHub Profile
@briceburg
briceburg / nc-httpd.sh
Last active April 28, 2022 16:04
quickie nectcat httpd server
#!/usr/bin/env bash
port="${1:-8888}"
cmd="ls /home"
while true; do echo -e "HTTP/1.1 200 OK\\n\\n $($cmd)\\n" | nc -l -p $port ; done
execve("/usr/bin/flameshot", ["flameshot", "gui"], 0x7ffcd8d54e78 /* 30 vars */) = 0
brk(NULL) = 0x555984515000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=108558, ...}) = 0
mmap(NULL, 108558, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffa0d9aa000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/libQt5Widgets.so.5", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\244\24\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=6657984, ...}) = 0
@briceburg
briceburg / healthcheck.sh
Created March 20, 2018 21:52
bash :: HTTP GET client (for healtcheck)
#!/usr/bin/env bash
# example HTTP client. @author briceburg
main(){
set -eo pipefail
readonly __script=$(basename "$0")
host="$(hostname -i || echo 'localhost')"
port=8080
@briceburg
briceburg / keybase.md
Last active August 9, 2022 14:54
keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@briceburg
briceburg / reincarnate.coffee
Created November 17, 2017 22:42
restart hubot on reincarnate command
module.exports = (robot) ->
robot.hear /reincarnate hubots?/i, (res) ->
res.send "goodbye for now cruel world. may I return a better bot... (boom)!"
setTimeout ->
process.exit();
, 500
@briceburg
briceburg / bcrypt.sh
Created October 7, 2017 23:59
bcrypt - xor obfuscation in bash
#!/usr/bin/env shell-helpers
# bcrypt - simple obfuscation through xor
# NOT safe for cryptographic use.
# @requires shell-helpers (https://github.com/briceburg/shell-helpers)
#
# example usage:
# cat source.txt | bcrypt > source.txt.crypt
# cat source.txt.crypt | bcrypt > source.txt.decrypted
# diff source.txt source.txt.decrypted || echo "there was an error!"
@briceburg
briceburg / fixes.patch
Last active September 28, 2017 03:34
[patch] adds logs service, general fixes
diff --git a/ansible/playbooks/aws-swarm-mk.yml b/ansible/playbooks/aws-swarm-mk.yml
index f181725..a082932 100644
--- a/ansible/playbooks/aws-swarm-mk.yml
+++ b/ansible/playbooks/aws-swarm-mk.yml
@@ -166,3 +166,12 @@
docker_experimental_mode: yes
roles:
- docker-ce
+
+ tasks:
@briceburg
briceburg / Dockerfile
Created September 26, 2017 16:57 — forked from nknapp/Dockerfile
Traefik setup as reverse-proxy with docker and letsencrypt
FROM traefik:camembert
ADD traefik.toml .
EXPOSE 80
EXPOSE 8080
EXPOSE 443
@briceburg
briceburg / socat-fun.md
Last active September 14, 2017 01:30
socat fun

proxy to SSL host, debugging request

# socat TCP4-LISTEN:5000,fork OPENSSL:google.com:443
$ curl localhost:5000
$ curl --header 'Host: google.com' localhost:5000
$ cat <<EOF | nc localhost 5000
@briceburg
briceburg / socat-fun.md
Created September 14, 2017 01:28
socat fun

proxy to SSL host, debugging request

# socat TCP4-LISTEN:5000,fork OPENSSL:localhost:443
curl localhost:5000
curl --header 'Host: google.com' localhost:5000