Skip to content

Instantly share code, notes, and snippets.

View alinefr's full-sized avatar

Aline Freitas alinefr

  • São Paulo/SP, Brazil
View GitHub Profile
@alinefr
alinefr / heartbeat_check.py
Created April 9, 2014 15:58
OpenSSL TLS Heartbeat Extension - Memory Disclosure
#!/usr/bin/python
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
@alinefr
alinefr / exploit.diff
Created April 9, 2014 16:03
Heartbeat Exploit
The OpenSSL toolkit stays under a dual license, i.e. both the conditions of
the OpenSSL License and the original SSLeay license apply to the toolkit.
See below for the actual license texts. Actually both licenses are BSD-style
Open Source licenses. In case of any license issues related to OpenSSL
please contact openssl-core@openssl.org.
(c) Tim Brown, 2014
<mailto:timb@nth-dimension.org.uk>
<http://www.nth-dimension.org.uk/> / <http://www.machine.org.uk/>
@alinefr
alinefr / delete_repos.py
Last active June 20, 2022 13:05
Simple python script to delete multiple github repositories.
import os
import requests
token = '' # token needs delete_repo permission
organization = '' # or user
url = 'https://api.github.com/repos/{}'.format(organization)
headers = {'Accept': 'application/vnd.github.v3+json',
'Authorization': 'token {}'.format(token)}

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

#!/bin/sh
#
# Copyright (C) 1995 - 1998, Ian A. Murdock <imurdock@debian.org>
# Copyright (C) 1998, 1999, Guy Maor
# Copyright (C) 2002, Matthew Wilcox
# Copyright (C) 2002, 2004, 2005, 2007, 2009 Clint Adams
# Copyright (C) 2009 Manoj Srivasta
# Copyright (C) 2016 Aline Freitas
#
# This script is called from /usr/src/linux/arch/i386/boot/install.sh.
@alinefr
alinefr / autolock.sh
Created December 24, 2016 08:11 — forked from yrps/autolock.sh
Xautolock locker and notifier wrapper: systemctl suspend and dunst aware
#!/bin/sh
set -eu
# This script is intended to be run as the xautolock locker and notifier.
# It requires i3lock, and dunst is optional.
# Copy or link this script as /usr/bin/slock to let xfce4-session run it.
if [ "$(basename "$0")" = "slock" ]; then
cmd=lock
@alinefr
alinefr / check_cloudflare_lastpass.py
Last active March 1, 2017 05:21 — forked from anp/check_cloudflare_lastpass.py
Check a LastPass CSV export for potential CloudFlare vulnerabilities
"""
This is the product of me spending a few minutes trying to
assess how much of my LastPass vault is potentially vulnerable
to the recent CloudFlare issue.
It's hacky, and probably broken in some way, but it's a start.
Gist comments with improvements very welcome.
"""
@alinefr
alinefr / wp-mysqldump.sh
Last active June 27, 2024 13:09
Generate mysqldump from mysql for wordpress running in a container.
#!/bin/bash
# -------------------------------------------------------------------------
# Script to generate mysqldump from wordpress running inside a container
#
# Copyright (C) 2016 Aline Freitas <nospam@nospam.org>
#
# It has two command line arguments:
# -c: the docker container name
# -d: the html volume in your host pointing to the root of your wordpress installation.
# It needs to be where exist the wp-config.php file.
@alinefr
alinefr / chef-azure.md
Last active June 24, 2017 05:03
Como criar uma VM azure usando chef.

Criando uma VM azure usando chef.

O propósito aqui é de criar uma VM Azure usando chef em local-mode, ou seja a partir de uma máquina de trabalho.

  1. Instalar ChefDK https://downloads.chef.io/chefdk

  2. Instalar o plugin chef-provisioning-azurerm
    Em qualquer terminal, seja num sistema Linux, Mac ou Windows Powershell o procedimento é o mesmo.

Keybase proof

I hereby claim:

  • I am alinefr on github.
  • I am alinefr (https://keybase.io/alinefr) on keybase.
  • I have a public key ASAgZPW-XDIlZtrGDIw4smgd9a-xH3Ea8omlDB2XF8yqvAo

To claim this, I am signing this object: