Skip to content

Instantly share code, notes, and snippets.

View kona3266's full-sized avatar

Dean kona3266

  • CN
View GitHub Profile
#!/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:
@kona3266
kona3266 / tc.sh
Last active December 25, 2023 01:32
tc-bash
#!/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"
@kona3266
kona3266 / skbtracer.c
Last active November 30, 2023 14:39 — forked from chendotjs/skbtracer.c
ebpf-skbtracer
#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>