Skip to content

Instantly share code, notes, and snippets.


Gonçalo Ribeiro goncalor

View GitHub Profile
View testssl.Dockerfile
FROM alpine
RUN apk add --no-cache bash procps drill git coreutils curl
RUN addgroup testssl
RUN adduser -G testssl -g "testssl user" -s /bin/bash -D testssl
RUN ln -s /home/testssl/ /usr/local/bin/
USER testssl
goncalor / masscan.markdown
Last active Jan 30, 2021
Notes on masscan
View masscan.markdown

Masscan notes


For NTP, masscan (1.3.1) sends by default "monlist" packets. We only get responses from IPs that have this feature enabled (which is great for NTP amplification DDoS attacks). Since we get no response we miss open NTPs that don't have this feature.

$ masscan -pU:123 <ip>
#!/usr/bin/env python3
import sys
import ipaddress
if len(sys.argv) != 2:
print("Usage: {} <file>".format(sys.argv[0]))
with open(sys.argv[1]) as f:
for line in f.readlines():
View pyspf.Dockerfile
FROM alpine
RUN apk --no-cache add python3 py3-pip git
RUN adduser -h /app -D user
RUN git clone --depth=1 .
RUN python3 install
View masscan-json2json
# Converts `masscan`'s JSON output to JSON lines that can be
# parsed by `jq` or `python -m json.tool --json-lines`.
# masscan (1.0.4) outputs an array with a trailing comma, which is invalid.
# This basically breaks the array into its elements, one per line.
# Example:
# [
# {...},
View pre-commit-yapf
# A hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
files=$(git diff --cached --name-only --diff-filter=ACM | grep "\.py$")
View ssh.txt
# gen a new RSA key
ssh-keygen -t rsa -b 4096 -f /home/user/.ssh/whatever
# .ssh/config
Host host.local
PreferredAuthentications publickey
IdentityFile ~/.ssh/whatever
goncalor / atmega328pb.markdown
Last active Jun 13, 2021
How to add support for ATmega328PB to avr-gcc and avrdude
View atmega328pb.markdown

Adding support for ATmega328PB to avr-gcc and avrdude


  1. Download ATmega's support pack from Microchip's website

  2. Unzip the relevant files

     unzip -j Atmel.ATmega_DFP.x.y.zzz.atpack \
View aquatone.Dockerfile
FROM debian:stable-slim
RUN apt update \
&& apt install -y chromium curl unzip \
&& rm -rf /var/lib/apt/lists/*
#RUN useradd -m -d /app user
RUN curl -L -o \
View boilerplate-alpine.Dockerfile
FROM alpine
RUN apk --no-cache add #python3 py3-pip git
RUN adduser -h /app -D user
#RUN git clone --depth=1 URI .
#COPY ["file", "./"]