This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- encoding: utf-8 -*- | |
from __future__ import unicode_literals | |
import requests | |
from requests_oauthlib import OAuth1 | |
from urlparse import parse_qs | |
REQUEST_TOKEN_URL = "https://api.twitter.com/oauth/request_token" | |
AUTHORIZE_URL = "https://api.twitter.com/oauth/authorize?oauth_token=" | |
ACCESS_TOKEN_URL = "https://api.twitter.com/oauth/access_token" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Commandline interface for proxy settings. | |
* This requires revision >= 4430 for subCommands. | |
* | |
* examples: | |
* - display current proxy type | |
* :proxy | |
* - do not use proxy | |
* :proxy direct | |
* - manual proxy configuration |