Skip to content

Instantly share code, notes, and snippets.

View jadeydi's full-sized avatar
🎯
Focusing

HunterQ jadeydi

🎯
Focusing
View GitHub Profile
@klzgrad
klzgrad / 00-README.txt
Last active April 19, 2024 09:26
DNS compression pointer mutation
$ LD_PRELOAD=$PWD/sendmsg.so dig twitter.com @8.8.8.8
;; Warning: Message parser reports malformed message packet. <-- malformed 因为把压缩指针当作域名一部分了
;; Question section mismatch: got twitter.com/RESERVED0/CLASS256
; <<>> DiG 9.9.5-3-Ubuntu <<>> twitter.com @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44722
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1
package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)
@trcarden
trcarden / gist:3295935
Created August 8, 2012 15:28
Rails 3.2.7 SSL Localhost (no red warnings, no apache config)
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@nebiros
nebiros / Gemfile
Created May 23, 2012 15:58
rails + unicorn + rbenv + init.d daemon
group :production do
gem "unicorn"
end
@biti
biti / haml_vs_erb_vs_erubis.rb
Created June 25, 2011 10:13
erb,erubis,haml的性能比较.结果:haml不靠谱
# encoding: utf-8
require 'rubygems'
require 'haml'
require 'erb'
require 'erubis'
notes = []
20.times { notes << {:title => "标题标题", :content => "内容,内容"} }
obj = {