Skip to content

Instantly share code, notes, and snippets.

View goncalor's full-sized avatar

Gonçalo Ribeiro goncalor

View GitHub Profile
@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;
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#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;
@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)
FROM alpine:latest
RUN apk add python3
RUN pip3 install shodan
RUN adduser -h /home/shodan -D shodan
USER shodan
WORKDIR /home/shodan
#!/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 --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
# split panes
bind - split-window -v -c "#{pane_current_path}"
bind _ split-window -h -c "#{pane_current_path}"
# create window
bind c new-window -c "#{pane_current_path}"
# switch panes
bind -n M-h select-pane -L
bind -n M-j select-pane -D
FROM alpine:latest
RUN echo @testing http://dl-cdn.alpinelinux.org/alpine/edge/testing/ \
>> /etc/apk/repositories
RUN apk --no-cache add masscan@testing libpcap-dev
CMD ["/bin/sh"]

Keybase proof

I hereby claim:

  • I am goncalor on github.
  • I am goncalor (https://keybase.io/goncalor) on keybase.
  • I have a public key whose fingerprint is 5AAE 5B73 BC0E 1B38 0223 C652 57EF 4D95 A5EB 8140

To claim this, I am signing this object: