Skip to content

Instantly share code, notes, and snippets.

Avatar
🐙
I may be slow to respond.

Pedro Perez pjperez

🐙
I may be slow to respond.
View GitHub Profile
View udp-encap.go
package main
import (
"flag"
"fmt"
"log"
"net"
"os"
"os/exec"
"runtime"
@pjperez
pjperez / puncher.go
Last active Jun 23, 2018
UDP hole puncher PoC
View puncher.go
package main
import (
"fmt"
"net"
"strconv"
"time"
)
//ServerIP defines the IP and port of the other peer
View AzureFunctions.ps1
Write-Output "PowerShell Timer trigger function executed at:$(get-date)";
$uri = "https://bing.com"
$poorsodnumber = "+44........"
if ((Invoke-WebRequest -Uri $uri -UseBasicParsing).StatusCode -eq 200) { write-output "$uri is UP" } else
{
Write-Output "$uri is DOWN. Sending SMS."
# Pull in Twilio account info, previously set as environment variables
$sid = $env:TWILIO_ACCOUNT_SID
@pjperez
pjperez / RoutePrint.ps1
Last active Aug 29, 2015
Print all the effective routing tables in an Azure subscription
View RoutePrint.ps1
<#
.Synopsis
Print all your VMs' effective route tables.
Author: Pedro Perez <pedro.perez@microsoft.com>
.DESCRIPTION
This quick and dirty script will run through your subscription and query the routing table for every VM. The information is printed on screen.
.EXAMPLE
.\RoutePrint.ps1
There are no parameters. You'll be potentially asked to authenticate against Azure with your Azure admin account and to select a subscription if you have more than one.
#>
@pjperez
pjperez / whois.ps1
Created Dec 5, 2014
PowerShell Whois Client
View whois.ps1
Param(
[string]$request
)
$uri = "http://whois.datasnitch.co.uk/$request"
$r = Invoke-WebRequest -Uri $uri
$r.Content
View allrite.py
#!/usr/bin/python
import sys
from bs4 import BeautifulSoup
import requests
import re
import json
try:
url = sys.argv[1]
string = sys.argv[2]
View ciphers.sh
#!/usr/bin/env bash
# OpenSSL requires the port number.
SERVER=$1:443
# Delay after each test
DELAY=0
# Ciphers to test
ciphers=$(openssl ciphers 'ALL:eNULL' | sed -e 's/:/ /g')
# Some nice colours :)