Quantcast
Channel: 看得透又看得远者prevail.ppt.cc/flUmLx ppt.cc/fqtgqx ppt.cc/fZsXUx ppt.cc/fhWnZx ppt.cc/fnrkVx ppt.cc/f2CBVx
Viewing all 20452 articles
Browse latest View live

DnsTunnel Backdoor

$
0
0

(DNS隧道后门)

本作品使用了DNS隧道技术,且是跨平台的(go语言),生成器使用了易语言,做界面简单粗暴。目前编译成了 windows 64位 和 linux64位的两个版本。功能和操作相同
本作品是我花费了2天半的时间写的,遵循了标准的DNS MX协议,在极端网络屏蔽情况下,内网渗透变得复杂,我们只能把通信包装成dns协议才能继续内网渗透。本作品利用了超长域名分段传输数据
优势:
1】使用了aes对称加密算法,传输过程即使人工手动检测到DNS异常传输也难以解码
2】传输协议稳定,客户端&服务端严格遵循DNS MX协议,且传输过程分段打包传输
3】使用了http扩展协议,可以通过http post的方式优雅关停服务。避免手动hook隐藏以后 找不到进程无法结束(例如linux上使用 curl 即可优雅关停,下文有使用说明)
4】跨平台,多平台
劣势:
1】没有做相关的rookit hook 进程可见。在此推荐1个linux效果不错 兼容性很强的hook。可以自己手动hook。已经测试了可用。
另一方面考虑是系统兼容性问题所以没有整合到代码中,还是自己make自己手动hook稳定性比较好。
https://github.com/gianlucaborello/libprocesshider (使用了 ld preloader 技术)
2】体积略大,因为是使用golang写的,在没压缩的情况下已经比较大了,可以自行加壳压缩。目前渗透工作,文件体积大小不是瓶颈
3】只使用了dns隧道,其他隧道没有做,因为目前做工具只想做专精,不想整合太多隧道,恶意行为太多容易被一些极端防火墙告警。 后续其他隧道预计独立项目开发。尽量不做整合
4】传输略慢,因为dns隧道对数据包的大小有严格要求,所以只能分段传输,最后还要合包。效率不及普通TCP。
命令回显需要等待一些时间。命令发送禁止超长命令。
使用场景:
内网极端环境下的渗透(防火墙只允许dns协议),以及拿到root权限后,配合hook隐藏技术,下后门。
用途:
可以使用此工具 远程执行shell命令

目录结构

client 目录 -> 目录里的_test文件是一些很重要的测试 
server_main.go.b -> 是服务端的main文件
client.main.go -> 是客户端的main文件
generator 目录 -> 是使用易语言写的生成器,只是生成方便一些,给菜鸟使用。大牛可以自行改代码编译

generator.exe -> 是易语言编译好的生成器

使用说明

1、使用生成器generator.exe 配置服务端端口 和 客户端连接的地址 设置aes密钥(16位)
2、服务端启动、客户端启动。在服务端控制台上发送shell命令。稍作等待即可回显
3、优雅关停: 配置http服务端口,, 向指定地址 /off 发送http post请求,即可关闭程序
例如linux : curl "http://127.0.0.1:8080/off" -X POST -d "aes密钥" 
密钥必须记好 否则不能优雅关停。
优雅关停场景:在hook进程或者内核hook的情况下,很难找到这个进程,销毁变得麻烦。使用优雅关停 http请求后自动销毁关闭,省心省力。
4、在服务端使用过程中, /e 可以直接退出程序 /up 可以返回上层菜单
5、该工具灵活运用,做好hook的情况下,可以在内网畅通无阻。

更新计划

1、添加win平台的自动 hook(感谢提建议),linux平台依然建议使用上面的工具手动hook。
2、添加端口复用

回答疑问

1、服务器只有web对外,无法通过转发等手段连接桌面3389,regeorg又被阻断(疑似检测到来了socket代理的缘故吧),这样的网络结构还有什么办法把3389转发出来么。
答:可以通过端口复用拦截,走web服务,思路和隧道一样,也可以叫https http隧道,将3389的数据包转发出来。等上面2个功能更新好后,后续我这边会研究一下。类似于国外软件 reduh 

写给使用者

【免责声明:无恶意代码,仅作隧道技术研究,用于非法用途自负】

dns-heaven

$
0
0
Fixes stupid macOS DNS stack (/etc/resolv.conf)
dns-heaven fixes macOS DNS stack by enabling the usage of the native DNS stack through /etc/resolv.conf.

Overview

Some programs like dig, nslookup and anything compiled with Go doesn't use macOS native name resolution stack. This makes some features like split DNS to not work with those programs.
This occurs because macOS native name resolution uses a set of rules that aren't compatible with resolv.conf. This includes:
  • Per interface DNS settings (scoped)
  • Per domain settings
In order to support programs that uses resolv.conf, macOS writes a file with only the primary name server and search domains that were configured either through DHCP or manually.

Installation

Just run:
curl -L https://git.io/fix-my-dns-plz | sudo bash
This script downloads the latest version and installs a LaunchAgent making sure that dns-heaven is always running.
If you want to do this manually, just download the latest release or compile dns-heaven yourself, and make sure it's always running.

How it works

dns-heaven exposes a DNS server that acts as a proxy mimicking native macOS behaviour. This is accomplished by periodically reading the output of scutil --dns and updating upstream rules and nameservers.
It also keeps /etc/resolv.conf pointing to 127.0.0.1 as the system will rewrite this file whenever your network settings changes (e.g.: changing wifi network).

Tor-DNS

$
0
0
Simple DNS server that uses a Tor SOCKS5 proxy to resolve names.

Tor-DNS: Simple DNS server that uses a Tor SOCKS5 proxy to resolve domains.

Introduction

N.B.: The functionality provided by this little application is basically identical to what you get by setting the "DNSPort [address:]port|auto [isolation flags]" parameter in your Tor configuration file. So consider this as a hands-on experiment for Tor proxy communication in Go.
In case you run a torified application (using the torsocks or tsocks helper scripts) and the application in question still uses (domain) names to address computers on the internet, the resulting DNS queries can jeopardize your anonymity if an adversary can monitor your DNS queries to the nameservers.
This little DNS server uses the built-in Tor SOCKS5 functionality to resolve names via the Tor network and therefore helps to ensure your anonymity in the above cases.
Currently the DNS server can only handle very simple queries (like resolving a name or reverse lookup of an IP address), but it can't return other records than those of type "A" (IPv4 addresses), so no "MX", "AAAA", "SOA", "NS" or "TXT" queries are answered at all. This is due to the limitations within the Tor proxy; whenever it is extended, the Tor-DNS service will make use of that new query types.

Prerequisites

This application assumes you have installed Tor on your local computer and that the local Tor relay is up and running as a SOCKS5 proxy.
A detailed help is available at http://torproject.org.

Install

This version ot Tor-DNS is designed for the Go1 release; see http://golang.org for more details.
To build an executable for your platform, change into the source directory and type the following command:
$ go build -o tor-dns
This builds the required executable that can then be run using the following command:
$ sudo ./tor-dns
Because the server is running on the privileged port 53 (domain) it requires root permissions to be run.

Things to consider

  • Make sure you have stopped any other DNS service on your local machine before starting Tor-DNS.
  • Make sure that Tor-DNS is used to resolve local queries by modifying the /etc/resolv.conf file or whatever is appropriate on your platform.

超级杀手锏-美國何時查封中共高官財產?

關鍵時刻「台灣製造 直送美國」 一條龍的伺服器產業已經悄悄打敗中國!!

$
0
0

台湾赶快超越中国,彻底击败共匪中国。

dns解析服务器程序(兼安全工具)-dnschef

$
0
0
Lightweight DNS proxy written in python. This is a re-hosting. 
This is a fork of the DNSChef project v0.2.1 hosted at: http://thesprawl.org/projects/dnschef/

Overview

DNSChef is a highly configurable DNS proxy for Penetration Testers and Malware Analysts. A DNS proxy (aka "Fake DNS") is a tool used for application network traffic analysis among other uses. For example, a DNS proxy can be used to fake requests for "badguy.com" to point to a local machine for termination or interception instead of a real host somewhere on the Internet.
There are several DNS Proxies out there. Most will simply point all DNS queries a single IP address or implement only rudimentary filtering. DNSChef was developed as part of a penetration test where there was a need for a more configurable system. As a result, DNSChef is cross-platform application capable of forging responses based on inclusive and exclusive domain lists, supporting multiple DNS record types, matching domains with wildcards, proxying true responses for nonmatching domains, defining external configuration files, IPv6 and many other features. You can find detailed explanation of each of the features and suggested uses below.
The use of DNS Proxy is recommended in situations where it is not possible to force an application to use some other proxy server directly. For example, some mobile applications completely ignore OS HTTP Proxy settings. In these cases, the use of a DNS proxy server such as DNSChef will allow you to trick that application into forwarding connections to the desired destination.
Version 0.3 introduces support for more DNS record types, DNSSEC, logging, more configurable remote nameservers, support for the updated dnslib library and several bug fixes.
Version 0.2 introduces IPv6 support, large number of new DNS record types, custom ports and other frequently requested features.

Table of Contents

  • Setting up a DNS Proxy
  • Installing DNSChef
  • Running DNSChef
    • Intercept all responses
    • Filtering domains
    • Reverse filtering
    • External definitions file
    • Advanced Filtering
    • Logging
  • Other configurations
  • Internal architecture

Setting up a DNS Proxy

Before you can start using DNSChef, you must configure your machine to use a DNS nameserver with the tool running on it. You have several options based on the operating system you are going to use:
  • Linux - Edit /etc/resolv.conf to include a line on the very top with your traffic analysis host (e.g add "nameserver 127.0.0.1" if you are running locally). Alternatively, you can add a DNS server address using tools such as Network Manager. Inside the Network Manager open IPv4 Settings, select Automatic (DHCP) addresses only or Manual from the Method drop down box and edit DNS Servers text box to include an IP address with DNSChef running.
  • Windows - Select Network Connections from the Control Panel. Next select one of the connections (e.g. "Local Area Connection"), right-click on it and select properties. From within a newly appearing dialog box, select Internet Protocol (TCP/IP) and click on properties. At last select Use the following DNS server addresses radio button and enter the IP address with DNSChef running. For example, if running locally enter 127.0.0.1.
  • OS X - Open System Preferences and click on the Network icon. Select the active interface and fill in the DNS Server field. If you are using Airport then you will have to click on Advanced... button and edit DNS servers from there. Alternatively, you can edit /etc/resolv.conf and add a fake nameserver to the very top there (e.g "nameserver 127.0.0.1").
  • iOS - Open Settings and select General. Next select on Wi-Fi and click on a blue arrow to the right of an active Access Point from the list. Edit DNS entry to point to the host with DNSChef running. Make sure you have disabled Cellular interface (if available).
  • Android - Open Settings and select Wireless and network. Click on Wi-Fi settings and select Advanced after pressing the Options button on the phone. Enable Use static IP checkbox and configure a custom DNS server.
If you do not have the ability to modify device's DNS settings manually, then you still have several options involving techniques such as ARP Spoofing, Rogue DHCP and other creative methods.
At last you need to configure a fake service where DNSChef will point all of the requests. For example, if you are trying to intercept web traffic, you must bring up either a separate web server running on port 80 or set up a web proxy (e.g. Burp) to intercept traffic. DNSChef will point queries to your proxy/server host with properly configured services.

Installing DNSChef

DNSChef requires dnslib and IPy python libraries. You can obtain their latest versions here:

Running DNSChef

DNSChef is a cross-platform application developed in Python which should run on most platforms which have a Python interpreter. You can use the supplied dnschef.exe executable to run it on Windows hosts without installing a Python interpreter. This guide will concentrate on Unix environments; however, all of the examples below were tested to work on Windows as well.
Let's get a taste of DNSChef with its most basic monitoring functionality. Execute the following command as root (required to start a server on port 53):
# ./dnschef.py

_ _ __
| | version 0.2 | | / _|
__| |_ __ ___ ___| |__ ___| |_
/ _` | '_ \/ __|/ __| '_ \ / _ \ _|
| (_| | | | \__ \ (__| | | | __/ |
\__,_|_| |_|___/\___|_| |_|\___|_|
iphelix@thesprawl.org

[*] DNSChef started on interface: 127.0.0.1
[*] Using the following nameservers: 8.8.8.8
[*] No parameters were specified. Running in full proxy mode
Without any parameters, DNSChef will run in full proxy mode. This means that all requests will simply be forwarded to an upstream DNS server (8.8.8.8 by default) and returned back to the quering host. For example, let's query an "A" record for a domain and observe results:
$ host -t A thesprawl.org
thesprawl.org has address 108.59.3.64
DNSChef will print the following log line showing time, source IP address, type of record requested and most importantly which name was queried:
[23:54:03] 127.0.0.1: proxying the response of type 'A' for thesprawl.org
This mode is useful for simple application monitoring where you need to figure out which domains it uses for its communications.
DNSChef has full support for IPv6 which can be activated using -6 or --ipv6* flags. It works exactly as IPv4 mode with the exception that default listening interface is switched to ::1 and default DNS server is switched to 2001:4860:4860::8888. Here is a sample output:
# ./dnschef.py -6
_ _ __
| | version 0.2 | | / _|
__| |_ __ ___ ___| |__ ___| |_
/ _` | '_ \/ __|/ __| '_ \ / _ \ _|
| (_| | | | \__ \ (__| | | | __/ |
\__,_|_| |_|___/\___|_| |_|\___|_|
iphelix@thesprawl.org

[*] Using IPv6 mode.
[*] DNSChef started on interface: ::1
[*] Using the following nameservers: 2001:4860:4860::8888
[*] No parameters were specified. Running in full proxy mode
[00:35:44] ::1: proxying the response of type 'A' for thesprawl.org
[00:35:44] ::1: proxying the response of type 'AAAA' for thesprawl.org
[00:35:44] ::1: proxying the response of type 'MX' for thesprawl.org
NOTE: By default, DNSChef creates a UDP listener. You can use TCP instead with the --tcp argument discussed later.

Intercept All Responses

Now, that you know how to start DNSChef let's configure it to fake all replies to point to 127.0.0.1 using the --fakeip parameter:
# ./dnschef.py --fakeip 127.0.0.1 -q
[*] DNSChef started on interface: 127.0.0.1
[*] Using the following nameservers: 8.8.8.8
[*] Cooking all A replies to point to 127.0.0.1
[23:55:57] 127.0.0.1: cooking the response of type 'A' for google.com to 127.0.0.1
[23:55:57] 127.0.0.1: proxying the response of type 'AAAA' for google.com
[23:55:57] 127.0.0.1: proxying the response of type 'MX' for google.com
In the above output you an see that DNSChef was configured to proxy all requests to 127.0.0.1. The first line of log at 08:11:23 shows that we have "cooked" the "A" record response to point to 127.0.0.1. However, further requests for 'AAAA' and 'MX' records are simply proxied from a real DNS server. Let's see the output from requesting program:
$ host google.com localhost
google.com has address 127.0.0.1
google.com has IPv6 address 2001:4860:4001:803::1001
google.com mail is handled by 10 aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.
As you can see the program was tricked to use 127.0.0.1 for the IPv4 address. However, the information obtained from IPv6 (AAAA) and mail (MX) records appears completely legitimate. The goal of DNSChef is to have the least impact on the correct operation of the program, so if an application relies on a specific mailserver it will correctly obtain one through this proxied request.
Let's fake one more request to illustrate how to target multiple records at the same time:
# ./dnschef.py --fakeip 127.0.0.1 --fakeipv6 ::1 -q
[*] DNSChef started on interface: 127.0.0.1
[*] Using the following nameservers: 8.8.8.8
[*] Cooking all A replies to point to 127.0.0.1
[*] Cooking all AAAA replies to point to ::1
[00:02:14] 127.0.0.1: cooking the response of type 'A' for google.com to 127.0.0.1
[00:02:14] 127.0.0.1: cooking the response of type 'AAAA' for google.com to ::1
[00:02:14] 127.0.0.1: proxying the response of type 'MX' for google.com
In addition to the --fakeip flag, I have now specified --fakeipv6 designed to fake 'AAAA' record queries. Here is an updated program output:
$ host google.com localhost
google.com has address 127.0.0.1
google.com has IPv6 address ::1
google.com mail is handled by 10 aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.
Once more all of the records not explicitly overriden by the application were proxied and returned from the real DNS server. However, IPv4 (A) and IPv6 (AAAA) were both faked to point to a local machine.
DNSChef supports multiple record types from the command line:
+--------+--------------+-----------+--------------------------+
| Record | Description |Argument | Example |
+--------+--------------+-----------+--------------------------+
| A | IPv4 address |--fakeip | --fakeip 192.0.2.1 |
| AAAA | IPv6 address |--fakeipv6 | --fakeipv6 2001:db8::1 |
| MX | Mail server |--fakemail | --fakemail mail.fake.com |
| CNAME | CNAME record |--fakealias| --fakealias www.fake.com |
| NS | Name server |--fakens | --fakens ns.fake.com |
+--------+--------------+-----------+--------------------------+
NOTE: For usability not all DNS record types are exposed on the command line. Additional records such as PTR, TXT, SOA, SRV, DNSKEY, RRSIG, etc. can be specified using the --file flag and an appropriate record header. See the external definitions file section below for details.
At last let's observe how the application handles queries of type ANY:
# ./dnschef.py --fakeip 127.0.0.1 --fakeipv6 ::1 --fakemail mail.fake.com --fakealias www.fake.com --fakens ns.fake.com -q
[*] DNSChef started on interface: 127.0.0.1
[*] Using the following nameservers: 8.8.8.8
[*] Cooking all A replies to point to 127.0.0.1
[*] Cooking all AAAA replies to point to ::1
[*] Cooking all MX replies to point to mail.fake.com
[*] Cooking all CNAME replies to point to www.fake.com
[*] Cooking all NS replies to point to ns.fake.com
[00:17:29] 127.0.0.1: cooking the response of type 'ANY' for google.com with all known fake records.
DNS ANY record queries results in DNSChef returning every faked record that it knows about for an applicable domain. Here is the output that the program will see:
$ host -t ANY google.com localhost
google.com has address 127.0.0.1
google.com has IPv6 address ::1
google.com mail is handled by 10 mail.fake.com.
google.com is an alias for www.fake.com.
google.com name server ns.fake.com.

Filtering Domains

Using the above example, consider you only want to intercept requests for thesprawl.org and leave queries to all other domains such as webfaction.com without modification. You can use the --fakedomains parameter as illustrated below:
# ./dnschef.py --fakeip 127.0.0.1 --fakedomains thesprawl.org -q
[*] DNSChef started on interface: 127.0.0.1
[*] Using the following nameservers: 8.8.8.8
[*] Cooking replies to point to 127.0.0.1 matching: thesprawl.org
[00:23:37] 127.0.0.1: cooking the response of type 'A' for thesprawl.org to 127.0.0.1
[00:23:52] 127.0.0.1: proxying the response of type 'A' for mx9.webfaction.com
From the above example the request for thesprawl.org was faked; however, the request for mx9.webfaction.com was left alone. Filtering domains is very useful when you attempt to isolate a single application without breaking the rest.
NOTE: DNSChef will not verify whether the domain exists or not before faking the response. If you have specified a domain it will always resolve to a fake value whether it really exists or not.

Reverse Filtering

In another situation you may need to fake responses for all requests except a defined list of domains. You can accomplish this task using the --truedomains parameter as follows:
# ./dnschef.py --fakeip 127.0.0.1 --truedomains thesprawl.org,*.webfaction.com -q
[*] DNSChef started on interface: 127.0.0.1
[*] Using the following nameservers: 8.8.8.8
[*] Cooking replies to point to 127.0.0.1 not matching: *.webfaction.com, thesprawl.org
[00:27:57] 127.0.0.1: proxying the response of type 'A' for mx9.webfaction.com
[00:28:05] 127.0.0.1: cooking the response of type 'A' for google.com to 127.0.0.1
There are several things going on in the above example. First notice the use of a wildcard (). All domains matching .webfaction.com will be reverse matched and resolved to their true values. The request for 'google.com' returned 127.0.0.1 because it was not on the list of excluded domains.
NOTE: Wildcards are position specific. A mask of type .thesprawl.org will match www.thesprawl.org but not www.test.thesprawl.org. However, a mask of type .*.thesprawl.org will match thesprawl.org, www.thesprawl.org and www.test.thesprawl.org.

External Definitions File

There may be situations where defining a single fake DNS record for all matching domains may not be sufficient. You can use an external file with a collection of DOMAIN=RECORD pairs defining exactly where you want the request to go.
For example, let create the following definitions file and call it dnschef.ini:
[A]
*.google.com=192.0.2.1
thesprawl.org=192.0.2.2
*.wordpress.*=192.0.2.3
Notice the section header [A], it defines the record type to DNSChef. Now let's carefully observe the output of multiple queries:
# ./dnschef.py --file dnschef.ini -q
[*] DNSChef started on interface: 127.0.0.1
[*] Using the following nameservers: 8.8.8.8
[+] Cooking A replies for domain *.google.com with '192.0.2.1'
[+] Cooking A replies for domain thesprawl.org with '192.0.2.2'
[+] Cooking A replies for domain *.wordpress.* with '192.0.2.3'
[00:43:54] 127.0.0.1: cooking the response of type 'A' for google.com to 192.0.2.1
[00:44:05] 127.0.0.1: cooking the response of type 'A' for www.google.com to 192.0.2.1
[00:44:19] 127.0.0.1: cooking the response of type 'A' for thesprawl.org to 192.0.2.2
[00:44:29] 127.0.0.1: proxying the response of type 'A' for www.thesprawl.org
[00:44:40] 127.0.0.1: cooking the response of type 'A' for www.wordpress.org to 192.0.2.3
[00:44:51] 127.0.0.1: cooking the response of type 'A' for wordpress.com to 192.0.2.3
[00:45:02] 127.0.0.1: proxying the response of type 'A' for slashdot.org
Both google.com and www.google.com matched the *.google.com entry and correctly resolved to 192.0.2.1. On the other hand www.thesprawl.org request was simply proxied instead of being modified. At last all variations of wordpress.com, www.wordpress.org, etc. matched the .wordpress. mask and correctly resolved to 192.0.2.3. At last an undefined slashdot.org query was simply proxied with a real response.
You can specify section headers for all other supported DNS record types including the ones not explicitly exposed on the command line: [A], [AAAA], [MX], [NS], [CNAME], [PTR], [NAPTR] and [SOA]. For example, let's define a new [PTR] section in the 'dnschef.ini' file:
[PTR]
*.2.0.192.in-addr.arpa=fake.com
Let's observe DNSChef's behavior with this new record type:
 ./dnschef.py --file dnschef.ini -q
[sudo] password for iphelix:
[*] DNSChef started on interface: 127.0.0.1
[*] Using the following nameservers: 8.8.8.8
[+] Cooking PTR replies for domain *.2.0.192.in-addr.arpa with 'fake.com'
[00:11:34] 127.0.0.1: cooking the response of type 'PTR' for 1.2.0.192.in-addr.arpa to fake.com
And here is what a client might see when performing reverse DNS queries:
$ host 192.0.2.1 localhost
1.2.0.192.in-addr.arpa domain name pointer fake.com.
Some records require exact formatting. Good examples are SOA, NAPTR, and SRV records:
[SOA]
*.thesprawl.org=ns.fake.com. hostmaster.fake.com. 1 10800 3600 604800 3600

[NAPTR]
*.thesprawl.org=100 10 U E2U+sip !^.*$!sip:customer-service@fake.com! .

[SRV]
; FORMAT: priority weight port target
*.*.thesprawl.org=0 5 5060 sipserver.fake.com

Advanced Filtering

You can mix and match input from a file and command line. For example the following command uses both --file and --fakedomains parameters:
# ./dnschef.py --file dnschef.ini --fakeip 6.6.6.6 --fakedomains=thesprawl.org,slashdot.org -q
[*] DNSChef started on interface: 127.0.0.1
[*] Using the following nameservers: 8.8.8.8
[+] Cooking A replies for domain *.google.com with '192.0.2.1'
[+] Cooking A replies for domain thesprawl.org with '192.0.2.2'
[+] Cooking A replies for domain *.wordpress.* with '192.0.2.3'
[*] Cooking A replies to point to 6.6.6.6 matching: *.wordpress.*, *.google.com, thesprawl.org
[*] Cooking A replies to point to 6.6.6.6 matching: slashdot.org, *.wordpress.*, *.google.com, thesprawl.org
[00:49:05] 127.0.0.1: cooking the response of type 'A' for google.com to 192.0.2.1
[00:49:15] 127.0.0.1: cooking the response of type 'A' for slashdot.org to 6.6.6.6
[00:49:31] 127.0.0.1: cooking the response of type 'A' for thesprawl.org to 6.6.6.6
[00:50:08] 127.0.0.1: proxying the response of type 'A' for tor.com
Notice the definition for thesprawl.org in the command line parameter took precedence over dnschef.ini. This could be useful if you want to override values in the configuration file. slashdot.org still resolves to the fake IP address because it was specified in the --fakedomains parameter. tor.com request is simply proxied since it was not specified in either command line or the configuration file. See sample dnschef.ini file for additional examples.

Logging

DNSChef is capable of storing activity log in an external file using the --logfile log1.txt command line parameter. Below is a snippet of a sample DNSChef session:
[05/Nov/2014:22:00:49 -0800] DNSChef is active.
[05/Nov/2014:22:01:07 -0800] 127.0.0.1: cooking the response of type 'A' for thesprawl.org to 192.0.2.1
[05/Nov/2014:22:07:24 -0800] DNSChef is shutting down.

Other Configurations

For security reasons, DNSChef listens on a local 127.0.0.1 (or ::1 for IPv6) interface by default. You can make DNSChef listen on another interface using the --interface parameter:
# ./dnschef.py --interface 0.0.0.0 -q
[*] DNSChef started on interface: 0.0.0.0
[*] Using the following nameservers: 8.8.8.8
[*] No parameters were specified. Running in full proxy mode
[00:50:53] 192.0.2.105: proxying the response of type 'A' for thesprawl.org
or for IPv6:
# ./dnschef.py -6 --interface :: -q
[*] Using IPv6 mode.
[*] DNSChef started on interface: ::
[*] Using the following nameservers: 2001:4860:4860::8888
[*] No parameters were specified. Running in full proxy mode
[00:57:46] 2001:db8::105: proxying the response of type 'A' for thesprawl.org
By default, DNSChef uses Google's public DNS server to make proxy requests. However, you can define a custom list of nameservers using the --nameservers parameter:
# ./dnschef.py --nameservers 4.2.2.1,4.2.2.2 -q
[*] DNSChef started on interface: 127.0.0.1
[*] Using the following nameservers: 4.2.2.1, 4.2.2.2
[*] No parameters were specified. Running in full proxy mode
[00:55:08] 127.0.0.1: proxying the response of type 'A' for thesprawl.org
It is possible to specify non-standard nameserver port using IP#PORT notation:
# ./dnschef.py --nameservers 192.0.2.2#5353 -q
[*] DNSChef started on interface: 127.0.0.1
[*] Using the following nameservers: 192.0.2.2#5353
[*] No parameters were specified. Running in full proxy mode
[02:03:12] 127.0.0.1: proxying the response of type 'A' for thesprawl.org
By default, DNSChef will connect to remote nameservers using UDP protocol. This behavior can be controlled more precisely using IP#PORT#PROTOCOL notation to use TCP protocol instead:
# ./dnschef.py --nameservers 4.2.2.2#53#tcp -q
[*] DNSChef started on interface: 127.0.0.1
[*] Using the following nameservers: 4.2.2.2#53#tcp
[*] No parameters were specified. Running in full proxy mode
[22:08:48] 127.0.0.1: proxying the response of type 'A' for thesprawl.org
At the same time it is possible to start DNSChef itself on an alternative port using the -p port# parameter:
# ./dnschef.py -p 5353 -q
[*] Listening on an alternative port 5353
[*] DNSChef started on interface: 127.0.0.1
[*] Using the following nameservers: 8.8.8.8
[*] No parameters were specified. Running in full proxy mode
DNS protocol can be used over UDP (default) or TCP. DNSChef implements a TCP mode which can be activated with the --tcp flag:
# ./dnschef.py --tcp -q
[*] DNSChef started on interface: 127.0.0.1
[*] Using the following nameservers: 8.8.8.8
[*] No parameters were specified. Running in full proxy mode
[*] DNSChef is running in TCP mode

Internal Architecture

Here is some information on the internals in case you need to adapt the tool for your needs. DNSChef is built on top of the SocketServer module and uses threading to help process multiple requests simultaneously. The tool is designed to listen on TCP or UDP ports (default is port 53) for incoming requests and forward those requests when necessary to a real DNS server over UDP.
The excellent dnslib library is used to dissect and reassemble DNS packets. It is particularly useful when generating response packets based on queries. IPy is used for IPv6 addresses manipulation. Both libraries come bundled with DNSChef to ease installation.
DNSChef is capable of modifing queries for records of type "A", "AAAA", "MX", "CNAME", "NS", "TXT", "PTR", "NAPTR", "SOA", "SRV", "DNSKEY", "RRSIG", "ANY". It is very easy to expand or modify behavior for any record. Simply add another if qtype == "RECORD TYPE" entry and tell it what to reply with.
Enjoy the tool and forward all requests and comments to iphelix [at] thesprawl.org.
Happy proxying!

mac上,安装perl包的工具-Perlbrew

$
0
0

Perlbrew

perlbrew is an admin-free perl installation management tool. The latest version is 0.86, read the release note: Release 0.86.

Install, quickly

Copy & Paste this line into your terminal:
\curl -L https://install.perlbrew.pl | bash
Or, if your system does not have curl but something else:
# Linux
\wget -O - https://install.perlbrew.pl | bash

# FreeBSD
\fetch -o- https://install.perlbrew.pl | sh
If you prefer to install with cpan, there are two steps:
sudo cpan App::perlbrew
perlbrew init
If it is installed with cpan, the perlbrew executable should be installed as /usr/bin/perlbrew or /usr/local/bin/perlbrew. For all users who want to use perlbrew, a prior perlbrew init needs to be executed.
The default perlbrew root directory is ~/perl5/perlbrew, which can be changed by setting PERLBREW_ROOTenvironment variable before the installation and initialization. For more advanced installation process, please read the perlbrew document.

Install, other ways

If you use Sparrow there is sparrow plugin named perlbrew to install perlbrew. It's poorly tested but proved to be working for Ubuntu/Debian platforms.

What is perlbrew

perlbrew is a tool to manage multiple perl installations in your $HOME directory. They are completely isolated perl universes. This approach has many benefits:
  • No need to run sudo to install CPAN modules, any more.
  • Try the monthly released new perls.
  • Learn new language features.
  • Test your production code against different perl versions.
  • Leave vendor perl (the one that comes with OS) alone
    • Vendor perl usually serves its own purposes, and it might be a bad idea to mess it up too much.
    • Especially PITA when trying to upgrade system perl.
    • Some vendors introduced their own perl bugstwice!
  • Hacking perl internals.
  • Just to keep up with fashion.
While the default is good enough, you may customize it to install to alternative places, or even let multiple users share the whole perlbrew environment.

perlbrew is simple

To install the latest stable release, and use it permanently:
perlbrew install perl-5.16.0
perlbrew switch perl-5.16.0
To play with the bleeding-edge version, but only in the current shell:
perlbrew install perl-blead
perlbrew use perl-blead
Runs myprogram.pl against all installations of perl, especially helpful when running tests:
perlbrew exec perl myprogram.pl
For more descriptions about commands,
perlbrew help

Articles

DNSmanager

$
0
0
DNS zones manager. Configure your own dns zone in your browser, get a name on the Internet! 
This project is about managing DNS zones with a simple website, providing a name to anyone on the Internet. It is bound to the netlib.re project. This service let you manage your dynamic IP address with your domain so you don't need DynDNS anymore, and it's all libre software !
The association managing the infrastructure behind this service is Alsace Réseau Neutre, which is an ethical ISP based in Alsace, France. Don't be shy, go ask your questions !

Tools

TODO

  • zone delegation
  • REST API
  • captcha ?

Installation (base)

I suggest using perlbrew and cpanm for the installation, to not change your current environment. So install them then :
perlbrew install perl-5.18.0
perlbrew switch perl-5.18.0
perlbrew exec sh init/deploiement.sh all

Contribution (but only to the user interface)

If you want to contribute only on the application interface, you don't need to install and configure all the applications involved in the production release of dnsmanager. First, uncomment "isviewtest" on conf/config.yml then :
perlbrew install perl-5.18.0
perlbrew switch perl-5.18.0
perlbrew exec sh init/deploiement.sh installdep
perlbrew exec sh init/deploiement.sh perlmodules
Finally, to run the application with fake views :
perlbrew exec plackup --port 3000 bin/app.psgi

DNSmanager (fr)

Ce projet est un programme de gestion de zones DNS à partir d'un site web simple, permettant à chacun d'avoir un nom sur Internet. Il est lié au service en ligne netlib.re. Ce service en ligne peut remplacer avantageusement DynDNS puisqu'il est basé sur du code libre, et une association s'occupe de son maintien (Alsace Réseau Neutre, éthique++).
De manière factuelle :
  • des utilisateurs peuvent s'enregistrer puis
    • ajouter, supprimer, modifier des zones DNS
    • mettre à jour un enregistrement A ou AAAA automatiquement via un script
  • des administrateurs sont là pour
    • supprimer des zones, des utilisateurs
    • vous aider sur IRC (#arn sur irc.geeknode.org) ! \o/

installation (base)

L'installation de l'application se fait de préférence via perlbrew et cpanm ce qui permet d'installer les bibliothèques sans toucher à votre installation de Perl. Installez ces programmes puis faites :
perlbrew install perl-5.18.0
perlbrew switch perl-5.18.0
perlbrew exec sh init/deploiement.sh all

Contribuer (uniquement à l'interface)

Si vous souhaitez contribuer à l'interface, il suffit de décommenter la ligne indiquant "isviewtest" dans le fichier de configuration conf/config.yml. À partir de là, vous pouvez installer l'application comme ceci :
perlbrew install perl-5.18.0
perlbrew switch perl-5.18.0
perlbrew exec sh init/deploiement.sh installdep
perlbrew exec sh init/deploiement.sh perlmodules
Puis pour faire vos tests :
perlbrew exec plackup --port 3000 bin/app.psgi
from https://github.com/KaneRoot/dnsmanager

dns解析服务器程序:fun-dns

$
0
0
DNS server built based on Nodejs,

How install
Run $ sudo setup.sh
OR
$ wget -O /tmp/fun_dns.tar.gz https://github.com/downloads/badlee/fun-dns/fun_dns.v0.1.12.tar.gz
$ sudo -s
$ mkdir /opt/fun_dns
$ cd /opt/fun_dns
$ tar xvf /tmp/fun_dns.tar.gz
$ ln -s /opt/fun_dns/fun_dns.daemon /etc/init.d/fun_dns
$ update-rc.d fun_dns defaults
$ #Start service
$ service fun_dns start

How define hostname
edit 'config/conf.json',
the syntaxe of this file respect json format
{
"hostname1" : {
[property...]
},
"hostname2" : {
[property...]
},
"hostname3" : {
[property...]
},
[...]
"hostnameN" : {
[property...]
}
}
properties of a hostname
"name" : {
"ip" : "127.0.0.1",
"description" : "je suis le serveur web local",
"autority" : "dns.{name},admin@{name}",
"mail" : {
"ip" : "127.0.0.2",
"name" : "mail.{name}",
"priority" : 10
},
"nameserver" : [{
"ip" : "127.0.0.1",
"name" : "ns1.{name}"
}]
}
The hostname can have a short regex like syntaxe.
* : this expression respect ".*" in regex;
%w : this expression respect "[a-zA-Z0-9_]+" in regex;
%h : this expression respect "[a-fA-F0-9]+" in regex;
%d : this expression respect "[0-9]+" in regex;

sample conf.json :
{
"server.web" : {
"ip" : "192.168.1.3",
"nameserver" : [{
"name" : "dns3.local.web"
},{
"ip" : "192.168.1.2",
"name" : "dns2.local.web"
},{
"ip" : "192.168.1.1",
"name" : "dns.local.web"
}]
},
"!*.lo" : {
"ip" : "127.0.0.1",
"autority" : "dns.{name},admin@{name}",

"nameserver" : [{
"ip" : "127.0.0.1",
"name" : "dns.{name}"
},{
"ip" : "127.0.0.1",
"name" : "dns2.{name}"
}]

}
}

Server confiurations(config/serv.ini)
conf = configuration hostname file(if not defined is set to app://config/conf.json)
host = your ip4 addresse to listen(if not defined listen all)
port = port to listen(if not defined listen 53)
Section nameserver = list of dns server used to found response when no response found on server(as a proxy, but it's eprouve the global performances)
[nameserver]
nameOfTheDnsServer1 = Ip_Address
nameOfTheDnsServer2 = Ip_Address
...
nameOfTheDnsServer3 = Ip_Address
Section ttl = list of ttl in dns reponse (in secondes)
[ttl]
ip = ttl for any ip (A or AAAA) address (if not defined 77)
ttl = ttl for any field different of ip (A or AAAA) (if not defined 600)
refresh = time to refresh the zone (if not defined 1800)
retry = time to retry when refresh (above) has expired (if not defined 900)
expiration = ttl for DNS response (if not defined 604800)

sample serv.ini:
conf = app://config/lab.json
port = 53
host = 192.168.1.1
spf = "v=spf1 +all"
[ttl]
ttl = 600
ip = 77
[nameserver]
google.dns.a = 8.8.8.8
google.dns.b = 8.8.4.4



Command line option
Usage:
fun_dns [options]
Options:
--- -p|--port
port to listen.
--- -h|--host
host to bind.
--- -c|--conf
configuration file(hostname).
--- -s|--servConf
configuration file(server).
--- -v|--version
Get the version of fun_dns
--- -z|--zone
Lookup a zoneWalk
--- -l|--log
path to log file

from https://github.com/badlee/fun-dns
(https://github.com/badlee/fun-dns/issues/3)

明镜焦点周刊 中共党内不再信任习近平?香港问题/贸易战令习焦头烂额

dank-selfhosted

$
0
0
Automated solution for hosting email, web, DNS, XMPP, and ZNC on OpenBSD. 

Hi! This is my ansible playbook for self-hosting your own email, web hosting, XMPP chat, Matrix Homeserver, Tiny Tiny RSS, Git repos, and and DNS records using OpenBSD. I use it to host everything on c0ffee.net, but you can easily adapt it for your own domain by setting a few variables in vars.yml.
NEW: Read the changelog before running this playbook after updates! There are often breaking changes!!

TLDR

  1. Configure a secondary DNS provider and set them as your nameservers at your registrar. Set up reverse DNS for your server.
  2. ./scripts/bootstrap_openbsd.sh
  3. cp vars-sample.yml vars.yml && vi vars.yml
  4. ansible-playbook site.yml
  5. ./scripts/ds_records.sh YOURDOMAIN and set DS records at your registrar for DNSSEC.
  6. Create your user account with dankctl useradd.

Assumptions

  • You have a public-facing server (probably a VPS) running OpenBSD, with an IPv4 and IPv6 address. I recommend Vultr.
  • You have your own domain name, and a registrar that supports DNSSEC. I recommend Namecheap.
  • You have a secondary DNS provider that supports DNSSEC. I recommend DNS Made Easy. (Why do I need this?)
  • You're crazy enough to run your own mail server :-)

Goals

  • A small and secure OpenBSD platform to host email, DNS, XMPP chat, Matrix, TTRSS, Git, and some web sites.
    • Scale: you and your family members, and maybe a few technically oriented friends.
    • Really not suited for the general public, no automated password reset, no web GUIs...
  • Use as much of the OpenBSD base system as possible:
  • Of course, some packages from the ports tree will be necessary:
  • And some third-party projects not currently in packages:
  • Encryption Everywhere:
    • Automated DNSSEC with nsd and cron tasks using ldns-signzone for daily zone re-signing and slave NOTIFYs
    • TLS for all public-facing services using LetsEncrypt certificates with automated renewal and daemon reload hooks
    • Automatic publishing of SSHFP records for authoritative SSH fingerprints
    • Automatic publishing of TLSA records for DANE email encryption
    • Automatic publishing of DKIM records for outgoing email verification
  • Keep it Simple
    • Unopinionated baseline for what most people want from a personal domain
    • Keep dependencies to a minimum and stick to UNIX conventions
    • Automate the tedious stuff, so you can focus on hacking!

Usage

  1. Boot up your OpenBSD server.
  2. Create a user account for provisioning the system. Make sure to add the account to the wheel group. Don't use your preferred username for this account - save that for your LDAP username.
  3. Run scripts/bootstrap_openbsd.sh as root to add a package repo URL and set up doas for your user (required for Ansible).
  4. Configure your secondary DNS provider to accept NOTIFYs and perform zone transfers from your server's IP address.
  5. cp vars-sample.yml vars.yml and edit the configuration to your liking.
  6. Run the playbook! ansible-playbook site.yml
  7. Ensure you have reverse DNS in place for your server's IP address. This is a critical step to avoid your outgoing mail being flagged as spam. At Vultr, this is configured under "Settings > IPv4". You should set one for your primary IPv6 address as well.
  8. The last step is to configure DS records for DNSSEC at your domain registrar. Run scripts/ds_records.sh YOURDOMAIN to generate the records. At Namecheap, this is configured under "Advanced DNS > DNSSEC" in the web portal.
  9. Create your "real" user account in LDAP via dankctl useradd your_username -c "Your Name" -G ssh,sudo -r admin -k "your ssh key"
  10. Yell at me via email, xmpp, or matrix when you inevitably find bugs in my code.

Operational Notes

  • Login info: the credentials for SMTP (STARTTLS, port 587) and IMAP (SSL, port 993) are simply your username (without the @domain.com portion) and login password. XMPP uses the username@domain.com syntax for logins, but the password is the same. Mail is stored under ~/Maildir in each user's home directory for easy access using local clients like mutt.
  • Email Filtering: any sieve script located at ~/.dovecot.sieve will automatically apply filters to your incoming mail. You can compile the sieve script and check for syntax errors using sievec ~/.dovecot.sieve. For example, to filter all your cron emails into a folder called Logs:
require ["regex", "fileinto", "imap4flags", "mailbox", "envelope", "variables"];

if allof ( address :is "from""root@hostname.example.com",
anyof ( header :contains "subject""cron",
header :contains "subject""output" )) {
fileinto :create "Logs";
stop;
}
  • XMPP Chat: the XMPP server, Prosody, is really slick. As configured here, it supports HTTP file upload for image sharing, delivery to multiple devices via carbons, push notifications, group chats, message history, and basically everything you'd expect from a modern chat solution. XMPP isn't all that bad! The best clients are ChatSecure for iOS, Conversations for Android, and Gajim for *nix and Windows. No decent clients for OS X, sadly. All those clients support end-to-end crypto via OMEMO. Easily federate with others on separate XMPP servers for truly decentralized, open communication!
  • Account Maintenance: to add, remove, and modify accounts and groups, use the dankctl command. It's help output should be quite self-explanatory.
  • IPv6: spamd does not currently support IPv6, so don't go adding a AAAA record for mail in the zonefile!
  • Monitoring spamd: just run spamdb to see a list of senders currently greylisted/whitelisted.
  • Virtual Hosts: a default vhost will be created for www.domain.com, with a bare domain redirect. Shove HTML files into /var/www/htdocs/www.domain.com to start sharing your worthless opinions with the internet! To add more vhosts, just put a configuration file in /etc/sites and include it in /etc/httpd.d/sites.conf.
  • Greylisting pitfalls: spamd works by greylisting. Unfortunately, big mailers like GMail often don't retry delivery from the same address, resulting in a greylist black hole described here. To alleviate this, I included a daily cron job that whitelists the IP addresses found in the SPF records for some of the big mailers like GMail and Yahoo. If you notice any other problematic domains, override the to the bigmailers list defined in roles/spamd/deaults/main.yml to have their IP ranges whitelisted. (And be sure to send me a pull request!)
  • Password Resets: Passwords can be reset using dankctl resetpass. Currently, only an administrator can do this, since giving users write access to their LDAP user entry could allow them to write a non-hashed password into their userPassword field. It's on my todo list to make some kind of web interface for this.
  • SSH: SSH keys are stored in LDAP and can be added/removed using dankctl usermod. If a user has a shell on the box, he can run this command with his own credentials. Users must be in the ssh group to connect.
  • Backups: another thing I'm leaving up to you, since your requirements will almost certainly be unique. Shouldn't be too difficult:
    • Maildirs: tar them up, maybe encrypt them, and scp them offsite periodically.
    • User accounts: back up /etc/{passwd,master.passwd,group}
    • Backup MX records: I don't bother with a backup MX. They are a massive target for spammers, and legit mail servers will keep retrying delivery for multiple days if your primary MX goes down.
    • Prosody: periodically tar up the HTTP upload dir and do a pg_dump to save user info and message archives.
    • Keys: tar up your DNSSEC keys (/var/nsd/keys) and DKIM keys (/etc/mail/dkim)
    • LDAP: you can either tar up /var/db/ldap or save the output of ldap search as the root DN.
    • Assuming you copy all these items back to their original locations, the playbook won't generate new keys if they already exist.

Resources

dns-api-go

$
0
0
This is a golang port of the old perl-based DNS-API.org site.
  • Still allows the same lookups.
  • Still has rate-limiting.

Installation

There are two ways to install this project from source, which depend on the version of the go version you're using.
If you don't have a golang environment configured you should be able to download a binary release from the github project.

Source Installation go <= 1.11

If you're using go before 1.11 then the following command should fetch/update overseer, and install it upon your system:
 cd $GOPATH
go get -u -v github.com/skx/dns-api-go
dns-api-go -h

Source installation go >= 1.12

If you're using a more recent version of go (which is highly recommended), you need to clone to a directory which is not present upon your GOPATH:
git clone https://github.com/skx/dns-api-go
cd dns-api-go
go install

Rate Limiting

The server has support for rate-limiting, you can enable this by passing the address of a redis server to the binary:
$ dns-api-go  -redis-server localhost:6379
If this flag is not present then rate-limiting will be disabled. If a client makes too many requests they will be returned a HTTP 429 status-code. Each request made will return a series of headers prefixed with X-RateLimit to allow clients to see how many requests they have made, and have remaining.

Metrics

If you have a graphite-host you can point the environmental-variable METRICS at it. This will then receive metrics:
  • Counts of DNS-queries by type.
  • Count of success/failure responses.
  • System-metrics.

Docker deployment

If you've cloned this repository you'll notice there is an existing Dockerfile which can be used to build a container. Create your image like so:
skx@frodo ~/go/src/github.com/skx/dns-api-go $ docker build -t dns-api:latest .
Sending build context to Docker daemon 301.1kB
Step 1/10 : FROM alpine
latest: Pulling from library/alpine
..
..
Step 10/10 : ENTRYPOINT ["/root/dns-api-go", "-host","0.0.0.0" , "-port 3001" ]
..
Successfully built
Once you have your container you can launch it like so:
 $ docker run -d -p 9999:9999/tcp dns-api:latest
And test it via:
 $ curl http://localhost:9999/txt/steve.fi
Deploying with a redis image too, to allow rate-limiting, is left as an exercise.

Heroku deployment

Get into the cloned git repository ($GOPATH/src/github.com/skx/dns-api-go) and run:
$ heroku create
$ git push heroku master

Notes

Hacking

If you alter the template-files beneath data/ you will need to rebuild the static.go file before those changes will become visible. (i.e. They are pre-processed and included inline in our generated binary, rather than being read at run-time.)
You'll need to install the implant tool.
Now you can regenerate the static.go file using that:
 $ implant -input data/ -output static.go
And rebuild the main binary:
 $ go build .

Production Deployment

Surprisingly hosting this service publicly results in a ton of:
  • Bandwidth usage.
  • Support requests.
The former I tried to handle via cloudflare, but caching DNS data means the service doesn't run in a useful way, as you might expect.
To avoid further support-request and abuse complaints I'm taking the main service dns-api.org offline - unless people pay. The code here will always be open, and available for use though.
The current codebase will serve a "We're retired - unless you pay" message if the file /tmp/retired exists. This will be checked every 30 seconds or so.
API-key support will be added shortly, in #11.

Github Setup

This repository is configured to run tests upon every commit, and when pull-requests are created/updated. The testing is carried out via .github/run-tests.sh which is used by the github-action-tester action.
Releases are automated in a similar fashion via .github/build, and the github-action-publish-binaries action.

DNS Replay Tool ,drool

$
0
0
DNS Replay Tool 
Build Status
drool can replay DNS traffic from packet capture (PCAP) files and send it to a specified server, with options such as to manipulate the timing between packets, as well as loop packets infinitely or for a set number of iterations. This tool's goal is to be able to produce a high amount of UDP packets per second and TCP sessions per second on common hardware.
The purpose can be to simulate Distributed Denial of Service (DDoS) attacks on the DNS and measure normal DNS querying. For example, the tool could enable you to take a snapshot of a DDoS and be able to replay it later to test if new code or hardening techniques are useful, safe & effective. Another example is to be able to replay a packet stream for a bug that is sequence- and/or timing-related in order to validate the efficacy of subsequent bug fixes.

Known Issues

  • IP fragments are currently not processed and will be discarded.
  • TCP sessions are not reassembled, each packet is parsed as DNS after discarding the first two bytes.

Usage example

Send all DNS queries twice as fast as found in the PCAP file to localhost using UDP.
drool replay --timing multiply=0.5 --no-tcp file.pcap 127.0.0.1 53
Send all DNS queries over TCP to localhost as they were recorded.
drool replay --timing keep --no-udp file.pcap 127.0.0.1 53
Take all DNS queries found in the PCAP file and send them as fast as possible over UDP to localhost by ignoring both timings, replies and starting 3 threads that will simultaneously send queries.
drool replay --no-tcp --no-responses --threads --udp-threads 3 file.pcap 127.0.0.1 53

Dependencies

drool is built upon dnsjit and requires it to be installed along with autoconf/automake.

Build

sh autogen.sh
./configure
make
make test
make install

Author(s)

Jerry Lundström jerry@dns-oarc.net

鲁国女子的忧愁 令邻居嗤笑 令君子赞叹

$
0
0
鲁国有一个小城叫漆室邑,城邑中有一个女子,过了适婚的年纪还没有出嫁。当时鲁国第29代国君鲁穆公已经年迈,而太子还年幼。
有一天,这名漆室女子靠着一根柱子哀声长叹,旁人听了,没有一个不为之感伤。一位邻家妇人从她家门前路过,就问她:“为什么你这么悲哀?是不是想嫁人啊?我为你找个郎君吧。”
女子说道:“哎呀!我原以为你是个有见识的人,今天怎么这般没见识呢!我哪是因为自己嫁不出去而悲伤,我是忧愁鲁君老了,而太子还小啊!”
邻家妇人一听,不禁大笑起来,说:“这是鲁国士大夫应该忧愁的事,跟我们这些妇人有什么关系呢!”
女子说:“你说的不对。以前,从晋国来的客人住在我家,他把马拴在我家的菜园子里。不料马儿挣脱缰绳乱跑,践踏我家的菜园子,使我一年都吃不上葵菜(葵为百菜之主,备四时之馔,可防荒俭—《农书》)。”
“邻居家的女儿和别人私奔,他们拉着我的哥哥去追赶,不料连日阴雨河水暴涨,我哥哥失足淹死在河中,我从此失去了哥哥。(按照古礼,女子出嫁,双亲在,从双亲;父母过世,则从兄弟。漆室女子失去了哥哥,致使她到了婚配的年龄,也不能出嫁。)”
漆室女子由自己的处境,联想到国君,“我听说河水滋润九里,就有三百步湿润面积。如今鲁君老迈,可太子还很幼小,国中愚昧、虚伪的官员也会渐渐多起来”,她叹息道:“鲁国有忧患,君臣父子都会受到羞辱,祸患也会殃及无辜的百姓,妇人又怎么能幸免于难呢!所以我才忧伤不已。你怎么能说,这和我们妇人没有关系呢!”邻家妇人听了女子的这一番话,向她致歉说:“你现在考虑的事,不是我能比得了的。”
三年以后,鲁国果然大乱,齐、楚二国趁机攻打鲁国。鲁国连年遭到侵扰,男子到前方作战,妇人在后方负责供应物资和运输的事,没有哪个妇人有时间去做原本日常的工作,致使家事不修,女红不做,田里缺少人手耕种,整个鲁国呈现一片萧条的景象。
谁能像这名漆室女子一样,从国君和太子的年龄,就料想到鲁国将会面临的祸患呢!后世君子称赞漆室女子,说她的思虑长远。《诗经》上说:“知我者,谓我心忧,不知我者,谓我何求。”说的就是这个情况。
-----

这是一个典型的有远见者的例子

影响中国历史进程的45位奇女子

$
0
0
1、妺喜(“妺”读作mò),有施氏,又作妺嬉、末喜、末嬉。有施氏(即有施部落)的公主,是这个部落的第一美女,夏朝第十七位君主桀的王后。
有施部落为避免和夏发生战争,进献美女妺喜。夏桀为了讨好美女妺喜,筑瑶台、造倾宫、玉床、象廊。用玉石建造华贵的琼室,以此作为离宫,终日饮宴淫乐,不理政事,而且妺喜更以她的绝世美貌干预朝政。《帝王世纪》载:“日夜与妺喜及宫女饮酒,常置妺喜于膝上。妺喜好闻裂缯之声而笑,桀为发缯裂之,以顺适其意。”
据说,妺喜是后世红颜祸水的第一例证,此后在三代间又陆续出现了商代妲己、周代褒姒。因此,当越王勾践差范蠡把西施献给吴王夫差的时候,伍子胥进言:“臣闻:夏亡以妺喜,殷亡以妲己,周亡以褒姒。夫美女者,亡国之物也,王不可受。”
妺喜是中国有历史记载以来的第一个亡国的王后,她与妲己、褒姒、骊姬并称中国古代四大妖姬。
2、妲己(dájǐ),己姓,名妲,正确称呼为己妲。帝辛(商纣王)的王后
根据史籍记载,妲己是有苏氏(有苏部落)诸侯的女儿,在纣王征服有苏部落后,有苏氏把她嫁给了纣王为妃。妲己深得帝辛喜爱,被立为王后。《国语·晋语》云:“殷辛伐有苏,有苏氏以妲己女焉。”
纣王沉迷于妲己的美色,荒废朝政,对她言听计从,到了“妲己之所誉贵之,妲己之所憎诛之”的地步,酒池肉林、炮烙之刑、比干剖心等皆典出于斯。《吕氏春秋·先识》曰:“商王大乱,沉于酒德,妲己为政,赏罚无常。”
纣王残忍无道、天怒人怨,激起人民的反抗。周武王乘机发动诸侯伐纣,于牧野之战,一举灭商,纣王逃到鹿台自焚,妲己被押往刑场斩首示众。
3、褒姒(bāosì)姒姓,古褒国人。西周君主周幽王第二位王后。因褒人所献,姓姒,故称为褒姒。
据《史记》记载,褒姒是个冷美人,偶露出艳丽迷人的笑容。周幽王为了取悦讨好褒姒,举烽火召集诸侯于骊山前,诸侯匆忙赶至,却发觉没有外寇侵犯,只见周幽王和褒姒在台上饮酒作乐,只好狼狈地退走,褒姒终于开怀大笑,幽王也跟着傻笑起来
后来犬戎等入侵,周幽王举烽火示警,诸侯以为又是骗局而不愿前往,致使幽王被犬戎所弑;褒姒也被劫掳,下落不明。
4、骊姬(?-前651年),为春秋时代女性,骊戎国君之女,后被晋献公掳去,因姿色艳美,而成为宠姬,不久怀孕,骊姬生下一子,取名奚齐,同时作为陪嫁的骊姬之妹,也随骊姬来到晋国,为晋献公生下了卓子。
骊姬以美色获得晋献公专宠,但又与优施通奸,并合谋排挤申生,改立所生的儿子奚齐为太子,而害死齐姜所生的太子申生,使公子重耳、夷吾逃亡国外,是所谓骊姬之乱。司马迁在《史记》中说:“及破骊戎,获骊姬,爱之,竟以乱晋。”
5、西施:本名施夷光,越国美女,因为她居住在村西边,故称其为西施。春秋末期出生于浙江诸暨。天生丽质,是美的化身和代名词。“闭月羞花之貌,沉鱼落雁之容”中的“沉鱼”,讲的是西施浣纱的经典传说。西施与王昭君、貂蝉、杨玉环并称为中国古代四大美女,其中西施居首。
与西施有关的成语有:沉鱼落雁、东施效颦、西眉南脸、情人眼里出西施等。
《史记》、《春秋》、《左传》等均未载西施其人其事。先秦诸子有只言片语言及西施者,如《墨子》曰:“吴起之裂,其功也;西施之沈,其美也。”
6、赵姬(?―前228年),赵国邯郸人,秦庄襄王的王后,秦始皇的生母。赵姬原为吕不韦的姬妾,后成为秦庄襄王的王后,其子秦始皇即位为秦王,她成为王太后,秦始皇统一天下,追尊她为帝太后。赵姬一生经历四个阶段:吕不韦的情人;秦王子楚(异人)的夫人;嫪毐[lào ǎi]的性伴侣;秦始皇的生母兼人生导师。
7、虞姬:楚汉之争时期“西楚霸王”项羽的爱姬,在《史记·项羽本经》中有“有美人名虞”的记载。相传容颜倾城,才艺并重,舞姿美艳,有“虞美人”之称。
虞姬忠于爱情,为让项羽尽早逃生,拔剑自刎,成就了一个感人的霸王别姬。项羽《垓下歌》:“力拔山兮气盖世,时不利兮骓不逝,骓不逝兮可奈何,虞兮虞兮奈若何?”歌词苍凉悲壮,情思缱绻悱恻。
8、吕雉(前241年-前180年8月18日):是中国历史上有记载的第一位皇后和皇太后。同时吕雉也是中国实行皇帝制度以后,第一个临朝称制的女人,被司马迁列入记录皇帝政事的本纪,后来班固作汉书仍然沿用,她开创了汉代外戚专权的先河。吕雉是中国历史上第一位女性统治者,无皇帝之名而行皇帝之实,史上三大女性统治者(吕后,武则天,慈禧太后)之一。
吕雉为人有谋略而残忍,为刘邦翦除异姓诸侯的起了很大作用。吕后当政后,重用曹参,延续萧何的黄老政策,无为而治,与民休息。经济上轻赋税,重工商。为后来“文景之治”奠定坚实的基础。司马迁在《史记·吕后本纪》中对她的评价是“政不出户,天下晏然;刑罚罕用,罪人是希;民务稼穑,衣食滋殖。”给予吕后施政很大的肯定。
9、窦漪房(前205--前135年或前129年):是西汉时期的一代女政治家。汉文帝刘恒的皇后,汉景帝的母亲。其出身贫寒,后被选入宫中,吕后将一些宫女分给诸侯王时,窦氏被分给了代王(后来的汉文帝)。与代王育有一女二男,长子刘启即后来的汉景帝。出身贫寒的她备受命运垂青,由民女到宫女,最后成为辅佐文景武三位帝王治理大汉江山的杰出女性。
10、卓文君:和蔡文姬、上官婉儿、李清照并称中国四大才女。卓文君与汉代著名文人司马相如(约公元前179年—前118年)的一段爱情佳话至今还被人津津乐道。《西京杂记》描述卓文君:“眉色如望远山,脸际常若芙蓉,肌肤柔滑如脂”。
司马相如的文采,卓文君之美艳,当垆卖酒,白头兴怨;长门灵赋,封禅遗书传为千古佳话。卓文君所作《诀别书》:“春华竞芳,五色凌素,琴尚在御,而新声代故!锦水有鸳,汉宫有水,彼物而新,嗟世之人兮,瞀于淫而不悟!朱弦断,明镜缺,朝露晞,芳时歇,白头吟,伤离别,努力加餐勿念妾,锦水汤汤,与君长诀!”使得欲纳新欢的司马相如大为不忍,想到了当年的患难相随,将卓文君接到自己身边。
11、卫子夫(?-前91年):汉武帝刘彻的第二任皇后,大将军卫青的姐姐,骠骑将军霍去病是她的外甥。司马迁《史记·外戚世家》载:“卫皇后字子夫,生微矣。盖其家号曰卫氏,子夫为平阳主讴者。”卫子夫生有一男三女,即戾太子刘据,卫长、诸邑、石邑三位公主。
卫子夫建元二年入宫,第二年怀孕后被封为夫人。元朔元年卫子夫生下刘据,被立为皇后。在她被立为皇后的第38年,即征和二年(前91年)的巫蛊之祸中,卫子夫母子等人遭江充等人陷害,不能自明而自杀。十八年后她的曾孙汉宣帝刘询以皇后礼重新厚葬她,追谥号为思,史称孝武卫思后或卫思皇后。
12、王昭君:中国古代四大美女之“落雁”,汉元帝时期的宫女,匈奴呼韩邪单于阏氏。昭君出塞的故事千古流传。
汉元帝(前49年-前33年在位)时,南北交兵,边境不宁。元帝遂令昭君和番以息战事,《汉书·元帝纪》记载:“元帝以后宫良家子王墙字昭君赐单于”。一日,她登程北去。一路上心绪难平,抚琴叹息。这时,天空的大雁听到琴声,看到马上的王昭君,忘记摆动翅膀,跌落地下。从此,昭君就得来“落雁”的美称。
13、班婕妤(前48年--2年),是中国文学史上以辞赋见长的女作家之一。名不详,汉成帝妃子,善诗赋,有美德。《汉书·外戚传》记载:“孝成班婕妤,帝初即位选入后宫。始为少使,蛾而大幸,为婕妤。”她也是班固、班超和班昭的祖姑。她的作品很多,但大部分已佚失。现存作品仅三篇,即《自伤赋》、《捣素赋》和一首五言诗《怨歌行》。
14、赵飞燕(前45年--前1年),其原名未被正史记载,是西汉成帝的皇后,汉哀帝时的皇太后。赵飞燕是中国历史上的一位传奇人物和神话般的美女。正史上对她的记载很少,班固在《汉书》中说:“飞燕之妖,祸成厥妹。”然而关于她的野史逸书却又很多,赵飞燕与妹妹赵合德的故事是一个不断流传并逐渐丰富发展的过程,尤以《西京杂记》、《飞燕外传》最为影响深远。
在中国民间和历史上,她以美貌著称,所谓“环肥燕瘦”讲的便是她和杨玉环,而燕瘦也通常用以比喻体态轻盈瘦弱的美女。同时她也因美貌而成为淫惑皇帝的一个代表性人物。
15、邓绥(81年-121年),东汉著名的女政治家,东汉皇朝第四代皇帝汉和帝的皇后。
东汉延平元年(106年),年仅27岁的汉和帝突然驾崩,面对着“主幼国危”的局面,25岁的邓绥临朝称制。邓绥执政期间,对内帮助朝廷度过了“水旱十年”的艰难局面,对外则坚决派兵镇压了西羌之乱,使得危机四伏的东汉皇朝转危为安,被誉为“兴灭国,继绝世”。《后汉书·皇后纪》评价邓太后的作为:“莫不叹服,以为圣明。”
16、貂蝉:中国古代四大美女之“闭月”。也是其中唯一一位无史料记载仅存在于小说戏剧中的美女,曾登场于小说《三国演义》。
三国时王允的歌姬貂婵在后庭拜月,忽然轻风拂面,浮云遮月。这场景正好王允看见,逢人就说,我的女儿和月亮比美,月亮比不过,赶紧躲在云里。因此,貂婵也就被人们称为“闭月”了。
17、蔡琰(约177年-约249年),名琰,原字昭姬,晋时因避司马昭之讳,改字文姬。东汉大文学家蔡邕的女儿,也是中国历史上著名的文学家,四大才女之一。精于天文数理,博学能文,又善诗赋,兼长辩才与音律,《三字经》中有提到蔡琰:“蔡文姬,能辨琴”。代表作有《胡笳十八拍》、《悲愤诗》等。
蔡琰初嫁于名门之子卫仲道,后来丈夫过世回归娘家。董卓乱京时,蔡琰流落至匈奴,嫁南匈奴左贤王刘豹为妾室,后诞下二子。
十二年后,曹操遣使以重金将蔡琰赎回,并安排其再嫁同乡陈留董祀,“文姬归汉”亦成为中国有名的故事。
18、甄洛,即文昭甄皇后。文昭甄皇后(183年-221年),名不明,又称甄夫人,是中国历史上极贤的美女之一,懂诗文,貌艳丽。本为袁熙之妻,曹操攻陷邺城后成为曹丕的正室,魏明帝曹叡之生母。
甄氏一生三从四德,谨守妇道。早先侍袁熙为夫时,献计于袁;而后为曹丕所纳,依旧尽其心力侍奉曹丕,无奈为奸人所害,以致凄惨冤死。曹叡即位后追尊甄氏为文昭皇后。
19、谢道韫,东晋时女诗人,是宰相谢安的侄女,也是著名书法家王羲之的儿子王凝之的妻子。
《世说新语》记载:谢安在一个雪天和子侄们讨论可用何物比喻飞雪。谢安的侄子谢朗说道“撒盐空中差可拟”,谢道韫则说:“未若柳絮因风起”,因其比喻精妙而受到众人的称赞。也因为这个著名的故事,她与汉代的班昭、蔡琰等人成为中国古代才女的代表人物。而“咏絮之才”也成为后来人称许有文才的女性的常用的词语,《三字经》里说“蔡文姬,能辨琴。谢道韫,能咏吟。”
20、羊献容(?-322年),晋惠帝司马衷第二任皇后,也是前赵末帝刘曜的皇后。八王之乱中,羊献容几经废立。晋怀帝即位,尊后为惠帝皇后。洛阳败,没于刘曜。刘曜僭位,立献容为皇后。刘曜非常爱宠她,献容为刘曜生三子而死,谥号献文皇后。羊献容是中国历史上岗次数最多的皇后,先后被五废六立。
21、苏惠(357年-?),字若兰,十六国时的才女。若兰容貌秀丽,举止娴雅。她丈夫窦滔奉命出镇襄阳,携妾同往,苏蕙独守长安空闺中,她便用吟诗作文来排遣孤寂的时光。她将所写诗词编排整理暗藏在29行、29列的文字里,织在八寸锦缎上,名为“璇玑图”。
苏蕙派人把璇玑图送交窦滔。窦滔捧着璇玑图,细细体味,完全读懂了她的意思,派人到长安接来了苏蕙。武则天曾为《璇玑图》作序:“名蕙,字若兰。智识精明,仪客秀丽;谦默自守,不求显扬。”
22、独孤皇后,即独孤伽罗(544年—602年),隋文帝献皇后。十四岁嫁给大将军杨忠的嫡长子杨坚。周隋交替之际,力劝杨坚定下立隋大计;隋朝开国后被立为皇后。独孤皇后深度参与朝政,终身对隋文帝保持了强烈的影响力,于开皇之治功不可没,宫中并尊帝后为“二圣”。她生性妒忌,不许皇帝设三宫六院,是一夫一妻制的最早倡导者。一生共诞育有十个儿女。次子即隋炀帝杨广。
23、萧皇后(567年-647年)即隋炀帝愍皇后萧氏,父西梁孝明帝萧岿。史书记载,萧氏温婉端庄、聪慧好学、知书达礼,深得文帝与独孤皇后之宠,与丈夫杨广之间也相当和谐,并为丈夫夺嫡立下汗马功劳。后来,杨广登基为帝,萧氏以正室身分被封为皇后,这时杨广三十八岁,萧皇后约四十一岁。隋炀帝即位后,多有失德,萧皇后婉谏无果。而杨广妃嫔众多,但对于皇后萧氏一直相当宠敬。隋亡,杨广被杀,皇后为宇文化及所掳。后为窦建德迎回,又辗转流落东突厥。唐太宗大破突厥,迎回萧氏,回京后的萧皇后得到了唐太宗的礼遇。十八年后,萧氏薨,以皇后礼合葬于杨广之陵。
24、长孙皇后(601年--636年)即文德皇后,唐太宗李世民皇后长孙氏,她的名字史书上没有记载。隋朝右骁卫将军长孙晟之女,13岁嫁李世民。武德元年册封秦王妃。武德末年竭力争取李渊后宫对李世民的支持,玄武门之变当天亲自勉慰诸将士。之后拜太子妃。李世民即位13天即册封为皇后。《资治通鉴》记载:“长孙皇后性仁孝俭素,好读书,常与上从容商略古事,因而献替,裨益弘多。”长孙皇后先后为太宗诞下三子四女。幼子即唐高宗李治。
25、武则天(624年-705年):武氏,通称武则天或武后,在作为唐中宗、唐睿宗的皇太后临朝称制期间,改名为“武曌”。是中国历史上唯一掌握君权而因此得到普遍承认的女皇帝,也是即位年龄最大(67岁即位)、寿命最长的皇帝之一(终年82岁)。
唐太宗时纳入宫中为五品才人;高宗时初为昭仪,后为皇后。再后自立为皇帝,定洛阳为都,改称神都,建立武周王朝。唐中宗复辟,恢复唐朝,为其上尊号“则天大圣皇帝”。后遵武氏遗命改称“则天大圣皇后”,以皇后身份入葬乾陵。
26、上官婉儿(664年--710年)唐代女官、诗人、皇妃,有“巾帼宰相”之名,中国古代四大才女之一。唐中宗时,封为昭容,在政坛、文坛都有着显要地位。以皇妃的身份掌管内廷与外朝的政令文告,执掌朝纲,权势日盛。期间大设修文馆学士,代朝廷品评天下诗文,一时词臣多集其门。《全唐诗》收其遗诗32首。710年,临淄王李隆基(即玄宗皇帝)起兵发动唐隆政变,与韦后同时被杀。正史多抨击其淫乱和操控朝纲,《新唐书·卷七十六·列传第一·上官昭容》:“婉儿与近嬖至皆营外宅,邪人秽夫争候门下,肆狎昵,因以求剧职要官。”
上官婉儿的诗《奉和圣制立春日侍宴内殿出剪彩花应制》:
密叶因裁吐,新花逐剪舒。
攀条虽不谬,摘蕊讵知虚!
春至由来发,秋还未肯疏。
借问桃将李,相乱欲何如?
27、杨玉环(公元719年-公元756年):号太真。其姿质丰艳,善歌舞,通音律,为唐代宫廷音乐家、舞蹈家,其音乐才华在历代后妃中鲜见,是中国古代四大美女之“羞花”。
杨玉环为隋朝宗室后裔,她先为唐玄宗儿子寿王李瑁王妃,有人进言杨氏“姿质天挺,宜充掖廷”,于是公爹唐玄宗将杨氏召入后宫,册封为贵妃。杨玉环自入宫以后,以自已的妩媚温顺及过人的音乐才华,受到玄宗的百般宠爱,天宝十五载(756年),安禄山发动叛乱,随李隆基流亡蜀中,途经马嵬驿,杨氏于六月十四日,在马嵬驿被赐死于乱军之中,香消玉殒。白居易的《长恨歌》中说:“六军不发无奈何,宛转蛾眉马前死。”
28、李冶(?---784年),又名李季兰,女道士,是中唐诗坛上享受盛名的女冠诗人,与李冶、薛涛、刘采春并称唐代四大女诗人。晚年被召入宫中。公元784年,叛将朱泚自立为帝后,李季兰呈诗给朱泚,有密切的书信来往,事件平定后,唐德宗遂令扑杀之。李冶的诗以五言擅长,多酬赠谴怀之作,《唐诗纪事》卷七八有云:“刘长卿谓季兰为女中诗豪。”
29、薛涛(约768~832年),唐代女诗人,因父亲薛郧做官而来到蜀地,父亲死后薛涛居于成都。
居成都时,成都的最高地方军政长官剑南西川节度使前后更换十一届,大多与薛涛有诗文往来。韦皋任节度使时,拟奏请唐德宗授薛涛以秘书省校书郎官衔,但因格于旧例,未能实现,但人们却称之为“女校书”。曾居浣花溪(今有浣花溪公园)上,制作桃红色小笺写诗,后人仿制,称“薛涛笺”。世谓“南华经、相如赋、班固文、马迁史、薛涛笺、右军帖、少陵诗、达摩画、屈子离骚”,乃古今绝艺。成都望江楼公园有薛涛墓。
30、鱼玄机(约844年--约871年),晚唐诗人,长安(今陕西西安)人。初名鱼幼微,字蕙兰。《全唐诗》小传录生平为:“有才思。补阙李亿纳为妻。爱衰。遂从冠帔于咸宜观。后以笞杀女僮绿翘事。为京兆温璋所戮。今编诗一卷。”。鱼玄机性聪慧,有才思,好读书,尤工诗。与李冶、薛涛、刘采春并称唐代四大女诗人。终逝前名言诗句:“易求无价宝,难得有情郎。”千古传唱,广为世人所知。
31、花蕊夫人,五代十国时期女诗人,幼能文,尤长于宫词。后蜀皇帝孟昶的贵妃,赐号花蕊夫人。孟昶降宋后,花蕊夫人被虏入宋宫,为宋太祖所宠。其《述国亡诗》颇受人称道,是难得的才女。
《述亡国诗》云:“君王城上竖降旗,妾在深宫哪得知。十四万人齐解甲,更无一个是男儿。”此诗甚受宋太祖赵匡胤赏识。
32、萧绰(953年-1009年),即萧太后。原姓拔里氏,拔里氏被耶律阿保机赐姓萧氏,契丹族,辽朝著名的政治家、军事家和改革家,辽景宗耶律贤的皇后,在民间戏曲中被称为萧太后。她摄政期间,与宋订立“澶渊之盟”,宋朝此后每年需向辽朝缴纳白银十万两、帛二十万匹,辽朝由此进入了历史上最为鼎盛的辉煌时期。
33、刘娥(968年~1033年),是宋真宗(赵恒)章献明肃皇后。
刘娥一生传奇。她出身寒微,天生丽质,聪明伶俐。早嫁给银匠龚美,后入襄王府,与襄王赵恒(后来的真宗)年貌相当,很快相知相爱,如胶似漆。赵恒即位后经过很多的曲折,册立刘娥为皇后。54岁的宋真宗赵恒病逝以后,刘娥成为宋朝第一位摄政的太后,功绩赫赫,常与汉之吕后、唐之武后并称,史书称其“有吕武之才,无吕武之恶”。后还政仁宗,备受史家称颂。
刘娥是明朝以后流传下来“狸猫换太子”的故事中的主角,但这个故事并非史实,是明人的附会。
34、李清照(1084年~1155年),宋代女词人,中国历史上最著名的女词人。自号易安居士。婉约词派代表,有“千古第一才女”之称,为四大才女之首。
李清照出生于书香门第,高门世家。父亲李格非进士出身,官至礼部员外郎,是当时极有名气的作家。出嫁后与夫赵明诚共同致力于书画金石,生活安定优裕。金兵入据中原时,流寓南方,生活困顿。所作词,前期多写其悠闲生活,后期多悲叹身世,情调感伤。形式上善用白描手法,自辟途径,语言清丽。论词强调协律,崇尚典雅。同为宋代人的朱熹说:“本朝妇人能文者,惟魏夫人及李易安二人而已。”
李清照词欣赏:《如梦令·昨夜雨疏风骤》
“昨夜雨疏风骤。浓睡不消残酒。试问卷帘人,却道‘海棠依旧’。知否,知否?应是绿肥红瘦!”
35、李师师,北宋末年的名伎。事迹多见于野史,笔记小说。据传,李师师曾深受宋徽宗喜爱,并得到宋朝著名词人周邦彦的垂青,更传说曾与《水浒传》中的宋江有染,由此可见,其事迹颇具传奇色彩,也间接证明了李师师的才情容貌非常人能及。
李师师早年艳满京城,在仕子官宦中颇有声名,她与宋徽宗的故事也传为佳话,而宋徽宗被掳,北宋亡后李师师的下落也成为了千古之谜。
36、梁红玉(1102—1135),宋朝著名抗金女英雄,史书中不见其名,只称梁氏,红玉是其战死后野史和话本中所取的名字。首见于明朝张四维所著之《双烈记》:“奴家梁氏,小字红玉。父亡母在,占籍教坊,东京人也。”。后结识韩世忠,韩赎其为妾,原配白氏死后成为韩的正妻。建炎三年,在平定苗傅叛乱中立下殊勋,一夜奔驰数百里召韩世忠入卫平叛,因此被封为安国夫人。后多次随夫出征,在建炎四年长江阻击战中亲执桴鼓,和韩世忠共同指挥作战,将入侵的金军阻击在长江南岸达48天之久,从此名震天下。高宗深为抚慰,褒奖甚宠,为韩世忠加官进爵,并封梁红玉为“杨国夫人”。
37、唐琬,生卒年月不详,陆游(1125—1210)的表妹,陆游母舅唐诚女儿,自幼文静灵秀,才华横溢。她是陆游的第一任妻子,后因陆母偏见而被拆散。后人对唐婉的评价:唐琬的一滴清泪,缠绵悱恻了整个南宋文学史。尽管唐琬也留有一首谁读谁落泪的《钗头风》,但她得以流芳千古,完全是借助了爱情的力量,是个有缘无份的典型。
《钗头凤》唐琬:
世情薄,人情恶。雨送黄昏花易落。晓风干,泪痕残。欲笺心事,独语斜栏。难!难!难!
人成各,今非昨。病魂常似秋千索。角声寒,夜阑珊。怕人寻问,咽泪装欢。瞒!瞒!瞒!
《钗头凤》陆游:
红酥手,黄縢酒,满城春色宫墙柳。东风恶,欢情薄,一怀愁绪,几年离索。错!错!错!
春如旧,人空瘦,泪痕红浥鲛绡透。桃花落,闲池阁,山盟虽在,锦书难托。莫!莫!莫!
38、弘吉剌·孛儿帖(1161年-1236年),大蒙古国皇后,姓孛思忽儿弘吉剌氏,元太祖成吉思汗正妻。
成吉思汗有数十位妻妾,分居在四个斡儿朵,其中每个斡儿朵又有数个皇后与妃子,孛儿帖居于第一斡儿朵,并且排行第一,地位最高,她也最得成吉思汗敬重。她比成吉思汗长一岁,为人贤明,帮助成吉思汗创立大业。孛儿帖生有四个儿子,三子窝阔台是元朝的太宗皇帝。“孛儿帖”的蒙古语意是“苍白色”,代表圣洁之意。
39、马皇后(1332年-1382年),即孝慈高皇后(明太祖孝慈高皇后马氏),本名不详,滁阳王郭子兴的养女,太祖朱元璋的原配妻子。
随朱元璋征战数十年,夫妻共患难,感情深厚。位正中宫后,仍节俭严谨,限制外戚弄权。朱元璋嗜杀多疑,马皇后仁慈善良,常谏劝,挽救不少大臣的性命。马皇后去世后,宫人经常感怀,因此有歌谣传颂马皇后:“我后圣慈,化行家邦。抚我育我,怀德难忘。怀德难忘,于万斯年。毖彼下泉,悠悠苍天。”
40、柳如是,女诗人,秦淮八艳之首,本名杨爱,字如是,因读宋朝辛弃疾《贺新郎》中:“我见青山多妩媚,料青山见我应如是”,故自号“如是”,又称河东君。浙江嘉兴人,天生丽质,书画双绝。与马湘兰、卞玉京、李香君、董小宛、顾横波、寇白门、陈圆圆同称“秦淮八艳”,容貌为“秦淮八艳”之首。后嫁有“学贯天人”“当代文章伯”之称的明朝大才子钱谦益为侧室。
柳如是是活动于明清易代之际的著名歌伎才女,幼即聪慧好学,但由于家贫,从小就被掠卖到吴江为婢,在乱世风尘中往来于江浙与金陵之间。她留下了不少值得传颂的轶事佳话和颇有文采的诗稿《湖上草》、《戊寅草》与尺牍。其墓在江苏常熟虞山花园浜。
41、顾横波(1619年--1664年),秦淮八艳中,顾横波是地位最显赫的一位,受诰封为一品夫人。
她通晓文史,工于诗画,尤其善画兰花,十七岁时所绘《兰花图》扇面今藏于故宫博物院中。
42、陈圆圆,秦淮八艳之一。明末清初南曲名妓。陈圆圆初入南曲便被名士争相攀求,一时名气盖过温婉可人的董小宛,如皋公子冒辟疆访之,许以来年婚姻。岂料中途国舅田弘遇欲给皇帝寻求美女,闻得圆圆芳名掠夺而去。
其时战乱频仍,崇祯无心逸乐。陈圆圆进宫后被退回田府,田弘遇收陈圆圆为歌妓,后将她赠予吴三桂为妾,尽其拉拢之意。李自成攻破北京,手下刘宗敏掳走陈圆圆,吴三桂“冲冠一怒为红颜”遂引清军入关。据说陈圆圆跟吴三桂到了云南,后出家为尼,又一说自缢而死。
43、董小宛(1624年~1651年),歌伎,名隶南京教坊司乐籍。1639年,董小宛结识复社名士冒辟疆。明亡后小宛随冒家逃难,此后与冒辟疆同甘共苦直至去世。
野史传董小宛与顺治宠爱的董鄂妃为同一人,并导致顺治出家,并非史实,董小宛去世时顺治皇帝刚刚13岁。
44、孝庄文皇后(1613年-1688年),博尔济吉特氏,名布木布泰,蒙古科尔沁部贝勒寨桑之次女。天命十年(1625年)嫁给努尔哈赤第八子皇太极为侧福晋;崇德元年(1636年)皇太极在盛京称帝后,受封为永福宫庄妃;崇德三年生皇九子福临(顺治帝);崇德八年(1643年),顺治帝即位后,与其姑孝端文皇后两宫并尊,称圣母皇太后;康熙帝即位后尊为太皇太后。
孝庄文皇后是中国历史上有名的贤后,一生培养、辅佐顺治、康熙两代君主,是清初杰出的女政治家。
45、慈禧(1835年--1908年),即慈禧太后。名叶赫那拉·杏贞,满族,出身北京镶蓝旗世袭官宦之家,叶赫那拉·惠征之女,后抬入镶黄旗。慈禧为自1861年至1908年间清朝的实际统治者,统治期间发动政变两次,立皇储两次。掌权时间在清朝仅次于康熙与乾隆,是中国历史上三大女性统治者(吕后,武则天,慈禧太后)之一。
由于在其四十八年的统治期间,清朝除了太平天国等内乱外,正值世界动荡,饱受外国侵略,加上中国传统对于女性执政的负面意见,颇受争议。近年来,史学界逐渐开始有人提出应对慈禧当政提出多元化的评价。但她在大多数人的心中,依然是一位负面人物。
2015年1月15日

古人消暑诗词,无风自清凉

$
0
0
盛夏时节,骄阳似火,鸣蝉聒噪,动辄汗流浃背。古代没有现代电扇、空调,但从文人墨客留下的众多消暑纳凉诗来看,古人也自有其消暑纳凉方法,别有一番情趣。
《夏日南怀辛大》
【唐代】孟浩然
山光忽西落,池月渐东上。
散发乘夕凉,开轩卧闲敞。
荷风送香气,竹露滴清响。
欲取鸣琴弹,恨无知音赏。
感此怀故人,中宵劳梦想。
《夏日山中》
【唐代】李白
懒摇白羽扇,裸体青林中。
脱巾挂石壁,露顶洒松风。
《消暑诗》
【唐代】白居易
何以消烦暑,端坐一院中。
眼前无长物,窗下有清风。
散热由心静,凉生为室空。
此时身自保,难更与人同。
《苦热题恒寂师禅室》
【唐代】白居易
人人避暑走如狂,独有禅师不出房。
可是禅房无热到?但能心静即身凉。
《桥南纳凉》
【宋】陆游
携杖来追柳外凉,画桥南畔倚胡床。
月明船笛参差起,风定莲池自在香。
《长兴里夏日寄南邻避暑》
【唐代】杜牧
侯家大道傍,蝉噪树苍苍。
开锁洞门远,卷帘官舍凉。
栏围红药盛,架引绿萝长。
永日一欹枕,故山云水乡。
《暮热游荷池上》(其三)
【宋代】杨万里
细草摇头忽报侬,披襟拦得一西风。
荷花入暮犹愁热,低面深藏碧伞中。
《苏幕遮·钱塘避暑忆旧用美成韵》
【宋代】赵必象
远迎风,回避暑。
人似荷花,笑隔荷花语。
无限情云并意雨。
惊散鸳鸯,兰棹波心举。
约重游,轻别去。
断桥风月,梦断飘蓬旅。
旧日秋娘犹在否。
雁足不来,声断衡阳浦。
附原词:
《苏幕遮·燎沉香》
【宋代】周邦彦
燎沉香,消溽暑。
鸟雀呼晴,侵晓窥檐语。
叶上初阳干宿雨、
水面清圆,一一风荷举。
故乡遥,何日去。
家住吴门,久作长安旅。
五月渔郎相忆否。
小楫轻舟,梦入芙蓉浦。
《鹊桥仙·己酉山行书所见》
【宋代】辛弃疾
松冈避暑,茅檐避雨,闲去闲来几度。
醉扶孤石看飞泉,又却是、前回醒处。
东家娶妇,西家归女,灯火门前笑语。
酿成千顷稻花香,夜夜费、一天风露。

五言禅诗

$
0
0
身是菩提树,心如明镜台。时时勤拂拭,莫使有尘埃。
菩提本无树,明镜亦非台。本来无一物,何处惹尘埃。
东山西岭青,雨下却天晴。更问个中意,鹁鸠生鹞鹰。
牵驴饮江水,鼻吹波浪起。岸上蹄踏蹄,水中嘴连嘴。
空手把锄头,步行骑水牛。人从桥上过,桥流水不流。
密室开金锁,闲步下松门。谩将无孔笛,吹出凤游云。
云开空自阔,叶落即归根。回首烟波里,渔歌过远村。
鹤立松梢月,鱼行水底天。风光都占断,不费一文钱。
饥来要吃饭,寒到即添衣。困时伸脚睡,热处爱风吹。
心随万境转,转处实能幽。随流识得性,无喜亦无忧。
旧竹生新笋,新花长旧枝。雨催行客到,风送片帆归。
远观山有色,近听水无声。春去花犹在,人来鸟不惊。
打鼓弄琵琶,相逢两会家。君行杨柳岸,我宿渡头沙。
人闲桂花落,夜静春山空。月出惊山鸟,时鸣春涧中。
说道春来好,狂风太放颠。吹花随水去,翻却钓鱼船。
击水鱼头痛,穿林宿鸟惊。黄昏不击鼓,日午打三更。
黄昏鸡报晓,半夜日头明。惊起雪师子,瞠开红眼睛。
晓风杨柳岸,春色杏花墙。暑雨琴棋润,熏飚枕簟凉。
枯树云充叶,凋梅雪作花。击桐成木响,蘸雪吃冬瓜。
碧落静无云,秋空明有月。林下道人幽,相看情共悦。
烟收山谷静,风送杏花香。永日萧然坐,澄心万虑忘。
萧萧木叶落,湛湛露珠悬。嘹唳冲云雁,凄清抱树蝉。
兴来美独往,胜事空自知。行到水穷处,坐看云起时。
吾心似秋月,碧潭清皎洁。无物堪比伦,教我如何说!
泥佛不渡水,神光照天地。立雪如未休,何人不雕伪?

曾几何时那些你觉得不过尔尔的诗词

$
0
0

小时候看很多诗句,觉得不过尔尔,多年后却在某个瞬间让你潸然泪下。
《行宫》
【唐】元稹
寥落古行宫,宫花寂寞红。
白头宫女在,闲坐说玄宗
小时候看觉得这首诗真是无聊,现在再看,忽然觉得沧海桑田。寥寥数字,盛唐不再。
《问刘十九》
【唐】白居易
绿蚁新醅酒,红泥小火炉。
晚来天欲雪,能饮一杯无
小时候读的时候感觉这哪能叫诗,根本就是大白话啊。工作后在某个加班后的雪夜,自己深一脚浅一脚地走在回家路上,莫名其妙地想起这首诗来。突然发现,自己竟然如此羡慕一千多年前的那幕情景。
《送元二使安西》
【唐】王维
渭城朝雨浥轻尘,客舍青青柳色新。
劝君更尽一杯酒,西出阳关无故人。
小时候老师总是要求背诵这首诗,觉得甚是无聊。直到一个朋友意外去世才明白,一旦动身,有些故人就真的没有了。好友这种缘分,有机会的话,还是更尽一杯酒吧。
《丑奴儿·书博山道中壁》
【宋】辛弃疾
少年不识愁滋味,爱上层楼。
爱上层楼。为赋新词强说愁。
而今识尽愁滋味,欲说还休。
欲说还休。却道天凉好个秋。
以前觉得,这是倚老卖老的作品,不就是嫌弃我们这些小年轻吗?尤其‌‌“而今识尽愁滋味‌‌”一句,压根就是大白话啊,真不懂,也不承认自己是‌‌“为赋新词强说愁‌‌”。
但现在有些明白了,少年时代,总希望别人懂自己,了解自己,于是不停写,把自己情感各种放大,这也是成长的过程。但是后来啊,就不一样了,有些心情不知道如何描述了,也不想再写了,因为觉得写了别人也不懂,或者是别人懂了,也没用,没有感同身受这回事,说出来也觉得甚是矫情,多大个事情嘛,于是翻遍通讯录,都不知道跟谁说话,本来想要矫情地说点什么,最后,只能含混的表达,天气甚好啊。
《悯农二首》
【唐】李绅
春种一粒粟,秋收万颗子。
四海无闲田,农夫犹饿死。
锄禾日当午,汗滴禾下土。谁知盘中餐,粒粒皆辛苦
小时候仅仅学到这是一首批判封建剥削制度的诗,长大后体会到了父母生活的艰辛不易,再偶然看到这首诗,才发现这说的就是老爸,老妈……
《水调歌头·丙辰中秋》
【宋】苏轼
丙辰中秋,欢饮达旦,大醉,作此篇,兼怀子由。
明月几时有?把酒问青天。
不知天上宫阙,今夕是何年。
我欲乘风归去,
又恐琼楼玉宇,高处不胜寒。
起舞弄清影,何似在人间?
转朱阁,低绮户,照无眠。
不应有恨,何事长向别时圆?
人有悲欢离合,月有阴晴圆缺,
此事古难全。
但愿人长久,千里共婵娟。
小时读过只觉是简简单单的佳节祝愿,并不认为多好。后来多读了点书,才知道作者其时官场失意,与所爱离散,孤身一人。试想若自身所处同样境地,断是说不出这般话的。只有真正置身于孤独寂寥中,才能知道说出这句话的人是有怎样的胸怀。
《游子吟》
【唐】孟郊
慈母手中线,游子身上衣。
临行密密缝,意恐迟迟归。
谁言寸草心,报得三春晖。
老妈来看我,走之前带着老花眼镜帮我缝衣服,就突然想起了这首诗。小学读这首诗的时候只是想象得出那种情景,而现在却是置身于情景之中。过了这么多年老妈也到了要带老花眼镜的年龄,而我也终于理解了这首诗。
《浣溪沙·谁念西风独自凉》
【清】纳兰性德
谁念西风独自凉,萧萧黄叶闭疏窗,
沉思往事立残阳。
被酒莫惊春睡重,赌书消得泼茶香,
当时只道是寻常。
一直不理解这种悔意,最近这一年,顿悟了。
《离思五首·其四》
【唐】元稹
曾经沧海难为水,除却巫山不是云。
取次花丛懒回顾,半缘修道半缘君。
经历过了一种刻骨铭心的感觉之后,再没有可以让自己动心的了。你还记得你的第一个刻骨铭心吗?
《和子由渑池怀旧》
【宋】苏轼
人生到处知何似,应似飞鸿踏雪泥。
泥上偶然留指爪,鸿飞那复计东西。
老僧已死成新塔,坏壁无由见旧题。
往日崎岖还记否,路长人困蹇驴嘶。
第一次读的时候真心觉得一般,直到经历了几次离别之后再读,差点哭出来。
《送魏万之京》
【唐】李颀
朝闻游子唱离歌,昨夜微霜初渡河。
鸿雁不堪愁里听,云山况是客中过。
关城树色催寒近,御苑砧声向晚多。
莫见长安行乐处,空令岁月易蹉跎。
成了游子后,漂泊在异乡,想买张车票回家都很难,回想起霜冷大地时离家的情景,才明白有多么‌‌“不堪‌‌”。
《生查子·元夕》
【宋】欧阳修
去年元夜时,花市灯如昼。
月上柳梢头,人约黄昏后
今年元夜时,月与灯依旧。
不见去年人,泪湿春衫袖
诗歌浅显易懂,以前只在意第二句,真正是幸福美好的生活。而最近人移事迁,越来越对末句有感觉。

丈夫的称呼:从“良人”到“老公”

$
0
0
1.良人
最早时妻子称呼自己的丈夫‌‌“良人‌‌”,从中我们不难看到古代丈夫们光辉高大的形象,古诗里就有‌‌“妾家高楼连苑起,良人持戟明光里‌‌”。
‌‌“良人‌‌”一词显示不出男女性别,妻子称自己的丈夫为‌‌“良人‌‌”;丈夫称自己的妻子亦为‌‌“良人‌‌”。从这儿可以看出当时男女地位大抵还是比较平等的,但这种不加区别也给夫妻间称呼带来很多不便。
(哦,原来,诗经里的:“今夕何夕,见此良人”中的“良人”是指某个男人啊,我还以为是指某个女人)
2.
所以后来就根据‌‌“说文解字‌‌”,在‌‌“良‌‌”字音义上加以区别;在‌‌“良‌‌”右边加‌‌“阝‌‌”,变成‌‌“郎‌‌”;在‌‌“良‌‌”左边加‌‌“女‌‌”,衍成‌‌“娘‌‌”。
‌‌“郎‌‌”就代表丈夫,李白有‌‌“郎骑竹马来,绕床弄青梅‌‌”,义山诗有‌‌“刘郎已恨蓬山远,又隔蓬山一万丛‌‌”,花间词中有‌‌“问郎花好侬颜好‌‌”。‌‌“郎‌‌”多亲切的称呼啊!
3.郎君
古人认为单音节词似乎太甜腻了,当时大约除了个别人如郑袖,钩弋之流,众多良家妇女们在人前还是羞于叫出口。于是她们就在前头或尾后加一个字变双音词,即‌‌“郎‌‌”字后面加一个‌‌“君‌‌”字;
在‌‌“娘‌‌”字后面加一个‌‌“子‌‌”字,成了表示亲昵的‌‌“郎君‌‌”,‌‌“娘子‌‌”。(注:起先,‌‌“娘子‌‌”一词仅用青春妙龄的少女。大约到了唐代就成了妻子的称呼。)妻子称丈夫为‌‌“郎君‌‌”,是对丈夫的雅称,丈夫称妻子为‌‌“娘子‌‌”,是对妻子的爱称。
4.官人
宋代,是南北文化交流频繁的时代,在夫妻间的称呼上,由于当时的宫庭中出现了‌‌“官家‌‌”一词,平民百姓中,于是有了‌‌“官人‌‌”这一称谓。有的妻子称自己的丈夫为‌‌“官人‌‌”。
至今,民间仍对新婚夫妻戏称为‌‌“新郎官‌‌”、‌‌“新娘子‌‌”。从这个称呼也可看出随着宋代理学的兴盛,男人的家庭地位也上了一个新台阶啊。官人是管人嘛,那家里的官人当然就是管家里的老婆了哦。
5.外子
外子在宋代,妻子也有称自己的丈夫‌‌“外人‌‌”的,再文雅点的就叫称做‌‌“外子‌‌”,丈夫则称自己的妻子的除‌‌“娘子‌‌”外,还称‌‌“内人‌‌”。
在别人面前,对妻子的谦称还有‌‌“贱内‌‌”;这都是那时的小资和伪小资们最喜欢喜欢的叫法了。潘金莲称西门庆一定是甜甜的一声‌‌“偶官人‌‌”。但李清照称赵明诚则一定是‌‌“外子‌‌”。
6.相公
看过京剧,越剧,黄梅戏的话,你一定会对里面不时就有的,拉长了声音的一声娇呼‌‌“相--公—‌‌”,印象深刻。由此可见这个称呼古时之流行。这比‌‌“官人‌‌”又进了一步,已经不仅是‌‌“官‌‌”,而且是最高的官‌‌“相‌‌”了。
男人的家庭地位由此达到极盛。然而泰极否来,近代以来,随着妇女解放运动的愈演愈烈。男人的地位也是每况愈下,从对丈夫的称呼中也可明显看出。
7.先生
近代以来,也称‌‌“丈夫‌‌”为先生。有本意,有引申意,也有通假意。有特指,也有泛指。《辞海》‌‌“先生‌‌”目下载:‌‌“《礼记·曲礼上》‌‌‘从于先生,不越路而与人言。’也引申为对年长有德业者的敬称。有时,也泛用为对人的敬称。‌‌”
由此可见,这一称谓,除指某些特定身份,如丈夫等对象之外,是隐含着职业、年龄方面的因素的。换言之,所谓先生,主要指有一定学识而又年庚较高的人。用先生指代丈夫,文雅而又带有仰慕尊崇的意思。从中尤可见男性的尊严。至今在海外华人中和港台地区还在广泛使用。
8.爱人
‌‌“爱人‌‌”这一称谓最早见于新文学作品之中。上世纪20年代初郭沫若写的诗剧《湘累》中,就有‌‌“九嶷山的白云哟,有聚有消;洞庭湖的流水哟,有汐有潮。我的爱人哟,你什么时候回来哟。‌‌”在小说中、情书中,更是多见。但那时没有被广泛地用于对妻子或丈夫的称呼。30年代末或40年代初,解放区一些受新文化运动熏陶的知识分子开始用‌‌“爱人‌‌”这一称谓。
新中国成立后提倡男女平等,不再使用如‌‌“屋里的‌‌”、‌‌“做饭的‌‌”等有歧视色彩的称谓;而解放前在国统区使用的‌‌“先生‌‌”、‌‌“太太‌‌”、‌‌“小姐‌‌”,又显出‌‌“资产阶级‌‌”的色彩。于是‌‌“爱人‌‌”便被广泛地使用起来。
但是,海外华人拒绝使用‌‌“爱人‌‌”称谓。一位朋友说,他去英国留学,每当他说起自己的妻子时,使用国内的称呼‌‌“我爱人‌‌”,使得人家以为他在谈论‌‌“情人‌‌”。因其直译lover就是‌‌“情人‌‌”的意思。而且在日语中汉字‌‌“爱人‌‌”也是指‌‌“情人‌‌”。所以现在也用得少了,年轻人已很少再用这个词了。
9.老公
古时原来就是太监。老公,最后来说说这个目前最流行的叫法。老公这词最初就是称呼太监的。这宦官吧,古代官名称为寺人、黄门、貂珰。尊称内官、内臣、中官、中贵;卑称内竖、阉宦、太监、阉人。
民间则俗称老公,李自成进北京后,即有‌‌“打老公‌‌”一说(《枣林杂俎》)。如是看来,老公最早的身份,原是太监。不知女人呼叫老公时,是否骨子里潜意识就想过,这眼前的男人,就真还有些太监的味道?

寥寥数笔道尽浮生

$
0
0
自白话文兴起至今,文章渐长,内容渐少,开始有些怀念那些年读过的精短古文,寥寥数语,可道尽人生哲理,绘出奇峰美景,写尽缠绵心事。
《陋室铭》
刘禹锡
山不在高,有仙则名;水不在深,有龙则灵。斯是陋室,唯吾德馨。苔痕上阶绿,草色入帘青。谈笑有鸿儒,往来无白丁。可以调素琴,阅金经。无丝竹之乱耳,无案牍之劳形。南阳诸葛庐,西蜀子云亭。孔子云:‌‌“何陋之有?‌‌”
一个高洁之人,灵魂有香气,居室亦有香气!
《诫子书》
诸葛亮
夫君子之行,静以修身,俭以养德。非澹泊无以明志,非宁静无以致远。夫学须静也,才须学也,非学无以广才,非志无以成学。淫慢则不能励精,险躁则不能冶性。年与时驰,意与日去,遂成枯落,多不接世,悲守穷庐,将复何及!
有所求,有所为,有所忠,方不枉此生!
《爱莲说》
周敦颐
水陆草木之花,可爱者甚蕃。晋陶渊明独爱菊。自李唐来,世人盛爱牡丹。予独爱莲之出淤泥而不染,濯清涟而不妖,中通外直,不蔓不枝,香远益清,亭亭净植,可远观而不可亵玩焉。
予谓菊,花之隐逸者也;牡丹,花之富贵者也;莲,花之君子者也。噫!菊之爱,陶后鲜有闻。莲之爱,同予者何人?牡丹之爱,宜乎众矣!
莽莽红尘,出淤泥而不染者,几人?
《陆游书巢》
陆游
吾室之内,或栖于椟,或陈于前,或枕籍于床,俯仰四顾无非书者。吾饮食起居,疾病呻吟,悲忧愤叹,未尝不与书俱。宾客不至,妻子不觌(dí,察看),而风雨雷雹之变有不知也。间有意欲起,而乱书围之,如积槁枝,或至不得行,则辄自笑曰:此非吾所谓巢者邪!乃引客就观之,客始不能入,既入又不能出,乃亦大笑曰:信乎其似巢也!
与书为伴,一生足矣!
《书舟中作字》
苏轼
将至曲江,船上滩欹侧,撑者百指,篙声石声荦然。回顾皆涛濑,士无人色,而吾作字不少衰,何也?吾更变亦多矣,置笔而起,终不能一事,孰与且作字乎。
每一个泰然自若的人,都有颗饱经沧桑的心
 
《诲学说》
欧阳修
玉不琢,不成器;人不学,不知道。然玉之为物,有不变之常德,虽不琢以为器,而犹不害为玉也。人之性,因物则迁,不学,则舍君子而为小人,可不念哉?
玉不琢还是玉,人不知上进,修养和学识便会有所缺失。
《湖心亭看雪》
张岱
崇祯五年十二月,余住西湖。大雪三日,湖中人鸟声俱绝。
是日更定矣,余挐一小舟,拥毳衣炉火,独往湖心亭看雪。雾凇沆砀,天与云、与山、与水,上下一白。湖上影子,惟长堤一痕、湖心亭一点、与余舟一芥、舟中人两三粒而已。
到亭上,有两人铺毡对坐,一童子烧酒炉正沸。见余,大喜曰:‌‌“湖中焉得更有此人?‌‌”拉余同饮。余强饮三大白而别。问其姓氏,是金陵人,客此。
及下船,舟子喃喃曰:‌‌“莫说相公痴,更有痴似相公者!‌‌”
人不痴不成事。冷寂湖山寻清绝雪景,非痴人不能为!
《马说》
韩愈
世有伯乐,然后有千里马。千里马常有,而伯乐不常有。故虽有名马,只辱于奴隶人之手,骈死于槽枥之间,不以千里称也。
马之千里者,一食或尽粟一石。食马者不知其能千里而食也。是马也,虽有千里之能,食不饱,力不足,才美不外见,且欲与常马等不可得,安求其能千里也?
策之不以其道,食之不能尽其材,鸣之而不能通其意,执策而临之,曰:‌‌“天下无马!‌‌”呜呼!其真无马邪?其真不知马也。
千里马常有,伯乐不常有,所谓知己和贵人,皆是有识人之才者。
《生于忧患,死于安乐》
孟子
舜发于畎亩之中,傅说举于版筑之间,胶鬲举于鱼盐之中,管夷吾举于士,孙叔敖举于海,百里奚举于市。
故天将降大任于斯人也,必先苦其心志,劳其筋骨,饿其体肤,空乏其身,行拂乱其所为,所以动心忍性,曾益其所不能。
人恒过,然后能改,困于心,衡于虑,而后作;征于色,发于声,而后喻。入则无法家拂士,出则无敌国外患者,国恒亡。
然后知生于忧患,而死于安乐也。
古之有所成者,皆历经苦难,终得所愿。

《孙权劝学》
司马光
初,权谓吕蒙曰:‌‌“卿今当涂掌事,不可不学!‌‌”蒙辞以军中多务。权曰:‌‌“孤岂欲卿治经为博士邪?当涉猎,见往事耳。卿言多务,孰若孤?孤常读书,自以为大有所益。‌‌”蒙乃始就学。
及鲁肃过寻阳与蒙论议,大惊曰:‌‌“卿今者才略,非复吴下阿蒙!‌‌”蒙曰:‌‌“士别三日,即更刮目相待,大兄何见事之晚乎!‌‌”肃遂拜蒙母,结友而别。

学无止境,何时开始都不晚,所谓士别三日,刮目相看都因勤学好进。
Viewing all 20452 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>