package bellmanford | |
import ( | |
"math" | |
) | |
// Graph represents a graph consisting of edges and vertices | |
type Graph struct { | |
edges []*Edge | |
vertices []uint |
#!/bin/bash | |
#Based off of http://code.activestate.com/recipes/491264/ | |
if [ "$1" == "startserver" ]; then | |
ncat -u -l 5355 -c $(readlink -f $0) -k | |
exit | |
fi | |
timeout 1s cat /dev/stdin > input | |
req=$(cat input | xxd -p) | |
#Functions from http://ubuntuforums.org/showthread.php?t=735140&p=4584216#post4584216 |
(function(send) { | |
XMLHttpRequest.prototype.send = function () { | |
var callback = this.onreadystatechange | |
this.onreadystatechange = function() { | |
if (this.readyState == 4) { | |
var responseURL = this.responseURL | |
if (responseURL.match(/https?:\/\/www\.youtube\.com\/watch\?v=.*/g)) { | |
console.log(responseURL) | |
} | |
} |
(function() { | |
var proxied = window.XMLHttpRequest.prototype.open; | |
window.XMLHttpRequest.prototype.open = function() { | |
console.log( arguments ); | |
return proxied.apply(this, [].slice.call(arguments)); | |
}; | |
})(); | |
/* | |
["POST", "/ajax/chat/buddy_list.php?__a=1", true] |
rabbitmqctl list_connections pid port state user vhost recv_cnt send_cnt send_pend name | awk '{print "rabbitmqctl close_connection \"" $1 "\" \"manually closing idle connection\"" | "/bin/bash" }' |
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. | |
* File Name : ssh.go | |
* Purpose : | |
* Creation Date : 11-18-2013 | |
* Last Modified : Thu Dec 5 23:12:09 2013 |
iptables --flush | |
iptables -A INPUT -p udp --dport 53 -m string --from 50 --algo bm --hex-string '|0000FF0001|' -m recent --set --name dnsanyquery | |
iptables -A INPUT -p udp --dport 53 -m string --from 50 --algo bm --hex-string '|0000FF0001|' -m recent --name dnsanyquery --rcheck --seconds 60 --hitcount 1 -j DROP | |
iptables -A INPUT -p udp --dport 53 -m u32 --u32 $(python generate-netfilter-u32-dns-rule.py --qname . --qtype ANY) -j DROP | |
#iptables -A INPUT -p udp --dport 53 -m u32 --u32 $(python generate-netfilter-u32-dns-rule.py --qname isc.org --qtype ANY) -j DROP | |
#iptables -A INPUT -p udp --dport 53 -m u32 --u32 $(python generate-netfilter-u32-dns-rule.py --qname isc.org. --qtype ANY) -j DROP | |
iptables -A INPUT -p udp --dport 53 -m string --from 50 --algo bm --hex-string '|0000FF0001|' -j DROP | |
#para bloquear ataque isc.org | |
iptables -A INPUT -p udp -m string --hex-string "|03697363036f726700|" --algo bm --to 65535 -j DROP |
# setting up irq affinity according to /proc/interrupts | |
# 2008-11-25 Robert Olsson | |
# 2009-02-19 updated by Jesse Brandeburg | |
# | |
# > Dave Miller: | |
# (To get consistent naming in /proc/interrups) | |
# I would suggest that people use something like: | |
# char buf[IFNAMSIZ+6]; | |
# | |
# sprintf(buf, "%s-%s-%d", |