Skip to content

Instantly share code, notes, and snippets.

View andrew-morris's full-sized avatar
💭
¯\_(ツ)_/¯

Andrew Morris andrew-morris

💭
¯\_(ツ)_/¯
View GitHub Profile
@renancouto
renancouto / exploit-urls.md
Last active February 1, 2023 09:36
A collection of weird URLs that I think are used to exploit security vulnerabilities on web apps
  • /manager/html (Apache Tomcat)
  • http://123.249.24.233/POST_ip_port.php
  • /tmUnblock.cgi
  • /HNAP1/
  • /phpMyAdmin/scripts/setup.php (PHPMyAdmin)
  • /pma/scripts/setup.php
  • /myadmin/scripts/setup.php
  • /MyAdmin/scripts/setup.php
  • /vyvy/vyv/vy.php
  • /cgi-sys/php5
@chokepoint
chokepoint / dht_sniff.py
Created September 5, 2014 15:13
Distributed Hash Table Sniffer (BitTorrent)
#!/usr/bin/env python
"""
Sniff a specific port for Bit Torrent DHT traffic and print
requests/responses in human readable form.
Reference: http://www.bittorrent.org/beps/bep_0005.html
"""
from pcapy import open_live
from bencode import bdecode
@tonyseek
tonyseek / supervisord.service
Created August 8, 2014 07:11
Running supervisord with systemd.
[Unit]
Description=supervisord - Supervisor process control system for UNIX
Documentation=http://supervisord.org
After=network.target
[Service]
Type=forking
ExecStart=/usr/bin/supervisord -c /etc/supervisord.conf
ExecReload=/usr/bin/supervisorctl reload
ExecStop=/usr/bin/supervisorctl shutdown
@fluffels
fluffels / gist:53cd7b0a466e41c8ff79
Last active March 28, 2019 22:26
Byobu Cheatsheet
  • Split vertically: Ctrl-a %
  • Split horizontally: Ctrl-a \
  • Switch between splits: Ctrl-a o | Ctrl-a [left | right | up | down]
  • Swap splits: Ctrl-a Ctrl-o
  • Start a new session: byobu -S session-name
  • Resize: Ctrl-a [Ctrl | Alt]-[left | right | up | down]
@Drakulix
Drakulix / mingw-w64-3.10-osx10.9.sh
Last active January 9, 2020 11:49
Script to install a Mingw-w64 Cross-Compiler Suite on Mac OS X 10.9
#!/bin/sh
# dependencies
echo "Installing dependencies via Homebrew (http://brew.sh)"
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew update
brew install gcc48
@lunny
lunny / diskinfo.go
Created March 28, 2014 08:59
Disk Info for Golang
package main
import (
"fmt"
"syscall"
)
type DiskStatus struct {
All uint64 `json:"all"`
Used uint64 `json:"used"`
@dvdhrm
dvdhrm / memfd.patch
Created February 28, 2014 18:20
memfd_create() syscall
diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32.tbl
index 96bc506..c943b8a 100644
--- a/arch/x86/syscalls/syscall_32.tbl
+++ b/arch/x86/syscalls/syscall_32.tbl
@@ -359,3 +359,4 @@
350 i386 finit_module sys_finit_module
351 i386 sched_setattr sys_sched_setattr
352 i386 sched_getattr sys_sched_getattr
+353 i386 memfd_create sys_memfd_create
diff --git a/arch/x86/syscalls/syscall_64.tbl b/arch/x86/syscalls/syscall_64.tbl
@ChrisTM
ChrisTM / throttle.py
Created June 21, 2013 21:33
Python decorator for throttling function calls.
class throttle(object):
"""
Decorator that prevents a function from being called more than once every
time period.
To create a function that cannot be called more than once a minute:
@throttle(minutes=1)
def my_fun():
pass
@gregburek
gregburek / rateLimitDecorator.py
Created December 7, 2011 01:51
Rate limiting function calls with Python Decorators
import time
def RateLimited(maxPerSecond):
minInterval = 1.0 / float(maxPerSecond)
def decorate(func):
lastTimeCalled = [0.0]
def rateLimitedFunction(*args,**kargs):
elapsed = time.clock() - lastTimeCalled[0]
leftToWait = minInterval - elapsed
if leftToWait>0:
@asmega
asmega / .curlrc
Created October 27, 2011 12:38
default proxy for curl in .curlrc
proxy=http://username:password@host:port