Skip to content

Instantly share code, notes, and snippets.

View goncalor's full-sized avatar

Gonçalo Ribeiro goncalor

View GitHub Profile
FROM alpine:latest
RUN apk add --no-cache openssh-server #openssh-sftp-server
RUN ssh-keygen -A
RUN adduser -h /home/user -D user
RUN pw=$(head -c 12 /dev/urandom | base64); echo "user:$pw" | chpasswd; echo $pw
EXPOSE 22
CMD /usr/sbin/sshd -D && sh
#!/usr/bin/env sh
n=${1:-10}
grep /tcp /usr/share/nmap/nmap-services | sort -rk3 | cut -f2 | grep -Po '\d+' | head -n $n | tr '\n' ','
echo
FROM alpine:latest
RUN apk add python3
RUN pip3 install shodan
RUN adduser -h /home/shodan -D shodan
USER shodan
WORKDIR /home/shodan
@goncalor
goncalor / xposed.markdown
Last active December 12, 2023 14:15
How to install Xposed and JustTrustMe in a VM to defeat certificate pinning

Installing Xposed & JustTrustMe in a VM

Prerequisites

  • [Download][android_x86] an x86 Android image (32 bits)
  • [Download][xda_xposed] the XposedInstaller APK (see at bottom of original post)
  • [Download][xposed_zip] the Xposed framework for SDK27 (Android 8.1)
#include <avr/io.h>
#include <util/delay.h>
#define BAUD 9600
#include <util/setbaud.h>
#define BLINK_DELAY_MS 1000
void initUSART(void) { /* requires BAUD */
UBRR0H = UBRRH_VALUE; /* defined in setbaud.h */
UBRR0L = UBRRL_VALUE;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@goncalor
goncalor / framabag-delete-all.js
Last active November 29, 2016 16:11
Delete all articles from Framabag.org
// execute when logged into your Framabag.org account (using Wallabag 1.9.1)
// https://stackoverflow.com/questions/247483/http-get-request-in-javascript#4033310
function httpGet(theUrl)
{
var xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", theUrl, false ); // false for synchronous request
xmlHttp.send( null );
return xmlHttp.responseText;
}