Skip to content

Instantly share code, notes, and snippets.

@caltuntas
caltuntas / guacp-img-exporter.lua
Last active April 2, 2024 14:00
Extract and save images from guac packet capture
guacp_packets = 0
packet_no = 0
local OPCODE_IMG = "332E696D672C"
local OPCODE_BLOB = "342E626C6F622C"
local OPCODE_END = "332E656E642C"
tap_guacp = Listener.new(nil,"guacp")
local guacp_instructions_f = Field.new("guacp.instructions")
local guacp_instruction_f = Field.new("guacp.instruction")
local guacp_opcode_f = Field.new("guacp.opcode")
@caltuntas
caltuntas / curl-connection-close.sh
Last active March 4, 2024 20:26
HTTP 1.1 with keep-alive vs. without keep-alive
#!/bin/sh
PROTOCOL="http"
SERVER="localhost"
PORT=5000
URL="$PROTOCOL://$SERVER:$PORT"
/usr/bin/time curl --silent -H "Connection: close" "$URL" \
"$URL" \
"$URL" \
FROM alpine:3.18.0
RUN apk --no-cache add \
gdb \
lldb \
build-base \
libc-dev \
elfutils \
file \
binutils \
ls -l --block-size=M #list files in MBs
version: "3"
services:
mongo:
image: mongo
ports:
- 27017:27017
volumes:
- ./db:/data/db