Skip to content

Instantly share code, notes, and snippets.

Avatar

David Gouveia zatarra

View GitHub Profile
@zatarra
zatarra / cloud_metadata.txt
Created Aug 16, 2018 — forked from jhaddix/cloud_metadata.txt
Cloud Metadata Dictionary useful for SSRF Testing
View cloud_metadata.txt
## AWS
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories
http://169.254.169.254/latest/user-data
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/ami-id
http://169.254.169.254/latest/meta-data/reservation-id
http://169.254.169.254/latest/meta-data/hostname
http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key
@zatarra
zatarra / esp8266_relays.py
Created Jul 18, 2016
ESP8266 Relay controller using MicroPython
View esp8266_relays.py
import machine
import socket
import ure
RELAYS = [machine.Pin(i, machine.Pin.OUT) for i in (12, 13, 14, 15)]
def getPinStatus():
return RELAYS
def setPin(pin, value):
View keybase.md

Keybase proof

I hereby claim:

  • I am zatarra on github.
  • I am davidgouveia (https://keybase.io/davidgouveia) on keybase.
  • I have a public key whose fingerprint is E71B EC62 49A5 E7D0 B13F 605E 02CF 172F 3E10 CA4B

To claim this, I am signing this object:

@zatarra
zatarra / uid_smartcard_reader.py
Created Dec 16, 2014
Read UID from HID iClass cards
View uid_smartcard_reader.py
from smartcard.CardType import AnyCardType
from smartcard.CardRequest import CardRequest
from smartcard.util import toHexString, toBytes
from smartcard.CardMonitoring import CardMonitor, CardObserver
from smartcard.util import *
import urllib2
import time
# a simple card observer that prints inserted/removed cards
class printobserver( CardObserver ):
@zatarra
zatarra / brain.py
Last active Apr 25, 2020
Python script to parse data from Mindflex headband and convert it into a powerfull EEG device
View brain.py
#!/usr/bin/python
import serial
import sys
latestByte = ('c')
lastByte = ('c')
inPacket = False
myPacket = []
PLENGTH = 0
@zatarra
zatarra / kickstarter.php
Last active Oct 6, 2016
Kickstarter new project notifier
View kickstarter.php
<?php
date_default_timezone_set("Europe/Lisbon");
##############################################################
# KICKSTARTER CRAWLER
# Author: David Gouveia
# Email: david.gouveia [_AT_] gmail.com
#
# This is a very simple script which allows you to crawl
# kickstarter projects and trigger some alerts. I find
View stravamerger.php
#!/usr/bin/env php -q
<?php
/*
* StravaMerger © David Gouveia - http://www.davidgouveia.net
* Simple script to merge tracking data from Strava's exported GPX files.
* The backtrack_limit is there because some files could not be parsed due to their size.
* Feel free to raise the limit but be carrefull not to cross the limit.
* Instead of using regex, I could have used a XML cursor to overcome the backtrack limit
* but either I would have to use the php_xml extension or build my own parser.
*/
@zatarra
zatarra / url_checker.pl
Last active Dec 19, 2015
Simple URL checker. All it does is check a predefined url to see if it has changes over the time. If it did , then it sends you an e-mail. It is useful when your are waiting for something on a website to change!
View url_checker.pl
#!/usr/bin/perl -W
use strict;
use warnings;
use LWP::Simple;
use Digest::MD5 qw(md5 md5_hex md5_base64);
use Encode qw(encode_utf8);
my $link = [URL TO BE CHECKED];
my $email_from = [FROM EMAIL];
my $email = [TO EMAIL];
@zatarra
zatarra / jks-certificate-expiry-checker.sh
Last active Jun 18, 2020
Small script to check the expiry of all the certificates inside a java keystore.
View jks-certificate-expiry-checker.sh
#!/bin/sh
########################################################
#
# Check certificates inside a java keystore
#
########################################################
TIMEOUT="timeout -k 10s 5s "
KEYTOOL="$TIMEOUT keytool"
THRESHOLD_IN_DAYS="30"
@zatarra
zatarra / DynDnsUpdater.vb
Last active Oct 18, 2019
Simple DynDns Updater Class written in VB.NET
View DynDnsUpdater.vb
' .Net DynDNS client class by David Gouveia - me[_@_]davidgouveia.net
' Feel free to use it as long as you don't remove the credits :o)
Imports System.Net
Imports System.IO
Public Class DynDnsUpdater
Private _username, _password, _host, _ip As String
Public Enum UpdateStatus
SUCESS
You can’t perform that action at this time.