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
#!/usr/bin/env python3 | |
import paramiko | |
import asyncio | |
import time | |
import asyncssh | |
import sys | |
pubkey_str = '' | |
with open("/root/.ssh/id_rsa.pub") as f: |
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
#!/bin/bash | |
#set -x | |
function usage() | |
{ | |
echo "Usage:" | |
echo " tc.sh -d <dev> -b <bandwidth> -m <mode> --src <src_ip>" | |
echo " <dev> is the device which tc be attached to" | |
echo " <bandwidth> unit is Mb" | |
echo " <mode> 0 contains class while 1 does not, default 0" | |
echo " <src_ip> match source ip default empty" |
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
#include <bcc/proto.h> | |
#include <uapi/linux/ip.h> | |
#include <uapi/linux/ipv6.h> | |
#include <uapi/linux/icmp.h> | |
#include <uapi/linux/tcp.h> | |
#include <uapi/linux/udp.h> | |
#include <uapi/linux/icmpv6.h> | |
#include <net/inet_sock.h> | |
#include <linux/netfilter/x_tables.h> |