- systemtap 几乎无所不能,可以在内核放置探测点,然后执行自己的代码。
- kprobe:简单的工具,可以快速检验某个函数是否被执行到
- packetdrill:用于验证 TCP 协议的行为很有用。
This file contains hidden or 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
| #!/bin/bash | |
| # | |
| # Yury V. Zaytsev <yury@shurup.com> (C) 2011 | |
| # | |
| # This work is herewith placed in public domain. | |
| # | |
| # Use this script to cleanly restart the default libvirt network after its | |
| # definition have been changed (e.g. added new static MAC+IP mappings) in order | |
| # for the changes to take effect. Restarting the network alone, however, causes | |
| # the guests to lose connectivity with the host until their network interfaces |
This file contains hidden or 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
| #!/bin/sh | |
| ### Run one line below to install and run | |
| # curl -o /etc/init.d/S98port80guard https://gist.githubusercontent.com/breakertt/622a416cc4202218194b9e28f27c7e66/raw/b43ab8d786dc8b8f7e597b3065a0bb339e5c8981/S98port80guard && chmod +x /etc/init.d/S98port80guard && /etc/init.d/S98port80guard start | |
| ### BEGIN INIT INFO | |
| # Provides: port_guard_80 | |
| # Required-Start: $network | |
| # Default-Start: S | |
| # Default-Stop: |
This file contains hidden or 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
| import subprocess | |
| import time | |
| # Replace with your SSH host, username, and command | |
| host = '127.0.0.1' | |
| user = 'breakertt' | |
| response_size = 8192 | |
| command = """awk 'BEGIN {{while (c++<%d) printf "?"; print "ACK"}}'""" % response_size | |
| #command = """awk "BEGIN {{while (c++<%d) printf '?'; print 'ACK'}}"\n""" % (response_size) |
This file contains hidden or 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
| # This example assumes the NGINX proxy is on the same host as the Plex Media Server. | |
| # To configure Plex Media Server to serve requests without requiring authentication, | |
| # ensure that your LAN subnet is correctly added to the advanced server setting called | |
| # "List of IP addresses and networks that are allowed without auth". Example: | |
| # 192.168.0.1/24 | |
| upstream plex-upstream { | |
| server 127.0.0.1:32400; | |
| } |
This file contains hidden or 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
| # !!!!!!! Minimal Mikrotik Vesrion 7.14 !!!!!!!!! | |
| # | |
| # Get DNS zone id and record id | |
| # curl \ | |
| # -H "Authorization: Bearer {HTTP_TOKEN}" \ | |
| # -H "Accept: application/json" \ | |
| # https://dynv6.com/api/v2/zones | |
| # curl \ | |
| # -H "Authorization: Bearer {HTTP_TOKEN}" \ | |
| # -H "Accept: application/json" \ |
This file contains hidden or 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
| # Temporarily add a normal upstream DNS resolver | |
| /ip dns set servers=1.1.1.1,1.0.0.1 | |
| # CA certificates extracted from Mozilla | |
| /tool fetch url=https://curl.se/ca/cacert.pem | |
| # Import the downloaded ca-store (127 certificates) | |
| /certificate import file-name=cacert.pem passphrase="" | |
| # Set the DoH resolver to cloudflare |
This file contains hidden or 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
| const uptimerobot_id = 'your uptimerobot_id' | |
| const upstream = 'stats.uptimerobot.com' | |
| const upstream_path = '/' + uptimerobot_id | |
| const replace_dict = { | |
| '$upstream': '$custom_domain', |
NewerOlder