| package main | |
| import ( | |
| "fmt" | |
| "bytes" | |
| "os" | |
| "log" | |
| "time" | |
| "io" | |
| "http" |
| // https://blogs.oracle.com/janp/entry/how_the_scp_protocol_works | |
| package main | |
| import ( | |
| "fmt" | |
| "golang.org/x/crypto/ssh" | |
| ) | |
| const privateKey = `content of id_rsa` |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| # 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", |
| 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 |
| /* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. | |
| * File Name : ssh.go | |
| * Purpose : | |
| * Creation Date : 11-18-2013 | |
| * Last Modified : Thu Dec 5 23:12:09 2013 |
| 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" }' |
| (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] |
| (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) | |
| } | |
| } |