Skip to content

Instantly share code, notes, and snippets.

See .

@x2q
x2q / ping_atftp.sh
Created September 19, 2012 08:12
Simple script to ping and then atftp a firmware image e.g. openwrt or dd-wrt
#!/bin/bash
# Simple script to ping and then atftp a firmware image
# Works on my machine and an ASUS WL-500g series router
# Usage: ./ping_atftp 192.168.1.1 openwrt-brcm47xx-squashfs.trx
EXPECTED_ARGS=2
if [ $# -ne $EXPECTED_ARGS ]; then
echo "Usage: `basename $0` ip-addr firmware-image"
exit 1;
fi
@kemayo
kemayo / eyewonder.js
Created October 20, 2011 21:20
Eyewonder XSS
document.write('<style type="text/css">body{padding); margin:0}</style>');
document.write('<iframe id="iwonder_hack" src="http://' + location.host + '/" width="100%" height="100%" style="border:0;padding:0;margin:0"></iframe>');
setTimeout(function(){
var frmdoc = document.getElementsByTagName('iframe')[0].contentWindow.document
,rotation = 0
,links = frmdoc.getElementsByTagName('a')
,images = frmdoc.getElementsByTagName('img')
,props = ['transform', 'WebkitTransform', 'msTransform', 'MozTransform', 'OTransform']
,transform = function(elem, trans) {
for (var i = 0; i < props.length; i++) {
@astockwell
astockwell / parse_guid.py
Last active June 8, 2020 10:09
Decoding Oracle Raw(16), in Python 3 and Ruby 2
def split_into_chunks(string, chunk_length=2):
chunks = []
while len(string) > 0:
chunks.append(string[:chunk_length])
string = string[chunk_length:]
return chunks
def to_oracle_raw16(string, strip_dashes=True, dashify_result=False):
oracle_format_indices = [3, 2, 1, 0, 5, 4, 7, 6, 8, 9, 10, 11, 12, 13, 14, 15]
if strip_dashes:
@pibi
pibi / LICENSE
Created July 12, 2011 10:54
Embedding V8 on GWAN
Copyright (c) 2011 pibi, http://pianobit.com
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
open -na "Google Chrome Canary" --args --user-data-dir=/Users/dave/.burp-chrome --allow-insecure-localhost --allow-running-insecure-content --disable-add-to-shelf --disable-background-networking --disable-bundled-ppapi-flash --disable-captive-portal-bypass-proxy --disable-clear-browsing-data-counters --disable-client-side-phishing-detection --disable-cloud-import --disable-component-cloud-policy --disable-component-extensions-with-background-pages --disable-component-update --disable-contextual-search --disable-datasaver-prompt --disable-default-apps --disable-device-discovery-notifications --disable-dinosaur-easter-egg --disable-domain-reliability --disable-eol-notification --disable-extensions-http-throttling --disable-http2 --disable-logging --disable-login-animations --disable-network-portal-notification --disable-ntp-popular-sites --disable-offer-upload-credit-cards --disable-office-editing-component-extension --disable-offline-auto-reload --disable-offline-auto-reload-visible-only --disable-password-gen
@blister
blister / gist:740829
Created December 14, 2010 18:19
Bash script to add a delay to the localhost interface on Linux machines
#!/bin/bash
# Copyright 2010 Eric Ryan Harrison <me@ericharrison.info>
# Inspired by:
# http://daniel.haxx.se/blog/2010/12/14/add-latency-to-localhost/
if [ -n "$1" ]
then
if [ "$1" = "off" ]
then
tc qdisc del dev lo root
@jdowning
jdowning / vagrant-clean.sh
Last active December 13, 2021 06:59
Script to clean up Ubuntu Vagrant box before packaging
#!/bin/bash
# This script zeroes out any space not needed for packaging a new Ubuntu Vagrant base box.
# Run the following command in a root shell:
#
# bash <(curl -s https://gist.github.com/justindowning/5670884/raw/vagrant-clean.sh)
function print_green {
echo -e "\e[32m${1}\e[0m"
}
@ezmobius
ezmobius / gist:807334
Created February 2, 2011 06:37
Run this script on a mac osx box running 10.6 and you will get a luajit with batteries included and all the good libs
#!/bin/bash
# have to hand install this one sorry http://www.cmake.org/files/v2.8/cmake-2.8.3-Darwin-universal.tar.gz
if [ "$1" == "cleanup" ]; then
echo "Cleaning up old luajit install"
cd /usr/local/share
sudo rm -rf lua luajit-2.0.0-beta6
@heri16
heri16 / bgpd.conf
Last active February 21, 2023 05:40
AWS VPC VPN StrongSwan Virtual Tunnel Interface (VTI)
#@ /etc/quagga/bgpd.conf (Centos & Ubuntu)
hostname <Local OS hostname>
password <Any random phrase>
enable password <Any random phrase>
!
log file /var/log/quagga/bgpd
!debug bgp events
!debug bgp zebra
debug bgp updates